Skip to content

Surface OTLP export failures in observability step summary#32761

Merged
pelikhan merged 2 commits into
mainfrom
copilot/grafana-otel-advisor-otlp-export-failure-improveme
May 17, 2026
Merged

Surface OTLP export failures in observability step summary#32761
pelikhan merged 2 commits into
mainfrom
copilot/grafana-otel-advisor-otlp-export-failure-improveme

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 17, 2026

OTLP export failures were already persisted locally but not shown in the GitHub Actions Observability summary, creating a false “healthy” signal when backend export was broken. This change makes export health explicit in the run page summary, even when the conclusion span cannot be delivered.

  • Observability summary now reports OTLP export health

    • generate_observability_summary.cjs now reads:
      • /tmp/gh-aw/otlp-export-errors.count
      • /tmp/gh-aw/otlp-export-errors.jsonl
    • Summary now includes:
      • otlp export errors count
      • warning line when failures exist
      • per-endpoint failure details (host, optional status, reason)
  • Failure details are parsed defensively

    • Missing files, malformed lines, and invalid entries are ignored without failing summary generation.
    • Output remains stable and additive to existing Observability fields.
  • Focused test coverage updated

    • generate_observability_summary.test.cjs now asserts:
      • OTLP error count rendering
      • warning visibility when count > 0
      • details list rendering from JSONL entries
      • zero-count behavior when files are absent
lines.push(`- **otlp export errors**: ${data.otlpExportErrors}`);
if (data.otlpExportErrors > 0) {
  lines.push("- ⚠️ OTLP export failures detected; telemetry may not be visible in the backend.");
}
if (data.otlpExportErrorDetails.length > 0) {
  lines.push("- **otlp export failure details**:");
}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add OTLP export failure visibility in workflow step summary Surface OTLP export failures in observability step summary May 17, 2026
Copilot AI requested a review from pelikhan May 17, 2026 05:57
@pelikhan pelikhan marked this pull request as ready for review May 17, 2026 05:58
Copilot AI review requested due to automatic review settings May 17, 2026 05:58
@pelikhan pelikhan merged commit 7bbbf11 into main May 17, 2026
@pelikhan pelikhan deleted the copilot/grafana-otel-advisor-otlp-export-failure-improveme branch May 17, 2026 05:59
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

This pull request makes OTLP export failures visible in the GitHub Actions “Observability” step summary by reading locally persisted export error count and JSONL failure details and rendering them in the run summary.

Changes:

  • Add OTLP export error count + warning line to the observability step summary output.
  • Parse and render per-endpoint OTLP export failure details from a JSONL file (defensively).
  • Extend Vitest coverage to assert OTLP error count/detail rendering and absent-files behavior.
Show a summary per file
File Description
actions/setup/js/generate_observability_summary.cjs Reads OTLP export error count/details from /tmp/gh-aw and surfaces them in the Observability step summary.
actions/setup/js/generate_observability_summary.test.cjs Adds assertions and fixtures to validate OTLP export error count/warning/details rendering, including zero-count when files are absent.

Copilot's findings

Tip

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines +166 to +170
if (data.otlpExportErrorDetails.length > 0) {
lines.push("- **otlp export failure details**:");
for (const detail of data.otlpExportErrorDetails) {
lines.push(` - ${detail}`);
}
Comment on lines +57 to +61
fs.writeFileSync("/tmp/gh-aw/otlp-export-errors.count", "2\n");
fs.writeFileSync(
"/tmp/gh-aw/otlp-export-errors.jsonl",
[JSON.stringify({ host: "collector-a.example.com:4318", status: 401, reason: "Unauthorized" }), JSON.stringify({ host: "collector-b.example.com:4318", reason: "upstream timeout" })].join("\n")
);
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.

[grafana-otel-advisor] OTel improvement: surface OTLP export failures in the workflow step summary

3 participants