Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Allow to override stats metrics host #116

Merged
merged 4 commits into from
Nov 17, 2014
Merged

Conversation

LotharSee
Copy link
Contributor

For now, there is no way to change the host of metrics reported thought statsd.

This PR adds an optional field host to to DogStatsApi methods which allow to override this value.
Basically, it implements the magic tag host: DataDog/dd-agent#1164

@LeoCavaille
Copy link
Member

Cool!
Could you see what's going on with the CI build? Seems like one test failed.

@LotharSee
Copy link
Contributor Author

@LeoCavaille good catch, it was a sneaky non-deterministic test, thanks now it's fixed!

@LotharSee
Copy link
Contributor Author

Also, there is currently no way with dogstatsd to define the host attribute of a metric.
Two suggestions (which in fact concerns https://github.com/DataDog/dd-agent/)

  • Define a new syntax (like |host:foo)
  • (Better) Consider that a tag host:foo will erase the host attribute with foo. It also avoid the strange situation where the host attribute and the tag host differ.

@clutchski
Copy link
Contributor

I like the idea of a tag called host. If you submit host:foo, it will override. If you submit host: it can be a shorthand to not patch the hostname at all (and not the host tags either, which would reduce contexts for a few cases)

conorbranagan added a commit that referenced this pull request Nov 17, 2014
Allow to override stats metrics host
@conorbranagan conorbranagan merged commit b80fa89 into master Nov 17, 2014
@conorbranagan conorbranagan deleted the stats-metric-host branch November 17, 2014 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants