Add httpRequestTimeoutMilliseconds option and default enableBaggage to false#214
Open
Add httpRequestTimeoutMilliseconds option and default enableBaggage to false#214
Conversation
- Agent365Exporter now uses the configured exporterTimeoutMilliseconds instead of a hardcoded 30s constant for HTTP request timeouts - ObservabilityHostingManager.enableBaggage defaults to false (breaking); callers must opt in explicitly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes two observability configuration behaviors: ensuring Agent365Exporter honors its configured HTTP timeout, and changing ObservabilityHostingManager so baggage propagation middleware is opt-in by default.
Changes:
- Respect
Agent365ExporterOptions.exporterTimeoutMillisecondswhen constructing the fetch abort timeout. - Change
ObservabilityHostingManager.enableBaggagedefault behavior tofalse(opt-in). - Update tests and changelog to reflect the new defaults/behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/observability/extension/hosting/observability-hosting-manager.test.ts | Updates expectations for the new default enableBaggage: false behavior and explicit opt-in. |
| packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts | Removes hardcoded 30s timeout and uses configured exporterTimeoutMilliseconds. |
| packages/agents-a365-observability-hosting/src/middleware/ObservabilityHostingManager.ts | Switches baggage middleware registration to opt-in (enableBaggage === true) and updates option docs. |
| CHANGELOG.md | Documents the timeout fix and the behavior change for enableBaggage. |
Comments suppressed due to low confidence (2)
packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts:250
- The change to honor
exporterTimeoutMillisecondsisn’t covered by an assertion in the existing Agent365Exporter test suite (no tests currently verify thefetchcall’s abort signal/timeout). Adding a test that sets a non-defaultexporterTimeoutMillisecondsand asserts thefetchoptions use that value would prevent regressions back to a hardcoded timeout.
body,
signal: AbortSignal.timeout(this.options.exporterTimeoutMilliseconds)
});
packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts:250
AbortSignal.timeoutwill throw ifthis.options.exporterTimeoutMillisecondsisundefined,NaN, or negative (e.g., if a caller passes a partial options object at runtime, orObject.assignoverwrites the default withundefined). Consider validating/coercing the timeout before callingAbortSignal.timeout, and falling back to the default (30_000ms) when the value is not a finite positive number.
body,
signal: AbortSignal.timeout(this.options.exporterTimeoutMilliseconds)
});
You can also share your feedback on Copilot code review. Take the survey.
nikhilNava
requested changes
Mar 5, 2026
packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts
Outdated
Show resolved
Hide resolved
nikhilNava
previously approved these changes
Mar 5, 2026
threddy
previously approved these changes
Mar 5, 2026
juliomenendez
previously approved these changes
Mar 5, 2026
- New httpRequestTimeoutMilliseconds option (default 30s) for per-HTTP-request timeout on fetch calls to the observability backend - exporterTimeoutMilliseconds (BatchSpanProcessor deadline) increased to 60s to allow sufficient time for retries across multiple identity groups - Clarified JSDoc to distinguish the two timeout semantics Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0ae2f6e
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.
Summary
httpRequestTimeoutMillisecondsoption (default 30s) controls the per-HTTP-request timeout for backend calls, distinct fromexporterTimeoutMillisecondswhich is the BatchSpanProcessor export deadline.exporterTimeoutMillisecondsdefault increased from 30s to 60s to allow sufficient time for retries across multiple identity groups.enableBaggagenow defaults tofalseinstead oftrue. Callers must explicitly opt in with{ enableBaggage: true }.Test plan
observability-hosting-manager.test.tsto reflect new default behavior🤖 Generated with Claude Code