# What changed in @microsoft/agents-a365-observability

> 80 changes in @microsoft/agents-a365-observability 1 to 2 from its official release notes, upgrade guides and advisories: 41 breaking, 1 deprecations, 28 new APIs and options. Each one cited. Sources checked 2026-10-20. HTML: https://unstale.sh/npm/@microsoft/agents-a365-observability/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @microsoft/agents-a365-observability 2

### Breaking changes

- The export is removed and replaced by DEFAULT_FINISH_REASON. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Both export modes require an app-only resolver configured with withTokenResolver(...) or exporterOptions.tokenResolver; builder configuration takes precedence, and runWithExportToken/updateExportToken are no longer read. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- InferenceScope now rejects non-integer ports and ports outside 1-65535. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- A resolver is required; missing resolvers fail configuration, while empty tokens or acquisition failures fail export without delegated fallback. The resolver is invoked on every export batch and must cache and refresh tokens near expiry. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- gen_ai.input.messages and gen_ai.output.messages are emitted as plain OTel JSON arrays instead of versioned envelopes; consumers parsing these attributes must handle the new shape. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- LangChain no longer uses response_metadata.model_name as a fallback for gen_ai.request.model; that value is reported only via gen_ai.response.model. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- OpenAI response spans report the served model via gen_ai.response.model and omit gen_ai.request.model; Chat Completions/generation spans report the served model while retaining the requested alias in gen_ai.request.model. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- providerName is required; InferenceScope.start() and ScopeUtils.populateInferenceScopeFromTurnContext throw if it is missing or blank. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- The TurnContext/Authorization overload is removed in favor of RefreshObservabilityToken(agentId, tenantId, tokenResolver); acquisition failures throw. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- The option is deprecated and ignored, even when false; OBS exports always use /observabilityService and no longer select or fall back to /observability. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)

### New APIs and options

- Adds agentType, mapped to gen_ai.agent.type. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds a scope for tracing security guardrail evaluations, with recordDecision(), recordContentOutput(), and recordFinding(), plus guardrail contracts and related microsoft.security.* / microsoft.guardian.* constants. apply_guardrail spans are accepted by the Agent365 exporter. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds the GENERATE_CONTENT_OPERATION_NAME constant. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds cacheReadInputTokens, mapped to gen_ai.usage.cache_read.input_tokens. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds cacheWriteInputTokens, mapped to gen_ai.usage.cache_write.input_tokens. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds responseModel, mapped to gen_ai.response.model. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Exports the app-only resolver signature accepted by RefreshObservabilityToken. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds an agentic user disabled lifecycle notification handler. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds an agentic user enabled lifecycle notification handler. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds an agentic user manager updated lifecycle notification handler. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds an agentic user undeleted lifecycle notification handler. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds an agentic user updated lifecycle notification handler. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Adds the TEXT_COMPLETION_OPERATION_NAME constant. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Exports the exporter token resolver signature. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)

### Behavior and default changes

- Output messages created from plain strings now default finish_reason to "stop". (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- InferenceScope maps operationName to its canonical lowercase semantic convention value instead of always emitting chat; the span-name prefix also reflects the operation type. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- model is optional, but at least one of model or responseModel must be a non-blank string; blank values are treated as absent. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Inference spans now record server.port when endpoint.port is 443, which was previously omitted as an implicit default. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)

### Tooling

- Declared as a dependency instead of relying on a transitive install. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)

### Fixes and other changes

