Expand description
Contains tracing/logging and metrics related functionality
Modules§
Structs§
- CoreLog
- A log line (which ultimately came from a tracing event) exported from Core->Lang
- Histogram
Bucket Overrides - Allows overriding the buckets used by histogram metrics
- Otel
Collector Options - Options for exporting to an OpenTelemetry Collector
- Otel
Collector Options Builder - Use builder syntax to set the inputs and finish with
build(). - Prometheus
Exporter Options - Options for exporting metrics to Prometheus
- Prometheus
Exporter Options Builder - Use builder syntax to set the inputs and finish with
build(). - Telemetry
Instance - Holds initialized tracing/metrics exporters, etc
- Telemetry
Options - Telemetry configuration options. Construct with TelemetryOptions::builder
- Telemetry
Options Builder - Use builder syntax to set the inputs and finish with
build().
Enums§
- Logger
- Control where logs go
- Metric
Temporality - Types of aggregation temporality for metric export. See: https://github.com/open-telemetry/opentelemetry-specification/blob/ce50e4634efcba8da445cc23523243cb893905cb/specification/metrics/datamodel.md#temporality
- Otlp
Protocol - Options for configuring telemetry
- Task
Queue Label Strategy - Determines how the
task_queuelabel value is set on metrics.
Statics§
- METRIC_
PREFIX - The default prefix applied to all Temporal metric names.
Traits§
- Core
LogConsumer - Consumer trait for use with push logger.
- Core
Telemetry - 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_leveland all others (from 3rd party modules, etc) atother_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