fix(otel): address staging pr comments for trigger otel#4586
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The new parser is more defensive (trims whitespace, skips malformed/empty entries, and preserves raw values if URL-decoding fails), reducing config-related telemetry export failures. Reviewed by Cursor Bugbot for commit 8ace24c. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@BugBot review |
Greptile SummaryThis PR extracts the duplicated OTLP header-parsing logic from
Confidence Score: 5/5Safe to merge — this is a focused deduplication that also closes a crash path in trigger.config.ts. All three files are touched only to replace identical logic with the new shared utility. The shared implementation is strictly more defensive than either predecessor: it adds an early-return for empty input and wraps decodeURIComponent in a try/catch that the old trigger.config.ts version was missing. No new logic is introduced, no interfaces change, and the call-sites are identical. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant A as instrumentation-node.ts
participant B as trigger.config.ts
participant C as lib/monitoring/otlp.ts
Note over A,B: Before PR — each file had its own parseOtlpHeaders
A->>A: parseOtlpHeadersEnv(env var)
B->>B: parseOtlpHeaders(grafanaHeaders) [no try/catch on decodeURIComponent]
Note over A,B: After PR — both delegate to shared utility
A->>C: parseOtlpHeaders(process.env.OTEL_EXPORTER_OTLP_HEADERS)
C-->>A: "Record<string, string>"
B->>C: parseOtlpHeaders(grafanaHeaders)
C-->>B: "Record<string, string>"
Note over C: try/catch on decodeURIComponent preserves raw value on URIError
Reviews (1): Last reviewed commit: "fix(otel): address staging pr comments f..." | Re-trigger Greptile |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8ace24c. Configure here.
Summary
Address staging comments by reusing shared header extractor.
Type of Change
Testing
Checklist
Screenshots/Videos