Skip to content

Allow GraphiteBridge to set a prefix #49

Closed

Description

@hynek

Hi,

while testing and maybe transitioning, I’m very grateful for the GraphiteBridge.

However as far as I can tell, there’s no way to namespace (with a dot) my metrics and they just land in the main “directory”.

Could you please add a way to set a prefix that is prepended to all metrics?

Activity

  1. brian-brazil commented on Oct 2, 2015

    @brian-brazil
    Contributor

    That sounds like a reasonable and simple request, I'll add it to the Hacktoberfest list.

  2. kvikas commented on Oct 3, 2015

    @kvikas

    Hi Brian,

    I was looking into this. Does this mean bridge.graphite.GraphiteBridge.push() needs an optional namespace parameter? And it gets _sanitize()ed with . preserved and prepended to name.

  3. brian-brazil commented on Oct 3, 2015

    @brian-brazil
    Contributor

    I'd add an optional prefix parameter so as not to confuse it with the namespace parameter that Prometheus client libraries have. I'm not sure there's any need to sanitize it, as it's provided by a user that knows that it's going to graphite and what storage backend they have - unlike normal label values which can be arbitrary Unicode.

  4. brian-brazil commented on Oct 4, 2015

    @brian-brazil
    Contributor

    Fixed by #56

  5. hynek commented on Oct 4, 2015

    @hynek
    ContributorAuthor

    Sweet, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions