-
Notifications
You must be signed in to change notification settings - Fork 5
Add httpRequestTimeoutMilliseconds option and default enableBaggage to false #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4b5a468
c03849b
0ae2f6e
de176d2
36eb904
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,6 @@ import logger, { formatError } from '../../utils/logging'; | |
| import { Agent365ExporterOptions } from './Agent365ExporterOptions'; | ||
| import { ExporterEventNames } from './ExporterEventNames'; | ||
|
|
||
| const DEFAULT_HTTP_TIMEOUT_SECONDS = 30000; // 30 seconds in ms | ||
| const DEFAULT_MAX_RETRIES = 3; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If max retries = 3 so your default exporterTimeoutMilliseconds should be 18 sec?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch. update it to 90 second. |
||
|
|
||
| interface OTLPExportRequest { | ||
|
|
@@ -247,7 +246,7 @@ export class Agent365Exporter implements SpanExporter { | |
| method: 'POST', | ||
| headers, | ||
| body, | ||
| signal: AbortSignal.timeout(DEFAULT_HTTP_TIMEOUT_SECONDS) | ||
| signal: AbortSignal.timeout(this.options.httpRequestTimeoutMilliseconds) | ||
| }); | ||
|
Comment on lines
246
to
250
|
||
|
|
||
| correlationId = response?.headers?.get('x-ms-correlation-id') || response?.headers?.get('x-correlation-id') || 'unknown'; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,8 @@ export type TokenResolver = (agentId: string, tenantId: string) => string | null | |
| * @property {boolean} [useS2SEndpoint] When true, exporter will POST to the S2S path (/observabilityService/tenants/{tenantId}/agents/{agentId}/traces). | ||
| * @property {number} maxQueueSize Maximum span queue size before drops occur (passed to BatchSpanProcessor). | ||
| * @property {number} scheduledDelayMilliseconds Delay between automatic batch flush attempts. | ||
| * @property {number} exporterTimeoutMilliseconds Per-export timeout (abort if exceeded). | ||
| * @property {number} exporterTimeoutMilliseconds Maximum time (ms) the BatchSpanProcessor waits for the entire export() call to complete before giving up. Covers partitioning, token resolution, and all HTTP retries. | ||
| * @property {number} httpRequestTimeoutMilliseconds Timeout (ms) for each individual HTTP request to the observability backend. Applies per fetch() call inside the retry loop; each retry gets a fresh timeout. | ||
| * @property {number} maxExportBatchSize Maximum number of spans per export batch. | ||
| */ | ||
| export class Agent365ExporterOptions { | ||
|
|
@@ -43,8 +44,11 @@ export class Agent365ExporterOptions { | |
| /** Delay (ms) between automatic batch flush attempts. */ | ||
| public scheduledDelayMilliseconds: number = 5000; | ||
|
|
||
| /** Per-export timeout in milliseconds. */ | ||
| public exporterTimeoutMilliseconds: number = 30000; | ||
| /** Maximum time (ms) the BatchSpanProcessor waits for the entire export() call to complete. */ | ||
| public exporterTimeoutMilliseconds: number = 90000; | ||
|
|
||
| /** Timeout (ms) for each individual HTTP request to the observability backend. Each retry attempt gets a fresh timeout. */ | ||
| public httpRequestTimeoutMilliseconds: number = 30000; | ||
|
Comment on lines
+47
to
+51
|
||
|
|
||
| /** Maximum number of spans per export batch. */ | ||
| public maxExportBatchSize: number = 512; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog says
exporterTimeoutMillisecondsdefault increased to 60s, butAgent365ExporterOptionscurrently defaultsexporterTimeoutMillisecondsto 90000ms (90s). Please correct this entry to match the actual default (or adjust the default to match the changelog) to avoid publishing inaccurate release notes.