Skip to content

Fix missing exec parent spans in docker environments#2694

Merged
plengauer merged 4 commits into
mainfrom
plengauer-patch-5
Dec 19, 2025
Merged

Fix missing exec parent spans in docker environments#2694
plengauer merged 4 commits into
mainfrom
plengauer-patch-5

Conversation

@plengauer

Copy link
Copy Markdown
Owner

parent spans got dropped because several processes share SDK and SPAN_AUTO_END was reset on next span start

@plengauer plengauer self-assigned this Dec 17, 2025
@plengauer plengauer marked this pull request as ready for review December 17, 2025 23:17
Copilot AI review requested due to automatic review settings December 17, 2025 23:17
@plengauer plengauer enabled auto-merge (squash) December 17, 2025 23:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical issue where parent spans were being dropped in Docker environments due to multiple processes sharing the SDK and having SPAN_AUTO_END reset on subsequent span starts. The fix replaces direct _otel_sdk_communicate 'SPAN_AUTO_END' calls with _otel_end_script and updates shell invocations to use $_otel_shell instead of hardcoded sh.

Key changes:

  • Replace _otel_sdk_communicate 'SPAN_AUTO_END' with _otel_end_script to properly handle span cleanup
  • Update shell invocations from hardcoded sh to $_otel_shell variable for consistency
  • Apply fixes across three exec injection functions

Comment thread src/usr/share/opentelemetry_shell/agent.sh Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 17, 2025 23:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

actions-bot-pl
actions-bot-pl previously approved these changes Dec 17, 2025
@plengauer plengauer linked an issue Dec 17, 2025 that may be closed by this pull request
Copilot AI review requested due to automatic review settings December 18, 2025 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread src/usr/share/opentelemetry_shell/agent.sh
Comment thread src/usr/share/opentelemetry_shell/agent.sh
Comment thread src/usr/share/opentelemetry_shell/agent.sh
Copilot AI review requested due to automatic review settings December 18, 2025 21:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@plengauer plengauer merged commit edb874f into main Dec 19, 2025
1104 of 1106 checks passed
@plengauer plengauer deleted the plengauer-patch-5 branch December 19, 2025 11:16
actions-bot-pl pushed a commit that referenced this pull request Dec 19, 2025
Co-authored-by: Philipp Lengauer <100447901+plengauer@users.noreply.github.com>
actions-bot-pl added a commit that referenced this pull request Dec 19, 2025
Co-authored-by: plengauer <100447901+plengauer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renovate injection is broken

4 participants