Repository navigation
Fix signal-aware OTLP protobuf logs and Azure log endpoints - #74729
Conversation
Select logs protocol independently, encode ExportLogsServiceRequest, and route Azure session logs to the Microsoft-OTLP-Logs stream. Preserve per-collector credentials and existing trace transport behavior. Co-authored-by: Copilot App <[email protected]>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully!
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
Reviewed the changed encoder, transport, session-log, and documentation paths. I found no actionable correctness, performance, or security issues in the changed lines. The specialist pass was unavailable because it returned partial, non-JSONL output after a tool-permission failure; final assessment is based on the independent static review.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the signal-specific OTLP encoding and Azure log-routing changes.
No open issues 🎉
What changed in this PR
This PR fixes compact-session log exports in gh-aw by adding signal-aware OTLP protobuf encoding and routing Azure logs to their separate stream.
Changes:
- Select trace and log protocols independently and encode logs as
ExportLogsServiceRequest. - Rewrite Azure log endpoints to
Microsoft-OTLP-Logswhile preserving query parameters and per-endpoint credentials. - Add encoding, transport, and compact-session regression tests, and document the configuration.
| File | Description |
|---|---|
docs/src/content/docs/reference/open-telemetry.mdx |
Documents signal-specific protocols and Azure logs routing. |
docs/src/content/docs/reference/compiler-enterprise-environment-controls.md |
Clarifies compact-session encoding, byte limits, and endpoint behavior. |
actions/setup/js/send_otlp_span.cjs |
Selects the matching protocol, encoder, and endpoint for each signal. |
actions/setup/js/send_otlp_session_logs.test.cjs |
Adds protobuf session-export and local-collector coverage. |
actions/setup/js/otlp_protobuf.test.cjs |
Tests log encoding, protocol isolation, proxy transport, and Azure routing. |
actions/setup/js/otlp_protobuf.cjs |
Adds the logs protobuf encoder and shares resource and scope definitions. |
Review effort: Balanced (auto)
There was a problem hiding this comment.
What this change does: It adds a separate OTLP protobuf encoder for logs and routes traces and logs through signal-specific protocols and Azure endpoints. The changed tests cover encoding, direct and proxy transport, compact sessions, and the documented configuration.
Nice to have:
-
Azure logs test repeats identical assertions (
actions/setup/js/otlp_protobuf.test.cjs:L302-317)- What this is: The test runs the same endpoint-rewrite assertions once for JSON and once for protobuf.
- Problem: It does not assert either body or Content-Type, and both protocols are already covered by the preceding transport test, so the second case adds no signal.
- Fix: Keep one default-protocol case here and leave wire-format checks in the transport test.
- If we skip it: Future Azure endpoint changes must maintain a duplicated case whose assertions cannot distinguish the protocols.
Verdict: Ship.
Lean: -1 lines possible.
Generated by ✂️ Ponytail Reviewer for #74729 · codex · routed: gpt56 max · ~4 AIC · ⌖ ~1 AIC · ⊞ 118
Comment /ponytail to run again
| expect(secondOptions.input).toEqual(firstOptions.input); | ||
| }); | ||
|
|
||
| it.each(["http/json", "http/protobuf"])("uses the independent Azure logs stream with %s on both transports", async protocol => { |
There was a problem hiding this comment.
What this is: This matrix runs the same Azure URL assertions once per wire protocol. Problem: This test never checks the body or Content-Type, and both protocols are already covered by the preceding proxy test, so the second run adds no coverage. Fix: Use one default-protocol case here and keep encoding assertions in the transport test. If we skip it: The test stays duplicated and future Azure endpoint edits must maintain two indistinguishable cases.
|
🎉 This pull request is included in a new release. Release: |
Summary
Compact-session log exports fail before making a network request when
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobufbecause the shared transport passesresourceLogsto the trace-only encoder. Azure logs also incorrectly retain theMicrosoft-OTLP-Tracesstream segment.OTEL_EXPORTER_OTLP_LOGS_PROTOCOLorOTEL_EXPORTER_OTLP_TRACES_PROTOCOLindependently, with the global protocol as the fallback.ExportLogsServiceRequest, reusing the existing typed AnyValue, resource, and scope encoding while preserving exact timestamps and trace/span IDs.Microsoft-OTLP-Logs/otlp/v1/logs, preserving DCE, DCR, query parameters, and per-collector credentials. Existing trace and generic collector behavior is unchanged.Existing compiler configuration is sufficient; no new frontmatter fields or credentials are required. The Azure DCR must support the logs stream.
Validation
make fmt-cjs && make lint-cjspassed.npm --prefix actions/setup/js run typecheckpassed.make agent-report-progresspassed, including 103 encoding/session-log tests.The broader
send_otlp_span.test.cjssuite has two unrelated AI-credit assertion failures (442 tests passed). The same behavior was reproduced with the unmodified HEAD exporter: it emitsintValue:1000for both a1000.5and an invalid environment budget. Those pre-existing failures are outside this fix.No live workflow dispatch or Azure deployment was performed.