- Uses channelData.productContext for the channel link when activity.channelIdSubChannel is missing or blank. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Reads the server list from the mcpServers field of the tooling gateway response instead of returning an empty list. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- ObservabilityManager.start(options) now forwards options.exporterOptions. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)
- Declared as a dependency because the exporter imports it at runtime; this prevents MODULE_NOT_FOUND when another copy is not hoisted. (2.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#200---2026-10-20)

## @microsoft/agents-a365-observability 1

### Breaking changes

- EnhancedAgentDetails is merged into AgentDetails to unify agent detail typing across scopes and middleware. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- The agentUPN property is renamed to agentEmail. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaced by Request; executionType and the separate InferenceRequest, ToolRequest, and OutputRequest interfaces are removed. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Renamed from BaggageBuilder.agentUpn. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Renamed from BaggageBuilder.serviceName as the fluent setter for the service name baggage value. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Renamed from BaggageBuilder.callerUpn. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Renamed from BaggageBuilder.callerId. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Renamed from BaggageBuilder.callerName. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces SourceMetadata as the exported interface for invocation channel information; the request property is now channel. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- No longer needed as an environment variable for recordAttributes, setTagMaybe, and addBaggage. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- No longer needed as an environment variable for recordAttributes, setTagMaybe, and addBaggage. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Now takes request, details, agent details, optional user details, and optional span details; tenant ID is required on AgentDetails. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Renamed from extractTraceContext. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces GEN_AI_AGENT_UPN_KEY and uses the microsoft.agent.user.email key. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces GEN_AI_CALLER_AGENT_UPN_KEY and uses the microsoft.a365.caller.agent.user.email key. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Input messages are now recorded in JSON array format instead of comma-separated strings. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Now takes request, details, agent details, optional user details, and optional span details; tenant ID is required on AgentDetails. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Renamed from injectTraceContext. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Input messages are now recorded in JSON array format instead of comma-separated strings. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Now takes request, invoke-scope details, agent details, optional caller details, and optional span details; tenant ID is required on AgentDetails. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces InvokeAgentDetails and contains only scope-level configuration such as endpoint; agent identity is now supplied separately. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- messages now accepts OutputMessagesParam, allowing plain string arrays or a versioned OutputMessages wrapper with richer message data. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Now takes request, response, agent details, optional user details, and optional span details; tenant ID is required on AgentDetails. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces AgentRequest and unifies request context across scopes with conversationId, channel, content, and sessionId. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- The sourceMetadata property is renamed to channel. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Removed from all scope start methods; tenant ID is now required on AgentDetails, and scopes throw if it is missing. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces GEN_AI_CALLER_UPN_KEY and uses the user.email semantic-convention key. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces GEN_AI_CALLER_ID_KEY and uses the user.id semantic-convention key. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces GEN_AI_CALLER_NAME_KEY and uses the user.name semantic-convention key. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Replaces CallerDetails as the type representing the human caller identity; its properties are userId, userEmail, and userName. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- The callerId property is renamed to userId. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)

### Deprecations

- Now an alias of AgentDetails and marked deprecated; existing imports continue to work. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)

### New APIs and options

- Adds a per-HTTP-request backend timeout option defaulting to 30 seconds, distinct from the overall exporter timeout. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Sets server address and optional port baggage values; port is recorded only when different from 443 and stale port entries are cleared when omitted or 443. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Wraps userDetails and callerAgentDetails for InvokeAgentScope. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Accepts InputMessagesParam, a string array or versioned InputMessages wrapper; plain strings are auto-wrapped to OTEL gen-ai format. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Accepts OutputMessagesParam, a string array or versioned OutputMessages wrapper; plain strings are auto-wrapped to OTEL gen-ai format. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Versioned wrapper for input messages. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- New discriminated union for OTEL Gen-AI message parts, including text, tool-call, reasoning, blob, file, URI, server-tool, and generic parts. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- New OTEL Gen-AI message-format type. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Configures the service.namespace resource attribute. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Constant for the cancellation error type value. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Records a cancellation event on the span with error.type set to TaskCanceledException. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Versioned wrapper for output messages. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Groups parentContext, startTime, endTime, and spanKind for scope construction. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
- Scope classes accept span links through SpanDetails.spanLinks to establish causal relationships to other spans. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)

### Behavior and default changes

- The default increases from 30 seconds to 90 seconds to allow retries across multiple identity groups within one export cycle. (1.0.0) — [release notes](https://github.com/microsoft/Agent365-nodejs/blob/3787e05bf4316e68b1238a4b703de37000f29ee7/CHANGELOG.md#100---2026-04-30)
