Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new constant tags for statsd client #68

Merged
merged 2 commits into from
Jul 23, 2015

Conversation

johnistan
Copy link
Contributor

I have added a optional param (constant_tags) to the Dogstatsd client to append tags to every metrics call.

Useful for setting project wide tags like version.

@johnistan
Copy link
Contributor Author

hmm that py26 failure is not happening locally. looks like a set comprehension in mock. anyone else seen this?

@yannmh yannmh self-assigned this Jul 15, 2015
@yannmh
Copy link
Member

yannmh commented Jul 15, 2015

Thanks a lot @jofusa, it looks great. We'll review your PR really soon.

Python 2.6 failure seems related with testing-cabal/mock#259. I'll make the necessary to fix it.

@remh remh changed the title new contant tags for statsd client new constant tags for statsd client Jul 15, 2015
@yannmh
Copy link
Member

yannmh commented Jul 15, 2015

#69 should fix Python 2.6 failure. Would you mind rebasing your PR on top of master please ?

@@ -113,7 +113,7 @@ def test_tags_and_samples(self):
def test_tags_and_samples(self):
for i in range(100):
self.statsd.gauge('gst', 23, tags=["sampled"], sample_rate=0.9)
t.assert_equal('gst:23|g|@0.9|#sampled')
t.assert_equal('gst:23|g|@0.9|#sampled,bar:baz,foo')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this test will pass, as not part of TestDogStatsdConstantTags class.

@johnistan
Copy link
Contributor Author

sounds great. will update tests

@johnistan johnistan force-pushed the jdennison/client-level-tags branch from 353bc38 to cb78472 Compare July 22, 2015 15:59
@johnistan
Copy link
Contributor Author

rebased off master

@yannmh
Copy link
Member

yannmh commented Jul 23, 2015

Thanks @jofusa ! It looks good to me.

Let's merge it so it'll be part of the next release, v0.8.0, planned for next week.

yannmh added a commit that referenced this pull request Jul 23, 2015
@yannmh yannmh merged commit 25088df into DataDog:master Jul 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants