Skip to content

OtlpExporter

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/tracing/otlp-exporter.ts

Methods

MethodSignatureReturns
startSpanstartSpan(operationName: string, parentSpanId: string)TraceSpan
endSpan`endSpan(span: TraceSpan, status: 'ok''error')`
addEvent`addEvent(span: TraceSpan, name: string, attributes: Record<string, stringnumber
setAttributes`setAttributes(span: TraceSpan, attributes: Record<string, stringnumber
flushflush()Promise<void>
getPendingCountgetPendingCount()number
shutdownshutdown()Promise<void>

Where it refuses work

  • OtlpExporter stops the work with an early return when !this.config.enabled || this.spans.length === 0.

When something fails

  • OtlpExporter handles failure in 2 places: it logs it and continues in 1, and discards it silently in 1. A failure discarded silently leaves no trace for whoever debugs this later.

Was this page helpful?

Download as PDF