Skip to content

The otel::tracing log level is not set to the same or lower level than TRACING_LEVEL, which makes span.set_parent() invalid. #148

Open
@Lvzhenqian

Description

@Lvzhenqian

Cargo.toml

axum = "0.7"
tracing = "0.1"
tracing-opentelemetry = "0.24.0"
opentelemetry = "0.23.0"
opentelemetry_sdk = { version = "0.23.0", features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.16", features = ["trace", "tonic"] }
opentelemetry-semantic-conventions = "0.15"
axum-tracing-opentelemetry = "0.19"
tracing-opentelemetry-instrumentation-sdk = { version = "0.19", features = [
    "tracing_level_info",
] }
init-tracing-opentelemetry = "0.19"
tracing-subscriber = { version = "0.3", features = [
    "env-filter",
    "std",
    "local-time",
    "ansi",
    "json",
] }
tracing-appender = "0.2"

The span generated before setting will not bring in the traceparent id of the http request:
1
After configuring the tagger log level, it can be normally associated with the incoming trace:
2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions