-
Notifications
You must be signed in to change notification settings - Fork 208
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
Target Allocator Support for Telegraf Based Prometheus Receiver #1394
Conversation
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.
Logic looks good just need some more error/path handling and I would also like to see more comments in the code to explain key decision points for example when modifying the configuration.
The base branch was changed.
func (tam *TargetAllocatorManager) AttachReloadConfigHandler(handler func(config *promconfig.Config)) { | ||
tam.reloadConfigHandler = handler | ||
} | ||
func (tam *TargetAllocatorManager) reloadConfigTicker() error { |
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.
nit: The function name sounds like it's reloading a ticker, but it's actually creating a reload ticker.
7eda302
to
c3a0db2
Compare
fd1f5b2
to
48aaa7f
Compare
48aaa7f
to
fb0ea4b
Compare
Approving from prior reviews |
Description of the issue
We have a new tool called Target Allocator, which provides scrape configs. These changes allows telegraf based prometheus receiver to pull scrape configs from Target Allocator endpoint.
There was a bug on config returning if TA exist instead of does not exist on this PR(#1390) thus reverted and created this one.
Description of changes
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint