Skip to main content

Module telemetry

Module telemetry 

Source
Expand description

Contains tracing/logging and metrics related functionality

Modules§

metrics
Metric instrument types and the CoreMeter trait.

Structs§

CoreLog
A log line (which ultimately came from a tracing event) exported from Core->Lang
HistogramBucketOverrides
Allows overriding the buckets used by histogram metrics
OtelCollectorOptions
Options for exporting to an OpenTelemetry Collector
OtelCollectorOptionsBuilder
Use builder syntax to set the inputs and finish with build().
PrometheusExporterOptions
Options for exporting metrics to Prometheus
PrometheusExporterOptionsBuilder
Use builder syntax to set the inputs and finish with build().
TelemetryInstance
Holds initialized tracing/metrics exporters, etc
TelemetryOptions
Telemetry configuration options. Construct with TelemetryOptions::builder
TelemetryOptionsBuilder
Use builder syntax to set the inputs and finish with build().

Enums§

Logger
Control where logs go
MetricTemporality
Types of aggregation temporality for metric export. See: https://github.com/open-telemetry/opentelemetry-specification/blob/ce50e4634efcba8da445cc23523243cb893905cb/specification/metrics/datamodel.md#temporality
OtlpProtocol
Options for configuring telemetry
TaskQueueLabelStrategy
Determines how the task_queue label value is set on metrics.

Statics§

METRIC_PREFIX
The default prefix applied to all Temporal metric names.

Traits§

CoreLogConsumer
Consumer trait for use with push logger.
CoreTelemetry
Each core runtime instance has a telemetry subsystem associated with it, this trait defines the operations that lang might want to perform on that telemetry after it’s initialized.

Functions§

construct_filter_string
Help you construct an EnvFilter compatible filter string which will forward all core module traces at core_level and all others (from 3rd party modules, etc) at other_level.
remove_trace_subscriber_for_current_thread
Undoes set_trace_subscriber_for_current_thread
set_trace_subscriber_for_current_thread
Set the trace subscriber for the current thread. This must be done in every thread which uses core stuff, otherwise traces/logs will not be collected on that thread. For example, if using a multithreaded Tokio runtime, you should ensure that said runtime uses on_thread_start or a similar mechanism to call this for each thread within the runtime.
telemetry_init
Initialize tracing subscribers/output and logging export, returning a TelemetryInstance which can be used to register default / global tracing subscribers.
telemetry_init_fallback
WARNING: Calling can cause panics because of https://github.com/tokio-rs/tracing/issues/1656 Lang must not start using until resolved
telemetry_init_global
WARNING: Calling can cause panics because of https://github.com/tokio-rs/tracing/issues/1656 Lang must not start using until resolved