Expand description
OpenTelemetry declarative configuration for
oxtel: the YAML file
OTEL_CONFIG_FILE names, read into a typed Config.
- Environment variables are substituted in values (
${NAME},${env:NAME},${NAME:-default},$$for a literal$). Unquoted values are then typed as YAML scalars, so${OTEL_SDK_DISABLED:-false}is a boolean, while quoted values stay strings. A substituted value is never read as YAML structure. file_formatmust be1.x.- Values of the wrong type are errors, naming the field’s path.
- Keys and components oxtel doesn’t support, such as views or the gRPC
exporter, are reported in
Parsed::warningsand otherwise ignored.
The oxtel crate builds its pipelines from the result when
OTEL_CONFIG_FILE is set.
let parsed = oxtel_config::parse_with(
"file_format: \"1.2\"\ndisabled: ${DISABLED:-false}\n",
&|_| None,
)
.unwrap();
assert!(!parsed.config.disabled);Structs§
- Config
- A whole configuration file.
- Limits
- Attribute, event and link limits.
- Logger
Provider Config logger_provider.- Meter
Provider Config meter_provider.- Otlp
Http Config otlp_http.- Parsed
- A configuration and what in it was ignored.
- Resource
Config resource.- Tracer
Provider Config tracer_provider.
Enums§
- Attribute
Value - An attribute’s value.
- Error
- Why a configuration couldn’t be read.
- Exporter
Config - An exporter.
- Processor
Config - A span or log record processor.
- Reader
Config - A metric reader.
- Sampler
Config - A sampler.
Functions§
- from_
file - Read the configuration file at
path. - parse
- Read the configuration in
text, substituting the process’s environment variables. - parse_
with - Read the configuration in
text, substituting variables fromlookup.