Repository navigation
Revert "Replace vendored a365 with npm packages direct dependencies (… - #27
Merged
Hector Hernandez (hectorhdzg) merged 4 commits intoApr 21, 2026
Conversation
…icrosoft#25)" This reverts commit 7f986ee.
Hector Hernandez (hectorhdzg)
requested review from
Jackson Weber (JacksonWeber),
Nev (MSNev),
Leighton Chen (lzchen) and
Radhika Gupta (rads-1996)
as code owners
April 21, 2026 22:31
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Reverts the prior integration approach that relied on @microsoft/agents-a365-observability / @microsoft/agents-a365-runtime by bringing the A365 observability implementation back in-repo (configuration, scopes, processors, exporter) and updating the distro + docs/samples accordingly.
Changes:
- Removes external A365 npm dependencies and wires up in-repo A365 configuration + exporter pipeline in
useMicrosoftOpenTelemetry(). - Adds in-repo A365 public API surface (scopes, baggage, context propagation, processors, exporter) and re-exports it from the package root.
- Replaces the old integration test with comprehensive unit tests for scopes, processors, config parsing, baggage, and context propagation.
Reviewed changes
Copilot reviewed 46 out of 47 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| test/internal/unit/a365Integration.test.ts | Removes prior distro-level integration test that depended on external ObservabilityManager. |
| test/internal/unit/a365/scopes.test.ts | Adds unit coverage for A365 scope behavior, attributes, serialization, and span timing. |
| test/internal/unit/a365/perRequestSpanProcessor.test.ts | Adds coverage for per-request buffering/export behavior and env-var configuration parsing. |
| test/internal/unit/a365/messageUtils.test.ts | Adds coverage for message normalization + serialization utilities. |
| test/internal/unit/a365/contextPropagation.test.ts | Adds coverage for W3C trace context inject/extract and explicit parent-span linking. |
| test/internal/unit/a365/baggageBuilder.test.ts | Adds coverage for baggage builder/fluent API and scope execution. |
| test/internal/unit/a365/a365SpanProcessor.test.ts | Adds coverage for baggage→span attribute enrichment and attribute registries. |
| test/internal/unit/a365/a365Configuration.test.ts | Adds coverage for config precedence (defaults/options/json/env) and env var name constants. |
| src/types.ts | Moves A365Options type import to new in-repo A365 module. |
| src/shared/jsonConfig.ts | Updates A365Options import source to in-repo A365 module. |
| src/index.ts | Re-exports A365 configuration + manual telemetry API surface from @microsoft/opentelemetry. |
| src/distro/types.ts | Re-exports A365Options from in-repo A365 module. |
| src/distro/distro.ts | Replaces ObservabilityManager.start() flow with in-repo A365Configuration + Agent365Exporter + processors. |
| src/a365/utils/utils.ts | Adds small env var helper utility. |
| src/a365/scopes/index.ts | Adds barrel export for scope classes. |
| src/a365/scopes/OutputScope.ts | Adds OutputScope implementation for output-message spans. |
| src/a365/scopes/OpenTelemetryScope.ts | Adds base scope class handling span lifecycle, tags, message recording, and parent context. |
| src/a365/scopes/InvokeAgentScope.ts | Adds InvokeAgentScope implementation (agent invocation span + attributes). |
| src/a365/scopes/InferenceScope.ts | Adds InferenceScope implementation (model inference span + attributes). |
| src/a365/scopes/ExecuteToolScope.ts | Adds ExecuteToolScope implementation (tool execution span + args/result serialization). |
| src/a365/processors/util.ts | Adds attribute key registries for baggage→span enrichment. |
| src/a365/processors/index.ts | Adds barrel export for processors and options. |
| src/a365/processors/PerRequestSpanProcessor.ts | Adds per-request buffering processor for exporting under request-scoped auth context. |
| src/a365/processors/A365SpanProcessor.ts | Adds processor that stamps baggage entries onto span attributes. |
| src/a365/middleware/index.ts | Adds barrel export for baggage middleware utilities. |
| src/a365/middleware/BaggageBuilder.ts | Adds fluent baggage builder and scope runner for context propagation. |
| src/a365/message-utils.ts | Adds message normalization/serialization utilities + safe JSON serialization helper. |
| src/a365/index.ts | Adds A365 module public API surface (configuration, exporter, scopes, constants, contracts, processors, context/token context). |
| src/a365/exporter/utils.ts | Adds exporter utilities: identity partitioning, ID formatting, truncation, endpoint resolution. |
| src/a365/exporter/index.ts | Adds exporter barrel export. |
| src/a365/exporter/ExporterEventNames.ts | Adds exporter event name enum for logging. |
| src/a365/exporter/Agent365ExporterOptions.ts | Adds exporter options + resolved defaults. |
| src/a365/exporter/Agent365Exporter.ts | Adds HTTP exporter that partitions spans and sends OTLP-like payloads with Bearer auth. |
| src/a365/contracts.ts | Adds A365 contracts (messages, details, span config, parent context types). |
| src/a365/context/tokenContext.ts | Adds ALS-backed per-request export-token context utilities. |
| src/a365/context.ts | Adds parent span ref helpers and W3C trace context inject/extract utilities. |
| src/a365/constants.ts | Adds A365 constants for span names and attribute keys. |
| src/a365/configuration/index.ts | Adds configuration barrel export. |
| src/a365/configuration/A365ConfigurationOptions.ts | Adds A365Options + ClusterCategory + baggage/hosting option types. |
| src/a365/configuration/A365Configuration.ts | Adds config resolution logic (defaults/options/json/env) for A365. |
| samples/src/a365ManualScopes.ts | Updates sample imports to use @microsoft/opentelemetry for manual A365 APIs. |
| samples/package.json | Removes @microsoft/agents-a365-observability dependency from samples. |
| package.json | Removes @microsoft/agents-a365-observability and @microsoft/agents-a365-runtime dependencies. |
| PLANNING.md | Updates plan text to reflect in-repo A365 migration + gap analysis. |
| MIGRATION_A365.md | Updates migration guidance to reflect new re-exports and renamed types. |
Comments suppressed due to low confidence (1)
src/distro/distro.ts:1
- The PR metadata says this is a straight revert of a prior commit, but the distro integration has been materially redesigned (switching from
ObservabilityManager.start()to in-repoA365Configuration+Agent365Exporter+ processors). If the intent is a full in-repo migration (not just reverting dependency wiring), consider updating the PR description to reflect the broader functional change so reviewers can validate the correct behavior/regression scope.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Radhika Gupta (rads-1996)
approved these changes
Apr 21, 2026
Hector Hernandez (hectorhdzg)
merged commit Apr 21, 2026
e879e74
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.
…#25)"
This reverts commit 7f986ee.