Agent365Exporter class
Agent365 span exporter.
Implements SpanExporter from @opentelemetry/sdk-trace-base.
Partitions spans by (tenantId, agentId), builds OTLP-like JSON payloads,
and POSTs them to the Agent365 observability service with Bearer auth.
Constructors
| Agent365Exporter(Agent365Exporter |
Creates a new Agent365 span exporter. |
Methods
| export(Readable |
Exports a batch of spans to the Agent365 observability service. Partitions the spans by (tenantId, agentId), builds OTLP-like JSON payloads,
and POSTs them with bearer authentication. Invokes |
| force |
Waits for accepted exports and drains pending durable records when durable delivery is enabled. |
| get |
Returns the getBufferConfig() the host should pass to its
|
| shutdown() | Shuts down the exporter. After this resolves, subsequent export calls fail immediately. Accepted exports settle before shutdown completes when they finish before the configured shutdown deadline; durable delivery requests are aborted at that deadline. |
Constructor Details
Agent365Exporter(Agent365ExporterOptions)
Creates a new Agent365 span exporter.
new Agent365Exporter(options?: Agent365ExporterOptions)
Parameters
- options
- Agent365ExporterOptions
Optional exporter configuration (token resolution, endpoint overrides, batching, and payload limits). When omitted, defaults are applied.
Method Details
export(ReadableSpan[], (result: ExportResult) => void)
Exports a batch of spans to the Agent365 observability service.
Partitions the spans by (tenantId, agentId), builds OTLP-like JSON payloads,
and POSTs them with bearer authentication. Invokes resultCallback with
ExportResultCode.SUCCESS when all groups export successfully, or
ExportResultCode.FAILED when the exporter is shut down or any group fails.
function export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): Promise<void>
Parameters
- spans
-
ReadableSpan[]
The spans to export.
- resultCallback
-
(result: ExportResult) => void
Callback invoked with the export result.
Returns
Promise<void>
forceFlush()
Waits for accepted exports and drains pending durable records when durable delivery is enabled.
function forceFlush(): Promise<void>
Returns
Promise<void>
getBufferConfig()
Returns the getBufferConfig() the host should pass to its
BatchSpanProcessor. Any value the caller supplied wins; anything
omitted falls back to the A365 exporter's documented defaults
(not the upstream BatchSpanProcessor defaults).
function getBufferConfig(): BufferConfig
Returns
BufferConfig
shutdown()
Shuts down the exporter. After this resolves, subsequent export calls fail immediately. Accepted exports settle before shutdown completes when they finish before the configured shutdown deadline; durable delivery requests are aborted at that deadline.
function shutdown(): Promise<void>
Returns
Promise<void>