Repository navigation
Fix A365 review issues: wire processors into distro, fix types - #22
Merged
Hector Hernandez (hectorhdzg) merged 2 commits intoApr 18, 2026
Merged
Hector Hernandez (hectorhdzg) merged 2 commits into
Hector Hernandez (hectorhdzg) merged 2 commits into
Conversation
Hector Hernandez (hectorhdzg)
commented
Apr 18, 2026
Member
- Wire A365SpanProcessor (baggage enrichment) and PerRequestSpanProcessor into distro.ts when A365 is enabled, replacing SimpleSpanProcessor
- Fix PerRequestSpanProcessor.onStart to accept Span instead of ReadableSpan per the OTel SpanProcessor interface contract
- Remove 'implements Disposable' from OpenTelemetryScope and BaggageScope (ES2022 lib does not include esnext.disposable)
- Widen isParentSpanRef parameter type from ParentContext to unknown
- Add trim() to parseEnvBoolean for whitespace-resilient env var parsing
- Remove unwired A365_OBSERVABILITY_LOG_LEVEL from docs and config
- Add attribute assertions to A365SpanProcessor tests
- Add OutputScope unit tests (creation, tenantId validation, message recording, overwrite, raw dict, user details)
…ve tests - Wire A365SpanProcessor (baggage enrichment) and PerRequestSpanProcessor into distro.ts when A365 is enabled, replacing SimpleSpanProcessor - Fix PerRequestSpanProcessor.onStart to accept Span instead of ReadableSpan per the OTel SpanProcessor interface contract - Remove 'implements Disposable' from OpenTelemetryScope and BaggageScope (ES2022 lib does not include esnext.disposable) - Widen isParentSpanRef parameter type from ParentContext to unknown - Add trim() to parseEnvBoolean for whitespace-resilient env var parsing - Remove unwired A365_OBSERVABILITY_LOG_LEVEL from docs and config - Add attribute assertions to A365SpanProcessor tests - Add OutputScope unit tests (creation, tenantId validation, message recording, overwrite, raw dict, user details)
Hector Hernandez (hectorhdzg)
requested review from
Jackson Weber (JacksonWeber),
Nev (MSNev),
Leighton Chen (lzchen) and
Radhika Gupta (rads-1996)
as code owners
April 18, 2026 00:17
Copilot started reviewing on behalf of
Hector Hernandez (hectorhdzg)
April 18, 2026 00:18
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses several A365 observability integration and typing issues by properly wiring A365 span processors into the distro setup, aligning SpanProcessor typings with the OpenTelemetry contract, and tightening documentation/config consistency. It also expands unit test coverage around A365 span enrichment and OutputScope behavior.
Changes:
- Wire
A365SpanProcessor(baggage→attribute enrichment) andPerRequestSpanProcessor(per-trace buffered export) intosrc/distro/distro.tswhen A365 is enabled. - Fix
PerRequestSpanProcessor.onStarttyping to acceptSpan(per OTelSpanProcessorcontract) and adjust root-span detection. - Remove
Disposableinterface usage from A365 scopes, improve env var boolean parsing (trim()), update docs/config, and add/extend unit tests (A365SpanProcessor + OutputScope).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/internal/unit/a365/scopes.test.ts | Adds unit tests for OutputScope creation, validation, and output message serialization. |
| test/internal/unit/a365/a365SpanProcessor.test.ts | Updates A365SpanProcessor tests to assert tenant/agent attributes and other enrichment behavior. |
| src/distro/distro.ts | Wires A365 processors into the distro span processor pipeline when A365 is enabled. |
| src/a365/scopes/OpenTelemetryScope.ts | Removes implements Disposable from the base scope type. |
| src/a365/processors/PerRequestSpanProcessor.ts | Updates onStart signature to Span and adds context-based root detection. |
| src/a365/middleware/BaggageBuilder.ts | Removes implements Disposable from BaggageScope. |
| src/a365/context.ts | Widens isParentSpanRef parameter type to unknown and adjusts internal typing. |
| src/a365/configuration/A365Configuration.ts | Makes boolean env parsing whitespace-resilient and removes the unwired log level env var constant. |
| README.md | Removes mention of unwired A365_OBSERVABILITY_LOG_LEVEL. |
| MIGRATION_A365.md | Removes mention of unwired A365_OBSERVABILITY_LOG_LEVEL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Leighton Chen (lzchen)
approved these changes
Apr 18, 2026
Hector Hernandez (hectorhdzg)
merged commit Apr 18, 2026
ebcdaa0
into
microsoft:main
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.