-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make Collector instance ID available to config.MapProvider #4272
Comments
I disagree with this way of thinking. We need to understand better: 1. who is "generating" the instance id? Why is this not a property configured by the user (the current instance ID was a hack added to be able to differentiate between collectors without user having to do anything). We should think about the big picture:
Please consider to address the overall picture instead of jumping to conclusions like that instance.id should be passed to config manager. |
All good questions. This indeed requires more thinking. For now I am just trying to capture the problems that I notice.
It seems automatically generating the instance id is a good idea and matches the Otel semantic conventions. Asking the user for the instance id seems like unnecessary burden. I don't see what we gain by that. I think we will likely want to allow the user to set the service.namespace and maybe allow to override service.name. However, I can't think of a use case where overriding the instance id is useful. Maybe there is some that I am not aware of.
It is done by
Yes, using the same value enables interesting functionality, such as linking remote configuration/management and reported telemetry. It is currently work in progress on Agent Management group but this (very long) document explains how the 2 aspects of management can work together for increased value: https://docs.google.com/document/d/1auDpvnhnWGGUlXA5y2tNXt_NVwOlgTi7aLpKm9kvFPM/edit
We need to somehow make the config.MapProvider and Telemetry use the same instance id. Today |
- The Supervisor can manage OpenTelemetry Collector. - Demonstrates basic features: applying config, configuring Collector to collect its own metrics. TODO: - Find a way to fetch Collector version instead of hard-coding it. - Set instance id in the Collector config file to make sure OpAMP and Collector metrics use the same instance id. (Related open issue open-telemetry/opentelemetry-collector#4272) - Re-think callbacks to avoid unnecessary restarts (See open-telemetry#77) - Add a way for Supervisor to understand why the Collector process exited unexpectedly.
This should be likely replaced by #5398 instead. |
#5398 is done |
The Collector currently generates a random instance ID in colTelemetry.initOnce() and uses the the value as the "service.instance.id" attribute in the reported telemetry. This is good and is expected.
Unfortunately this value doesn't seem to be accessible anywhere. In particular config.MapProvider needs the instance ID to report it to the management server to fetch the configuration for the particular Collector instance. See Remote Configuration Proposal for description of how the instance id can be used.
Maybe we need to make the instance ID available to config.MapProvider by some means. Perhaps it can be a readable property of the Host and Host is passed as a parameter to config.MapProvider.Get(). Note that config.MapProvider is created very early, before colTelemetry.initOnce() is called, so it is not good enough to make instance ID a public property of the
Collector
. It is too late, by the timeCollector
is createdconfig.MapProvider
should be created already.The text was updated successfully, but these errors were encountered: