Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Nov 3, 2025

What does this PR do?

Allows otel component configurations generated from output configuration to be overridden. In the output configuration, we have a new optional otel section:

outputs:
  default:
    type: elasticsearch
    hosts: [127.0.0.1:9200]
    api_key: "example-key"
    otel:
      extensions:
        beatsauth:
          timeout: "60s"
      exporter:
        include_source_on_error: true

otel.extensions.<extension_name> contains configuration for the generated extension, while otel.exporter, for the exporter.

These configurations are merged into the generated configuration and take precedence over it. There aren't any validity checks here, so the feature should be used with care. It's only intended as a stopgap measure to mitigate unforeseen problems.

Why is it important?

If it turns out there's an issue with the configuration translation, we want to have an escape hatch to mitigate it for affected customers.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added an entry in ./changelog/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

How to test this PR locally

Build the agent package, then run it with the following configuration:

agent:
  logging:
    to_stderr: true
    level: debug
  monitoring:
    enabled: false
inputs:
- data_stream:
    namespace: default
  id: unique-system-metrics-input
  streams:
  - data_stream:
      dataset: system.cpu
    metricsets:
    - cpu
  type: system/metrics
  use_output: default
  _runtime_experimental: otel
outputs:
  default:
    username: elastic
    password: placeholder
    hosts:
    - 127.0.0.1:9200
    type: elasticsearch
    otel:
      exporter:
        sending_queue:
          queue_size: 50
      extensions:
        beatsauth:
          timeout: "60s"

Then collect diagnostics and look at the final otel configuration. It should contain the output overrides.

Related issues


This is an automatic backport of pull request #10992 done by [Mergify](https://mergify.com).

#10992)

* Allow overriding otel exporter config

* Allow overriding otel output extension config

* Unskip integration test with override

(cherry picked from commit c392f7e)
@mergify mergify bot added the backport label Nov 3, 2025
@mergify mergify bot requested a review from a team as a code owner November 3, 2025 21:14
@mergify mergify bot requested review from pchila and ycombinator and removed request for a team November 3, 2025 21:14
@github-actions github-actions bot added enhancement New feature or request Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog labels Nov 3, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@swiatekm swiatekm merged commit f29f7f3 into 8.19 Nov 4, 2025
19 checks passed
@swiatekm swiatekm deleted the mergify/bp/8.19/pr-10992 branch November 4, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport enhancement New feature or request skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants