Skip to content

Conversation

@swiatekm
Copy link
Contributor

@swiatekm swiatekm commented Oct 29, 2025

What does this PR do?

It makes the EDOT collector handle unix signals correctly.

Why is it important?

The EDOT collector should shut down gracefully when receiving a SIGINT or SIGTERM. If it doesn't, there's potential for resources not being freed or state on disk being corrupted.

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

Use the following configuration:

receivers: nop: exporters: nop: service: telemetry: metrics: level: none pipelines: logs: receivers: [nop] exporters: [nop]

Run the edot collector with it and send a SIGINT or SIGTERM to it. You'll see the components shut down before the collector exits.

Related issues

@mergify
Copy link
Contributor

mergify bot commented Oct 29, 2025

This pull request does not have a backport label. Could you fix it @swiatekm? 🙏
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.
@swiatekm swiatekm added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team backport-active-all Automated backport with mergify to all the active branches labels Oct 31, 2025
@swiatekm swiatekm marked this pull request as ready for review October 31, 2025 13:48
@swiatekm swiatekm requested a review from a team as a code owner October 31, 2025 13:48
@elasticmachine
Copy link
Contributor

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

@swiatekm swiatekm requested a review from ycombinator November 3, 2025 13:00
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

cc @swiatekm

@swiatekm swiatekm merged commit 40bc68c into main Nov 3, 2025
21 checks passed
@swiatekm swiatekm deleted the fix/otel-signals branch November 3, 2025 19:16
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

@Mergifyio backport 8.19 9.1 9.2

@mergify
Copy link
Contributor

mergify bot commented Nov 3, 2025

backport 8.19 9.1 9.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 3, 2025
* Handle unix signals in EDOT * Add changelog entry * Fix changelog entry * Move removing agent config file to fixture.ConfigureOtel (cherry picked from commit 40bc68c)
mergify bot pushed a commit that referenced this pull request Nov 3, 2025
* Handle unix signals in EDOT * Add changelog entry * Fix changelog entry * Move removing agent config file to fixture.ConfigureOtel (cherry picked from commit 40bc68c)
mergify bot pushed a commit that referenced this pull request Nov 3, 2025
* Handle unix signals in EDOT * Add changelog entry * Fix changelog entry * Move removing agent config file to fixture.ConfigureOtel (cherry picked from commit 40bc68c)
ebeahan pushed a commit that referenced this pull request Nov 3, 2025
* Handle unix signals in EDOT * Add changelog entry * Fix changelog entry * Move removing agent config file to fixture.ConfigureOtel (cherry picked from commit 40bc68c) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
swiatekm added a commit that referenced this pull request Nov 4, 2025
* Correctly handle unix signals in EDOT (#10908) * Handle unix signals in EDOT * Add changelog entry * Fix changelog entry * Move removing agent config file to fixture.ConfigureOtel (cherry picked from commit 40bc68c) * Fix conflict * Fix assertion in otel shutdown test --------- Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
ebeahan pushed a commit that referenced this pull request Nov 4, 2025
* Handle unix signals in EDOT * Add changelog entry * Fix changelog entry * Move removing agent config file to fixture.ConfigureOtel (cherry picked from commit 40bc68c) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
hayotbisonai pushed a commit to hayotbisonai/elastic-agent that referenced this pull request Nov 23, 2025
* Handle unix signals in EDOT * Add changelog entry * Fix changelog entry * Move removing agent config file to fixture.ConfigureOtel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-active-all Automated backport with mergify to all the active branches bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

4 participants