Skip to content

add k8s_leader_elector otel extension #9065

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rogercoll
Copy link
Contributor

What does this PR do?

Adds the K8s leader elector Otel Extension: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/k8sleaderelector

Why is it important?

Kube-stack Helm Chart is going to rely on this extension for cluster-wide events and metrics: open-telemetry/opentelemetry-helm-charts#1735

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

Disruptive User Impact

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@rogercoll rogercoll requested a review from a team as a code owner July 18, 2025 08:32
Copy link
Contributor

mergify bot commented Jul 18, 2025

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

  • backport-./d./d is the label that automatically backports 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.

@rogercoll rogercoll added backport-active-all Automated backport with mergify to all the active branches backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches backport-active-8 Automated backport with mergify to all the active 8.[0-9]+ branches and removed backport-active-all Automated backport with mergify to all the active branches labels Jul 18, 2025
@pkoutsovasilis
Copy link
Contributor

@rogercoll , thinking out loud, are you sure we should add new components to already released versions (backport labels)? 🙂

cc @cmacknz @ebeahan @AlexanderWert

@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Jul 18, 2025
@elasticmachine
Copy link
Collaborator

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

@rogercoll
Copy link
Contributor Author

@rogercoll , thinking out loud, are you sure we should add new components to already released versions (backport labels)? 🙂

Not a strong opinion, the idea for backporting to active-9 and active-8 was to be able to unify the kube-stack configuration once open-telemetry/opentelemetry-helm-charts#1735 is available across all supported branches. (Similar to #8917)

Would you suggest targeting new major and minor versions only?

@pkoutsovasilis
Copy link
Contributor

What you say makes sense to me but I am not sure it is aligned with the "accepted changes for already released versions" policy we might have. I trust though that one of, if not all, of @ebeahan @pierrehilbert @AlexanderWert @cmacknz do know 🙂

@pierrehilbert
Copy link
Contributor

pierrehilbert commented Jul 18, 2025

EDIT: after re-reading and discussed with @pkoutsovasilis please forget my previous comment.
I'm not against backporting that one as we did it for the other PR

Copy link

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

cc @rogercoll

@swiatekm
Copy link
Contributor

@rogercoll the extension you're adding here depends on the otel core framework 0.129.0, but we have earlier versions in other branches and don't plan to upgrade them. Will that work?

@rogercoll rogercoll added backport-9.0 Automated backport to the 9.0 branch backport-8.19 Automated backport to the 8.19 branch backport-9.1 Automated backport to the 9.1 branch and removed backport-active-9 Automated backport with mergify to all the active 9.[0-9]+ branches backport-active-8 Automated backport with mergify to all the active 8.[0-9]+ branches labels Jul 31, 2025
@rogercoll
Copy link
Contributor Author

@rogercoll the extension you're adding here depends on the otel core framework 0.129.0, but we have earlier versions in other branches and don't plan to upgrade them. Will that work?

Good point, and no, it does not compile the agent correctly due to some APIs dependencies misalignment. Changed the target backports to the branches updated to 0.129.0 collector dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.19 Automated backport to the 8.19 branch backport-9.0 Automated backport to the 9.0 branch backport-9.1 Automated backport to the 9.1 branch 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.

5 participants