Skip to content
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

[extension/opamp]: Allow configuring extra identifying attributes #32644

Closed
BinaryFissionGames opened this issue Apr 23, 2024 · 7 comments
Closed
Labels
enhancement New feature or request extension/opamp needs triage New item requiring triage

Comments

@BinaryFissionGames
Copy link
Contributor

Component(s)

extension/opamp

Is your feature request related to a problem? Please describe.

We have a user that would like to be able to add extra identifying information (a separate unique ID) to OpAMP's agent description message.

Currently, identifying attributes are determined wholly by the extension. However, the spec specifies that any other attributes that are necessary for uniquely identifying the Agent's own telemetry. may also be specified for identifying attributes.

I think the user should be able to add extra identifying attributes if they have other information that helps identify the agent.

Describe the solution you'd like

I'd like a similar solution to #32153 - where extra attributes are merged into the agent description from the config.

extension:
  opamp:
    agent_description:
      identifying_attributes:
        custom.attribute: value
        another.custom.attribute: "another value"

Describe alternatives you've considered

An alternative is to just add the attribute to non-identifying attributes. This feels semantically wrong, because the attribute is used as an identifier for the agent, but is placed in non-identifying attributes.

Additional context

No response

@BinaryFissionGames BinaryFissionGames added enhancement New feature or request needs triage New item requiring triage labels Apr 23, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@tigrannajaryan
Copy link
Member

The problem with this is that if you supply extra identifying attributes then you can no longer guarantee that Collector's own telemetry uses these same attributes, which is a requirement in OpAMP.

I think it is possible to support this feature in Supervisor, which also controls full Collector config file and can specify additional Resource attributes for Collector's own telemetry, but I don't see how we can make this work without Supervisor, just in the extension.

@BinaryFissionGames
Copy link
Contributor Author

BinaryFissionGames commented Apr 23, 2024

I think it is possible to support this feature in Supervisor, which also controls full Collector config file and can specify additional Resource attributes for Collector's own telemetry, but I don't see how we can make this work without Supervisor, just in the extension.

This is our end goal, actually. I hadn't thought of it, but it makes sense that the Supervisor could modify the AgentDescription message received from the extension.

Would we be opposed to allowing configuration of the agent description in the supervisor?

agent:
  description:
    identifying_attributes:
      some.id: "unique-id"
    non_identifying_attributes:
      cloud.provider: "aws"

if you supply extra identifying attributes then you can no longer guarantee that Collector's own telemetry uses these same attributes, which is a requirement in OpAMP.

This is tangential and a separate issue, but the implementation of the OpAMP extension already allows for a different instance ID between self-telemetry and the one reported via OpAMP (service.instance.id in resource can be configured differently than the extensions instance_id). If this is a hard requirement, we should probably look into making that not possible.

@tigrannajaryan
Copy link
Member

Would we be opposed to allowing configuration of the agent description in the supervisor?

I think this sounds reasonable.

BTW, there is already a collector section in the Supervisor config where these settings can go to.

This is tangential and a separate issue, but the implementation of the OpAMP extension already allows for a different instance ID between self-telemetry and the one reported via OpAMP (service.instance.id in resource can be configured differently than the extensions instance_id). If this is a hard requirement, we should probably look into making that not possible.

opamp extension uses service.instance.id value by default unless explicitly overridden, see

sid, ok := res.Attributes().Get(semconv.AttributeServiceInstanceID)

This is probably good enough since by default it does the right thing.

@andykellr
Copy link

BTW, there is already a collector section in the Supervisor config where these settings can go to.

It appears that it was renamed to agent and that is the proposed location of these settings. I think we should either rename it to collector or update the spec to keep it in sync with the implementation.

https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/opampsupervisor/supervisor/config/config.go

https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor/specification#supervisor-configuration

@tigrannajaryan
Copy link
Member

I think we should either rename it to collector or update the spec to keep it in sync with the implementation.

I am fine either way, I agree we need to make sure they are in sync.

@BinaryFissionGames
Copy link
Contributor Author

I'm closing this in favor of a new issue #32824 since we want to do this in the supervisor and not the extension.

@BinaryFissionGames BinaryFissionGames closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extension/opamp needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

3 participants