Skip to content

Revert "Replace vendored a365 with npm packages direct dependencies (… - #27

Merged
Hector Hernandez (hectorhdzg) merged 4 commits into
microsoft:mainfrom
hectorhdzg:hectorhdzg/revert-a365-vendoring
Apr 21, 2026
Merged

Hector Hernandez (hectorhdzg) merged 4 commits into
microsoft:mainfrom
hectorhdzg:hectorhdzg/revert-a365-vendoring

Conversation

@hectorhdzg

Copy link
Copy Markdown
Member

…#25)"

This reverts commit 7f986ee.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-repo A365Configuration + 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.

Comment thread src/a365/configuration/A365Configuration.ts Outdated
Comment thread src/a365/configuration/A365Configuration.ts Outdated
Comment thread src/a365/configuration/A365Configuration.ts
Comment thread src/a365/exporter/utils.ts Outdated
Comment thread src/a365/exporter/utils.ts
Comment thread src/a365/processors/PerRequestSpanProcessor.ts Outdated
Comment thread src/a365/processors/PerRequestSpanProcessor.ts Outdated
Comment thread src/a365/processors/PerRequestSpanProcessor.ts Outdated
Comment thread src/a365/processors/PerRequestSpanProcessor.ts Outdated
@hectorhdzg
Hector Hernandez (hectorhdzg) merged commit e879e74 into microsoft:main Apr 21, 2026
5 checks passed
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.

3 participants