Skip to content

[cmd/opampsupervisor] Add support for local Collector config file via agent.config_file #37886

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

Closed
tigrannajaryan opened this issue Feb 13, 2025 · 2 comments · Fixed by #38671
Closed
Labels

Comments

@tigrannajaryan
Copy link
Member

Component(s)

cmd/opampsupervisor

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

The spec says:

The Supervisor creates a Collector config file in a temp directory and passes to the Collector via --config command line option. The config file is created by merging the local config file (optional) and the remote config received from OpAMP backend (also optional).

The spec also defines how the local config file path is specified in the supervisor config:

agent:
  # Path to optional local Collector config file to be merged with the
  # config provided by the OpAMP server.
  config_file: /etc/otelcol/config.yaml

This feature is not yet implemented in the Supervisor.

Describe the solution you'd like

See the spec: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor/specification

Describe alternatives you've considered

No response

Additional context

No response

@tigrannajaryan tigrannajaryan added enhancement New feature or request needs triage New item requiring triage labels Feb 13, 2025
Copy link
Contributor

Pinging code owners:

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

@crobert-1
Copy link
Member

Removing needs triage as this makes sense to me and was filed by a code owner.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Feb 13, 2025
akshays-19 pushed a commit to akshays-19/opentelemetry-collector-contrib that referenced this issue Apr 23, 2025
…-telemetry#38671)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR enables the supervisor to read the local configuration files as
per the spec, and merge those with other sources to be included in the
final merged effective config.

The local configuration files are read last, and as such, any values
there take precedence over other sources.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#37886

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Amended the existing test for composing configuration to include two
extra local files, and made sure the end-result is merged properly on
effective_config.yaml

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Paschalis T <[email protected]>
Signed-off-by: Paschalis Tsilias <[email protected]>
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this issue Apr 24, 2025
…-telemetry#38671)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR enables the supervisor to read the local configuration files as
per the spec, and merge those with other sources to be included in the
final merged effective config.

The local configuration files are read last, and as such, any values
there take precedence over other sources.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#37886

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Amended the existing test for composing configuration to include two
extra local files, and made sure the end-result is merged properly on
effective_config.yaml

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Paschalis T <[email protected]>
Signed-off-by: Paschalis Tsilias <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants