Skip to content

Prepare OTel Elasticsearch exporter with the credentials of the output#5469

Merged
jsoriano merged 11 commits intoelastic:mainfrom
jsoriano:prepare-otel-exporter-es
Sep 22, 2025
Merged

Prepare OTel Elasticsearch exporter with the credentials of the output#5469
jsoriano merged 11 commits intoelastic:mainfrom
jsoriano:prepare-otel-exporter-es

Conversation

@jsoriano
Copy link
Member

@jsoriano jsoriano commented Sep 8, 2025

What is the problem this PR solves?

Configure credentials for Elasticsearch OTel exporters.

How does this PR solve the problem?

It copies the credentials from the referenced output when their types match as Elasticsearch.

How to test this PR locally

Use the kibana code from elastic/kibana#233090. Enable the feature flag enableOtelIntegrations.

Using elastic-package to install the scenario (with these instructions: https://github.com/elastic/elastic-package/blob/main/docs/howto/use_existing_stack.md).

mage build:cover docker:customagentimage
export ELASTIC_AGENT_IMAGE_REF_OVERRIDE=<image tag generated in previous step>
export ELASTIC_PACKAGE_ELASTICSEARCH_PASSWORD=changeme
export ELASTIC_PACKAGE_ELASTICSEARCH_USERNAME=elastic
export ELASTIC_PACKAGE_KIBANA_HOST=http://localhost:5601
export ELASTIC_PACKAGE_ELASTICSEARCH_HOST=http://localhost:9200
elastic-package stack up -v -d --provider environment --version 9.2.0-SNAPSHOT

Then install or test the httpcheck package from https://github.com/elastic/elastic-package/tree/main/test/packages/parallel/httpcheck.

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • 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

Related issues

@jsoriano jsoriano self-assigned this Sep 8, 2025
@prodsecmachine
Copy link

prodsecmachine commented Sep 8, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@mergify
Copy link
Contributor

mergify bot commented Sep 8, 2025

This pull request does not have a backport label. Could you fix it @jsoriano? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.
@jsoriano jsoriano added the backport-skip Skip notification from the automated backport with mergify label Sep 9, 2025
@jsoriano jsoriano marked this pull request as ready for review September 17, 2025 21:34
@jsoriano jsoriano requested a review from a team as a code owner September 17, 2025 21:34
@jsoriano jsoriano force-pushed the prepare-otel-exporter-es branch from 374a101 to b63c986 Compare September 17, 2025 21:36
@ebeahan
Copy link
Member

ebeahan commented Sep 17, 2025

@michel-laterman I'm also adding you as a reviewer here since you have additional context of this OTel integration work from reviewing #5169.

Copy link
Contributor

@michel-laterman michel-laterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good, mainly have smaller nitpicks

@elastic-sonarqube
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
11.1% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube

@jsoriano jsoriano merged commit 2756c09 into elastic:main Sep 22, 2025
12 of 13 checks passed
@jsoriano jsoriano deleted the prepare-otel-exporter-es branch September 22, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-skip Skip notification from the automated backport with mergify Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

5 participants