Expand description
Dynamo Distributed Logging Module.
- Configuration loaded from:
- Environment variables (highest priority).
- Optional TOML file pointed to by the
DYN_LOGGING_CONFIG_PATHenvironment variable. /opt/dynamo/etc/logging.toml.
Logging can take two console forms: READABLE or JSONL. Select one with
DYN_LOGGING_CONSOLE_FORMAT=readable|jsonl; the default is READABLE.
DYN_LOGGING_JSONL=1 remains a legacy fallback when the new setting is unset or blank.
Console presentation is independent of OpenTelemetry export.
To use local timezone for logging timestamps, set the DYN_LOG_USE_LOCAL_TZ environment variable to 1.
Filters can be configured using the DYN_LOG environment variable or by setting the filters
key in the TOML configuration file. Filters are comma-separated key-value pairs where the key
is the crate or module name and the value is the log level. The default log level is info.
Example:
log_level = "error"
[log_filters]
"test_logging" = "info"
"test_logging::api" = "trace"Structs§
Traits§
Functions§
- extract_
otel_ context_ from_ nats_ headers - Extract OpenTelemetry trace context from NATS headers for distributed tracing
- get_
distributed_ tracing_ context - init
- Initialize logging (idempotent). Safe to call with or without a running Tokio runtime — OTLP exporters fall back to a persistent background runtime.
- inject_
current_ trace_ into_ nats_ headers - Inject trace context from current span into NATS headers
- inject_
otel_ context_ into_ nats_ headers - Inject OpenTelemetry trace context into NATS headers using W3C Trace Context propagation
- inject_
trace_ headers_ into_ map - is_
valid_ span_ id - Validate a given span ID according to W3C Trace Context specifications. A valid span ID is a 16-character hexadecimal string (lowercase).
- is_
valid_ trace_ id - Validate a given trace ID according to W3C Trace Context specifications. A valid trace ID is a 32-character hexadecimal string (lowercase).
- log_
message - Log a message with file and line info Used by Python wrapper
- make_
client_ request_ span - Create a client_request span linked to the parent trace context
- make_
handle_ payload_ span - Create a handle_payload span from NATS headers with component context
- make_
handle_ payload_ span_ from_ tcp_ headers - Create a handle_payload span from TCP/HashMap headers with component context
- make_
inference_ request_ span - Create a span for inference request endpoints (completions, chat, embeddings, etc.).
- make_
system_ request_ span - Create a span for system endpoints (health, metrics, models, engine, loras, etc.).
- otel_
parent_ context_ from_ distributed - parse_
traceparent - Parse a traceparent string into its components