-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Move default hostname logic from the aggregator to the sender and dsd #2334
Conversation
ce085e7
to
8946bc6
Compare
64a62e5
to
80328dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is 👍 !
80328dd
to
62e946b
Compare
- move the default hostname responsibility from the aggregator / sampler to the sender - add a DisableDefaultHostname method to the Sender interface - make dogstatsd handle hostname for events and service checks
This reverts commit a99fc330ad7ae60c18ab21071428008fe3747b2b.
8feebce
to
3eafdaa
Compare
Added end-to-end testing, to ensure dsd hostname cases are handled. They'll be extended on #2351 to add a check with default hostname disabled too |
567d441
to
9bc084d
Compare
pkg/aggregator/sender_test.go
Outdated
|
||
assert.Equal(t, "testhostname", checksender.defaultHostname) | ||
assert.Equal(t, false, checksender.defaultHostnameDisabled) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra line here
What does this PR do?
In order to allow cluster checks to submit metrics / events / servicechecks with an empty hostname, this PR moves the default hostname injection logic responsibility from the aggregator to the sender / source:
checkSampler
(for metrics) and theBufferedAggregator
(for events / SCs)defaultHostname
field fromdistSampler
andtimeSampler
checkSender
itself, allow checks to disable it via the newDisableDefaultHostname
methodhost:
tag to remove the hostname, as is done with metrics.The collector part will come in a second PR.