Telemetry
constTelemetry:object
Defined in: packages/core/src/telemetry.ts:601
The public telemetry namespace, also available through named exports.
Type Declaration
Section titled “Type Declaration”configFromEnv
Section titled “configFromEnv”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.
Parameters
Section titled “Parameters”Readonly<Record<string, string | undefined>>
Returns
Section titled “Returns”consoleTracerLayer
Section titled “consoleTracerLayer”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.
Parameters
Section titled “Parameters”string
value?
Section titled “value?”number = 1
attributes?
Section titled “attributes?”Readonly<Record<string, unknown>>
Returns
Section titled “Returns”Effect<void>
describeError
Section titled “describeError”describeError: (
error) =>string
A descriptive name for an unknown error, used as a metric attribute.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”string
flush:
Effect<void,never,never>
Flushes buffered telemetry when a flusher is present.
flushRequired
Section titled “flushRequired”flushRequired:
Effect<void,never,Flusher>
Flushes buffered telemetry; requires an exporter layer.
histogram
Section titled “histogram”histogram: (
name,value,attributes?) =>Effect<void>
Records a histogram value.
Parameters
Section titled “Parameters”string
number
attributes?
Section titled “attributes?”Readonly<Record<string, unknown>>
Returns
Section titled “Returns”Effect<void>
layer: (
config) =>TelemetryLayer
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”layerFromEnv
Section titled “layerFromEnv”layerFromEnv:
TelemetryLayer
The environment-configured telemetry Layer.
Metrics
Section titled “Metrics”
readonlyMetrics:object=TelemetryMetrics
Metrics.commandErrors
Section titled “Metrics.commandErrors”
readonlycommandErrors:"arona.commands.errors"="arona.commands.errors"
Metrics.commandsExecuted
Section titled “Metrics.commandsExecuted”
readonlycommandsExecuted:"arona.commands.executed"="arona.commands.executed"
Metrics.commandsReloaded
Section titled “Metrics.commandsReloaded”
readonlycommandsReloaded:"arona.commands.reloaded"="arona.commands.reloaded"
Metrics.interactions
Section titled “Metrics.interactions”
readonlyinteractions:"arona.interactions"="arona.interactions"
Metrics.messageErrors
Section titled “Metrics.messageErrors”
readonlymessageErrors:"arona.messages.errors"="arona.messages.errors"
Metrics.messagesClosed
Section titled “Metrics.messagesClosed”
readonlymessagesClosed:"arona.messages.closed"="arona.messages.closed"
Metrics.messagesMounted
Section titled “Metrics.messagesMounted”
readonlymessagesMounted:"arona.messages.mounted"="arona.messages.mounted"
Metrics.messagesSent
Section titled “Metrics.messagesSent”
readonlymessagesSent:"arona.messages.sent"="arona.messages.sent"
Metrics.operationDuration
Section titled “Metrics.operationDuration”
readonlyoperationDuration:"arona.operation.duration"="arona.operation.duration"
Metrics.operationErrors
Section titled “Metrics.operationErrors”
readonlyoperationErrors:"arona.operation.errors"="arona.operation.errors"
Metrics.operations
Section titled “Metrics.operations”
readonlyoperations:"arona.operations"="arona.operations"
recordOperation
Section titled “recordOperation”recordOperation: (
exit,name,attributes,durationMs) =>Effect<void>
Records one operation’s duration and outcome.
Parameters
Section titled “Parameters”Exit<unknown, unknown>
string
attributes
Section titled “attributes”Readonly<Record<string, unknown>>
durationMs
Section titled “durationMs”number
Returns
Section titled “Returns”Effect<void>
readonlySpans:object=TelemetrySpans
Spans.clientLogin
Section titled “Spans.clientLogin”
readonlyclientLogin:"arona.client.login"="arona.client.login"
Spans.clientStart
Section titled “Spans.clientStart”
readonlyclientStart:"arona.client.start"="arona.client.start"
Spans.command
Section titled “Spans.command”
readonlycommand:"arona.command"="arona.command"
Spans.commandsReload
Section titled “Spans.commandsReload”
readonlycommandsReload:"arona.commands.reload"="arona.commands.reload"
Spans.interaction
Section titled “Spans.interaction”
readonlyinteraction:"arona.interaction"="arona.interaction"
Spans.messageClose
Section titled “Spans.messageClose”
readonlymessageClose:"arona.message.close"="arona.message.close"
Spans.messageInteraction
Section titled “Spans.messageInteraction”
readonlymessageInteraction:"arona.message.interaction"="arona.message.interaction"
Spans.messageMount
Section titled “Spans.messageMount”
readonlymessageMount:"arona.message.mount"="arona.message.mount"
Spans.messageSend
Section titled “Spans.messageSend”
readonlymessageSend:"arona.message.send"="arona.message.send"
Spans.slackEvent
Section titled “Spans.slackEvent”
readonlyslackEvent:"arona.slack.event"="arona.slack.event"
withSpan
Section titled “withSpan”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.
Type Parameters
Section titled “Type Parameters”A
E
R
Parameters
Section titled “Parameters”effect
Section titled “effect”Effect<A, E, R>
string
options?
Section titled “options?”TelemetrySpanOptions = {}
Returns
Section titled “Returns”Effect<A, E, R>