unstale

npm / @microsoft/agents-a365-observability

@microsoft/agents-a365-observability

What changed in @microsoft/agents-a365-observability 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.

41 breaking1 deprecations28 new APIs and options5 behavior and defaults1 tooling4 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@microsoft/agents-a365-observability 233 changes

Breaking changes 10

  • The export is removed and replaced by DEFAULT_FINISH_REASON.

    2.0.0release notes

  • 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.0release notes

  • InferenceScope now rejects non-integer ports and ports outside 1-65535.

    2.0.0release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • 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.0release notes

  • providerName is required; InferenceScope.start() and ScopeUtils.populateInferenceScopeFromTurnContext throw if it is missing or blank.

    2.0.0release notes

  • The TurnContext/Authorization overload is removed in favor of RefreshObservabilityToken(agentId, tenantId, tokenResolver); acquisition failures throw.

    2.0.0release notes

  • 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.0release notes

New APIs and options 14

  • Adds agentType, mapped to gen_ai.agent.type.

    2.0.0release notes

  • 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.0release notes

  • Adds the GENERATE_CONTENT_OPERATION_NAME constant.

    2.0.0release notes

  • Adds cacheReadInputTokens, mapped to gen_ai.usage.cache_read.input_tokens.

    2.0.0release notes

  • Adds cacheWriteInputTokens, mapped to gen_ai.usage.cache_write.input_tokens.

    2.0.0release notes

  • Adds responseModel, mapped to gen_ai.response.model.

    2.0.0release notes

  • Exports the app-only resolver signature accepted by RefreshObservabilityToken.

    2.0.0release notes

  • Adds an agentic user disabled lifecycle notification handler.

    2.0.0release notes

  • Adds an agentic user enabled lifecycle notification handler.

    2.0.0release notes

  • Adds an agentic user manager updated lifecycle notification handler.

    2.0.0release notes

  • Adds an agentic user undeleted lifecycle notification handler.

    2.0.0release notes

  • Adds an agentic user updated lifecycle notification handler.

    2.0.0release notes

  • Adds the TEXT_COMPLETION_OPERATION_NAME constant.

    2.0.0release notes

  • Exports the exporter token resolver signature.

    2.0.0release notes

Behavior and default changes 4

  • Output messages created from plain strings now default finish_reason to "stop".

    2.0.0release notes

  • 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.0release notes

  • 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.0release notes

  • Inference spans now record server.port when endpoint.port is 443, which was previously omitted as an implicit default.

    2.0.0release notes

Tooling 1

  • Declared as a dependency instead of relying on a transitive install.

    2.0.0release notes

Fixes and other changes 4

  • Uses channelData.productContext for the channel link when activity.channelIdSubChannel is missing or blank.

    2.0.0release notes

  • Reads the server list from the mcpServers field of the tooling gateway response instead of returning an empty list.

    2.0.0release notes

  • ObservabilityManager.start(options) now forwards options.exporterOptions.

    2.0.0release notes

  • Declared as a dependency because the exporter imports it at runtime; this prevents MODULE_NOT_FOUND when another copy is not hoisted.

    2.0.0release notes

@microsoft/agents-a365-observability 147 changes

