-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Suggestions on ensuring consistent instanceId #29582
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I think that's exactly what Supervisor does:
What is the problem that you see? |
@tigrannajaryan Thanks for your answer.
Yes, the instanceId generated by opampsupervisor will be merged into the OTEL configuration file only when opampsupervisor does not have local configuration (effective.yaml) or receives remote configuration. But if the user provides 'effective.yaml' and the opamp extension is not enabled, in this case the instanceId and OTEL's service.instance.id will be consistent only until the user remotely configures it. When opampsupervisor generates instance_uid, this value is written into OTEL's configuration item (service.telemetry.resource.service.instance.id). This may not cause this problem? |
As far as I can see from the code the instance id is always generated by the supervisor and written into the Collector's config file. I am not sure I understand what is the problem. |
According to the discuss, opampsupervisor should merge the default configuration (eg. noop configuration) But according to loadAgentEffectiveConfig, If the file corresponding to the "effectiveConfigFilePath" path exists(eg. the user configures), opampsupervisor will not merge configurations when starting otel for the first time.
There would be a problem unless the user could not customize the contents of the file corresponding to the "effectiveConfigFilePath" path before launching the program. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Component(s)
cmd/opampsupervisor, extension/opamp
Describe the issue you're reporting
According to opampsupervisor document, the current approach is: supervisor generate instance_uid, and The value is injected into the Collector config in opamp extension's instance_uid setting and as service.instance.id attribute under the service.telemetry.resource setting. In this way, it will not work if the opamp extension is not enabled.
According to otel source code, after OTEL starts, it will read the configuration item (service.telemetry.resource.service.instance.id) of the configuration file. If the configuration item does not exist, it will be randomly generated. Why not write it to the configuration item when opampsupervisor generates instance_uid? after all OTEL is started by opampsupervisor
The text was updated successfully, but these errors were encountered: