Skip to content

Otel execution failure on the span - #319

Merged
grahamc merged 2 commits into
mainfrom
otel-execution-failure-on-the-span
Sep 9, 2026
Merged

grahamc merged 2 commits into
mainfrom
otel-execution-failure-on-the-span

Conversation

@grahamc

@grahamc grahamc commented Sep 9, 2026

Copy link
Copy Markdown
Member
Description
Checklist
  • Tested functionality against a test repository (see "How to test changes")
  • Added or updated relevant documentation (leave unchecked if not applicable)

Summary by CodeRabbit

  • Bug Fixes
    • Improved reporting for failed Nix executions by recording span errors and providing detailed error information in failure logs.

detsys.execution_failure was a PostHog event.
It carried detsys.exit_code, which the span already carries, and it fired at
the same moment the span ended.

The exec ignores the return code, thus nothing throws, thus the span stayed
unset while the step failed.
recordSpanError now puts the error status on the span, and Honeycomb can
therefore count a failed update as a failure.

We send nothing to PostHog now, so the event goes.
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • dist/index.js is excluded by !**/dist/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: a2ed644e-2e39-498e-9c7d-3320306e3c95

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 7e8cc42d-1719-4062-8d70-484b4ef36868

📥 Commits

Reviewing files that changed from the base of the PR and between f3319de and 91364a2.

⛔ Files ignored due to path filters (2)
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (1)
  • src/index.ts

Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

The non-zero Nix exit path now records an error on the span and passes an Error object to log.setFailed.

Changes

Span error reporting

Layer / File(s) Summary
Update failure reporting
src/index.ts
Imports recordSpanError. The non-zero exit path records the span error and logs an Error containing the exit code.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 91364

Failed Nix executions now mark their telemetry spans as errors while retaining failure logging and exit-code context. No current merge-blocking risk is identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: recording execution failures on the OpenTelemetry span. It is concise and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch otel-execution-failure-on-the-span

Comment @coderabbitai help to get the list of available commands.

gustavderdrache
gustavderdrache previously approved these changes Sep 9, 2026
@grahamc
grahamc merged commit 948b60f into main Sep 9, 2026
5 checks passed
@grahamc
grahamc deleted the otel-execution-failure-on-the-span branch September 9, 2026 14:02
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.

2 participants