Breaking changes 31

  • EnhancedAgentDetails is merged into AgentDetails to unify agent detail typing across scopes and middleware.

    1.0.0release notes

  • The agentUPN property is renamed to agentEmail.

    1.0.0release notes

  • Replaced by Request; executionType and the separate InferenceRequest, ToolRequest, and OutputRequest interfaces are removed.

    1.0.0release notes

  • Renamed from BaggageBuilder.agentUpn.

    1.0.0release notes

  • Renamed from BaggageBuilder.serviceName as the fluent setter for the service name baggage value.

    1.0.0release notes

  • Renamed from BaggageBuilder.callerUpn.

    1.0.0release notes

  • Renamed from BaggageBuilder.callerId.

    1.0.0release notes

  • Renamed from BaggageBuilder.callerName.

    1.0.0release notes

  • Replaces SourceMetadata as the exported interface for invocation channel information; the request property is now channel.

    1.0.0release notes

  • No longer needed as an environment variable for recordAttributes, setTagMaybe, and addBaggage.

    1.0.0release notes

  • No longer needed as an environment variable for recordAttributes, setTagMaybe, and addBaggage.

    1.0.0release notes

  • Now takes request, details, agent details, optional user details, and optional span details; tenant ID is required on AgentDetails.

    1.0.0release notes

  • Renamed from extractTraceContext.

    1.0.0release notes

  • Replaces GEN_AI_AGENT_UPN_KEY and uses the microsoft.agent.user.email key.

    1.0.0release notes

  • Replaces GEN_AI_CALLER_AGENT_UPN_KEY and uses the microsoft.a365.caller.agent.user.email key.

    1.0.0release notes

  • Input messages are now recorded in JSON array format instead of comma-separated strings.

    1.0.0release notes

  • Now takes request, details, agent details, optional user details, and optional span details; tenant ID is required on AgentDetails.

    1.0.0release notes

  • Renamed from injectTraceContext.

    1.0.0release notes

  • Input messages are now recorded in JSON array format instead of comma-separated strings.

    1.0.0release notes

  • Now takes request, invoke-scope details, agent details, optional caller details, and optional span details; tenant ID is required on AgentDetails.

    1.0.0release notes

  • Replaces InvokeAgentDetails and contains only scope-level configuration such as endpoint; agent identity is now supplied separately.

    1.0.0release notes

  • messages now accepts OutputMessagesParam, allowing plain string arrays or a versioned OutputMessages wrapper with richer message data.

    1.0.0release notes

  • Now takes request, response, agent details, optional user details, and optional span details; tenant ID is required on AgentDetails.

    1.0.0release notes

  • Replaces AgentRequest and unifies request context across scopes with conversationId, channel, content, and sessionId.

    1.0.0release notes

  • The sourceMetadata property is renamed to channel.

    1.0.0release notes

  • Removed from all scope start methods; tenant ID is now required on AgentDetails, and scopes throw if it is missing.

    1.0.0release notes

  • Replaces GEN_AI_CALLER_UPN_KEY and uses the user.email semantic-convention key.

    1.0.0release notes

  • Replaces GEN_AI_CALLER_ID_KEY and uses the user.id semantic-convention key.

    1.0.0release notes

  • Replaces GEN_AI_CALLER_NAME_KEY and uses the user.name semantic-convention key.

    1.0.0release notes

  • Replaces CallerDetails as the type representing the human caller identity; its properties are userId, userEmail, and userName.

    1.0.0release notes

  • The callerId property is renamed to userId.

    1.0.0release notes

Deprecations 1

  • Now an alias of AgentDetails and marked deprecated; existing imports continue to work.

    1.0.0release notes

New APIs and options 14

  • Adds a per-HTTP-request backend timeout option defaulting to 30 seconds, distinct from the overall exporter timeout.

    1.0.0release notes

  • 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.0release notes

  • Wraps userDetails and callerAgentDetails for InvokeAgentScope.

    1.0.0release notes

  • Accepts InputMessagesParam, a string array or versioned InputMessages wrapper; plain strings are auto-wrapped to OTEL gen-ai format.

    1.0.0release notes

  • Accepts OutputMessagesParam, a string array or versioned OutputMessages wrapper; plain strings are auto-wrapped to OTEL gen-ai format.

    1.0.0release notes

  • Versioned wrapper for input messages.

    1.0.0release notes

  • New discriminated union for OTEL Gen-AI message parts, including text, tool-call, reasoning, blob, file, URI, server-tool, and generic parts.

    1.0.0release notes

  • New OTEL Gen-AI message-format type.

    1.0.0release notes

  • Configures the service.namespace resource attribute.

    1.0.0release notes

  • Constant for the cancellation error type value.

    1.0.0release notes

  • Records a cancellation event on the span with error.type set to TaskCanceledException.

    1.0.0release notes

  • Versioned wrapper for output messages.

    1.0.0release notes

  • Groups parentContext, startTime, endTime, and spanKind for scope construction.

    1.0.0release notes

  • Scope classes accept span links through SpanDetails.spanLinks to establish causal relationships to other spans.

    1.0.0release notes

Behavior and default changes 1

  • The default increases from 30 seconds to 90 seconds to allow retries across multiple identity groups within one export cycle.

    1.0.0release notes