Skip to content

Promote github.actions.run_url from resource-only to span attribute in OTLP exports#34898

Merged
mnkiefer merged 4 commits into
mainfrom
copilot/otel-advisor-promote-github-actions-run-url
May 26, 2026
Merged

Promote github.actions.run_url from resource-only to span attribute in OTLP exports#34898
mnkiefer merged 4 commits into
mainfrom
copilot/otel-advisor-promote-github-actions-run-url

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 26, 2026

github.actions.run_url was only emitted on OTLP resource attributes, which many backends (including Sentry) do not index as searchable span fields. This left incident responders with gh-aw.run.id but no direct clickable run link on failing gh-aw.<job>.conclusion spans.

  • What changed

    • Added a shared helper in actions/setup/js/send_otlp_span.cjs to construct github.actions.run_url when GITHUB_REPOSITORY and GITHUB_RUN_ID are present.
    • Kept existing resource-level emission unchanged.
    • Added span-level emission of github.actions.run_url in:
      • sendJobSetupSpan
      • sendJobConclusionSpan
  • Behavior

    • github.actions.run_url now appears on both resource and span attributes.
    • Uses GITHUB_SERVER_URL when available, otherwise falls back to https://github.com.
    • Attribute is omitted when repository/run context is missing (unchanged semantics).
  • Test updates

    • Extended existing send_otlp_span.test.cjs assertions to verify github.actions.run_url on span attributes (presence and omission cases) for both setup and conclusion spans.
const runUrlAttr = buildGitHubActionsRunUrlAttribute(repository, runId);
if (runUrlAttr) {
  resourceAttributes.push(runUrlAttr); // existing behavior preserved
  attributes.push(runUrlAttr);         // new span-level indexing path
}

Copilot AI and others added 2 commits May 26, 2026 08:18
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve OTel instrumentation by promoting github.actions.run_url to span attribute Promote github.actions.run_url from resource-only to span attribute in OTLP exports May 26, 2026
Copilot AI requested a review from mnkiefer May 26, 2026 08:25
@mnkiefer mnkiefer marked this pull request as ready for review May 26, 2026 08:42
Copilot AI review requested due to automatic review settings May 26, 2026 08:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Promotes github.actions.run_url into OTLP span attributes (in addition to existing resource attributes) so trace backends that don’t index resource attributes can still surface a clickable GitHub Actions run link on failing spans.

Changes:

  • Added a shared helper in actions/setup/js/send_otlp_span.cjs to construct github.actions.run_url when GITHUB_REPOSITORY and GITHUB_RUN_ID are available.
  • Emitted github.actions.run_url on span attributes for both sendJobSetupSpan and sendJobConclusionSpan (while preserving resource-level emission).
  • Updated send_otlp_span.test.cjs to assert presence/omission of github.actions.run_url on both resource and span attributes, including GITHUB_SERVER_URL behavior.
Show a summary per file
File Description
actions/setup/js/send_otlp_span.cjs Adds a helper and emits github.actions.run_url at the span level for setup/conclusion spans.
actions/setup/js/send_otlp_span.test.cjs Extends OTLP payload assertions to cover run URL at both resource + span levels and server URL overrides.
.github/workflows/workflow-skill-extractor.lock.yml Adds skills artifact path capture and a “Restore inline skills from activation artifact” step (scope not reflected in PR description).
.github/workflows/*.lock.yml Many workflow lock files appear to be mechanically updated to restore inline skills from the activation artifact and include skills in artifact capture.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (1)

actions/setup/js/send_otlp_span.test.cjs:3951

  • Same as the sendJobSetupSpan run_url tests: this test mutates GITHUB_SERVER_URL but doesn’t ensure it’s restored after the test run (it’s not part of the suite’s env reset list). Please ensure GITHUB_SERVER_URL is restored/cleared so this doesn’t leak into other tests.
  • Files reviewed: 235/235 changed files
  • Comments generated: 2

Comment thread .github/workflows/workflow-skill-extractor.lock.yml
Comment thread actions/setup/js/send_otlp_span.test.cjs
@github-actions
Copy link
Copy Markdown
Contributor

``
@copilot review all comments
Please post a brief validation/status summary so maintainers can see the current blocker.

Generated by 👨‍🍳 PR Sous Chef · gpt54 7M ·

@mnkiefer
Copy link
Copy Markdown
Collaborator

@copilot review all comments
Please post a brief validation/status summary so maintainers can see the current blocker.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 26, 2026

@copilot review all comments
Please post a brief validation/status summary so maintainers can see the current blocker.

Status update:

  • Addressed the actionable test-isolation issue in 287d938 by adding GITHUB_SERVER_URL to the shared env reset list in send_otlp_span.test.cjs.
  • Validation: npm run test:js -- send_otlp_span.test.cjs (324/324 passing) and prettier --check send_otlp_span.test.cjs both pass.
  • Current blocker: PR scope still includes the earlier workflow lockfile changes (from 71bc524) that are not represented in the PR description; this should be split/reverted or explicitly documented before merge.
  • Note: automated parallel code-review service returned an external 400 error twice (CodeQL marked trivial and skipped).

Copilot AI requested a review from mnkiefer May 26, 2026 10:37
@mnkiefer
Copy link
Copy Markdown
Collaborator

@copilot Recompile workflows

@mnkiefer mnkiefer merged commit 8074cc0 into main May 26, 2026
@mnkiefer mnkiefer deleted the copilot/otel-advisor-promote-github-actions-run-url branch May 26, 2026 11:11
Copilot stopped work on behalf of mnkiefer due to an error May 26, 2026 11:11
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.

3 participants