Skip to content

[cmd/opampsupervisor] Supervisor can utilize collector extensions #47690

@dpaasman00

Description

@dpaasman00

Component(s)

cmd/opampsupervisor

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

The collector's extension ecosystem provides a rich set of functionality beyond telmetry / pipeline management. The supervisor would benefit from these capabilities in various use cases, but it has no way of leveraging them currently.

An example use case is the supervisor using an auth extension to authenticate with the OpAMP backend it connects to. Currently the supervisor is limited to static headers defined at runtime in its configuration. Instead it could use the OAuth extension to generate an OAuth token.

Describe the solution you'd like

Add generic extension hosting capabilities to the supervisor such that it can manage and use collector extensions for its own operations.

Core design

  1. A new extensions: section in the supervisor config that reuses the existing collector extension configurations.

  2. A minimal component.Host implementation within the supervisor to manage extension lifecycle (creation, startup, shutdown) using the standard extension.Extension interface.

  3. A hardcoded, curated list of supported extension factories built into the supervisor binary. New extensions are added incrementally as use cases are validated.

  4. A feature gate (supervisor.extensions, alpha) controlling the entire extensions feature. When the gate is off (default), any extensions: config is rejected with a clear error at startup.

After the core infrastructure is established, a follow up PR would implement the auth extension use case using the RoundTripper to dynamically generate headers. At this point the relevant auth extensions would be added. Using storage extensions is another use case we discussed in the SIG and would be another follow up PR.

Describe alternatives you've considered

Instead of implementing support to integrate with collector extensions, we could implement each use case specific to the supervisor. Avoids generic extension support and the component.Host abstraction, but duplicates work and diverges from the collector's patterns.

Additional context

We discussed this topic during the 04.14.26 OpAMP SIG. I will also take on implementation.

A list of prior issues related to the auth extension use case:

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions