Skip to content

Telemetry

const Telemetry: object

Defined in: packages/core/src/telemetry.ts:601

The public telemetry namespace, also available through named exports.

configFromEnv: (env) => TelemetryConfig

Reads OTLP configuration from environment variables.

Telemetry is enabled when OTEL_EXPORTER_OTLP_ENDPOINT (or a per-signal endpoint) is present, or when console tracing is enabled. OTEL_SDK_DISABLED=true and ARONA_TELEMETRY=0 disable every exporter.

Set ARONA_TELEMETRY_CONSOLE=true (or OTEL_TRACES_EXPORTER=console) to print finished spans to the console instead of exporting them over OTLP.

Readonly<Record<string, string | undefined>>

TelemetryConfig

consoleTracerLayer: Layer<Tracer, never, never>

A tracer Layer that prints finished spans to the console.

Spans are indented by nesting depth and include duration and attributes.

count: (name, value, attributes?) => Effect<void>

Records a counter metric.

string

number = 1

Readonly<Record<string, unknown>>

Effect<void>

describeError: (error) => string

A descriptive name for an unknown error, used as a metric attribute.

unknown

string

flush: Effect<void, never, never>

Flushes buffered telemetry when a flusher is present.

flushRequired: Effect<void, never, Flusher>

Flushes buffered telemetry; requires an exporter layer.

histogram: (name, value, attributes?) => Effect<void>

Records a histogram value.

string

number

Readonly<Record<string, unknown>>

Effect<void>

layer: (config) => TelemetryLayer

TelemetryConfig

TelemetryLayer

layerFromEnv: TelemetryLayer

The environment-configured telemetry Layer.

readonly Metrics: object = TelemetryMetrics

readonly commandErrors: "arona.commands.errors" = "arona.commands.errors"

readonly commandsExecuted: "arona.commands.executed" = "arona.commands.executed"

readonly commandsReloaded: "arona.commands.reloaded" = "arona.commands.reloaded"

readonly interactions: "arona.interactions" = "arona.interactions"

readonly messageErrors: "arona.messages.errors" = "arona.messages.errors"

readonly messagesClosed: "arona.messages.closed" = "arona.messages.closed"

readonly messagesMounted: "arona.messages.mounted" = "arona.messages.mounted"

readonly messagesSent: "arona.messages.sent" = "arona.messages.sent"

readonly operationDuration: "arona.operation.duration" = "arona.operation.duration"

readonly operationErrors: "arona.operation.errors" = "arona.operation.errors"

readonly operations: "arona.operations" = "arona.operations"

recordOperation: (exit, name, attributes, durationMs) => Effect<void>

Records one operation’s duration and outcome.

Exit<unknown, unknown>

string

Readonly<Record<string, unknown>>

number

Effect<void>

readonly Spans: object = TelemetrySpans

readonly clientLogin: "arona.client.login" = "arona.client.login"

readonly clientStart: "arona.client.start" = "arona.client.start"

readonly command: "arona.command" = "arona.command"

readonly commandsReload: "arona.commands.reload" = "arona.commands.reload"

readonly interaction: "arona.interaction" = "arona.interaction"

readonly messageClose: "arona.message.close" = "arona.message.close"

readonly messageInteraction: "arona.message.interaction" = "arona.message.interaction"

readonly messageMount: "arona.message.mount" = "arona.message.mount"

readonly messageSend: "arona.message.send" = "arona.message.send"

readonly slackEvent: "arona.slack.event" = "arona.slack.event"

withSpan: <A, E, R>(effect, name, options) => Effect<A, E, R>

Traces an Effect, records its duration and outcome, and preserves its error channel. This is the Effect-native replacement for the old telemetry handle.

A

E

R

Effect<A, E, R>

string

TelemetrySpanOptions = {}

Effect<A, E, R>