Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Convert all metric tags to lists #950

Closed
jrconlin opened this issue Jul 7, 2017 · 1 comment
Closed

Convert all metric tags to lists #950

jrconlin opened this issue Jul 7, 2017 · 1 comment

Comments

@jrconlin
Copy link
Member

jrconlin commented Jul 7, 2017

tags can only be lists.
In addition, tag composition could be made easier using a helper method like:

def maketags(base, **kwargs):
    # type: (Sequence[str], **Any) -> Sequence[str]
    tags = list(base)
    tags.extend('{}:{}'.format(key, val) for key, val in kwargs.iteritems())
    return tags

which would allow for things like
self.metrics('thing', tags=maketags(self._base_tags, foo=bar, gorp=1)

jrconlin added a commit that referenced this issue Jul 7, 2017
Convert all tags to lists via make_tags

Closes #943, #950
jrconlin added a commit that referenced this issue Jul 7, 2017
Convert all tags to lists via make_tags

Closes #943, #950
jrconlin added a commit that referenced this issue Jul 8, 2017
Convert all tags to lists via make_tags

Closes #943, #950
jrconlin added a commit that referenced this issue Jul 8, 2017
Convert all tags to lists via make_tags

Closes #943, #950
@jrconlin
Copy link
Member Author

closed as part of #948

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant