logfire 0.11.0

Rust SDK for Pydantic Logfire
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.91"
name = "logfire"
version = "0.11.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust SDK for Pydantic Logfire"
homepage = "https://github.com/pydantic/logfire-rust"
documentation = "https://docs.rs/logfire"
readme = "README.md"
license = "MIT"
repository = "https://github.com/pydantic/logfire-rust"
resolver = "2"

[features]
data-dir = [
    "dep:serde",
    "dep:serde_json",
]
default = [
    "data-dir",
    "export-http-protobuf",
]
export-grpc = [
    "opentelemetry-otlp/grpc-tonic",
    "opentelemetry-otlp/tls",
    "dep:http",
    "dep:tonic",
]
export-http-json = [
    "opentelemetry-otlp/http-json",
    "opentelemetry-otlp/reqwest-client",
    "opentelemetry-otlp/reqwest-rustls",
]
export-http-protobuf = [
    "opentelemetry-otlp/http-proto",
    "opentelemetry-otlp/reqwest-client",
    "opentelemetry-otlp/reqwest-rustls",
]

[lib]
name = "logfire"
path = "src/lib.rs"

[[example]]
name = "actix-web"
path = "examples/actix-web.rs"

[[example]]
name = "axum"
path = "examples/axum.rs"

[[example]]
name = "basic"
path = "examples/basic.rs"

[[test]]
name = "test_basic_exports"
path = "tests/test_basic_exports.rs"

[[test]]
name = "test_grpc_sink"
path = "tests/test_grpc_sink.rs"

[[test]]
name = "test_http_sink"
path = "tests/test_http_sink.rs"
required-features = ["export-http-json"]

[[test]]
name = "test_log_attributes"
path = "tests/test_log_attributes.rs"

[[test]]
name = "test_macro_hygiene"
path = "tests/test_macro_hygiene.rs"

[[test]]
name = "test_resource_attributes"
path = "tests/test_resource_attributes.rs"

[[test]]
name = "test_span_attributes"
path = "tests/test_span_attributes.rs"

[dependencies.chrono]
version = "0.4.39"

[dependencies.env_filter]
version = "2"

[dependencies.futures-util]
version = "0.3"

[dependencies.http]
version = "1.2"
optional = true

[dependencies.log]
version = "0.4"

[dependencies.logfire-core]
version = "0.11.0"

[dependencies.nu-ansi-term]
version = "0.50.1"

[dependencies.opentelemetry]
version = "0.32"
features = [
    "trace",
    "logs",
]
default-features = false

[dependencies.opentelemetry-otlp]
version = "0.32"
features = [
    "trace",
    "metrics",
    "logs",
]
default-features = false

[dependencies.opentelemetry_sdk]
version = "0.32"
features = [
    "trace",
    "experimental_metrics_custom_reader",
    "experimental_trace_batch_span_processor_with_async_runtime",
    "experimental_logs_batch_log_processor_with_async_runtime",
    "experimental_metrics_periodicreader_with_async_runtime",
    "rt-tokio",
    "logs",
    "spec_unstable_metrics_views",
]
default-features = false

[dependencies.rand]
version = "0.10"

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1.44.1"
features = ["rt-multi-thread"]
default-features = false

[dependencies.tonic]
version = "0.14"
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.tracing-opentelemetry]
version = "0.33"

[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]

[dev-dependencies.actix-web]
version = "4.0"

[dev-dependencies.async-trait]
version = "0.1.88"

[dev-dependencies.axum]
version = "0.8"
features = ["macros"]

[dev-dependencies.axum-otel-metrics]
version = "0.13.0"

[dev-dependencies.axum-tracing-opentelemetry]
version = "0.38"
features = ["tracing_level_info"]

[dev-dependencies.futures]
version = "0.3.31"
features = ["futures-executor"]

[dev-dependencies.futures-util]
version = "0.3"

[dev-dependencies.insta]
version = "1.42.1"

[dev-dependencies.opentelemetry-instrumentation-actix-web]
version = "0.24"
features = ["metrics"]

[dev-dependencies.opentelemetry-proto]
version = "0.32"
features = [
    "tonic",
    "gen-tonic-messages",
]

[dev-dependencies.opentelemetry_sdk]
version = "0.32"
features = ["testing"]
default-features = false

[dev-dependencies.prost]
version = "0.14"

[dev-dependencies.regex]
version = "1.11.1"

[dev-dependencies.serde]
version = "1.0"
features = ["derive"]

[dev-dependencies.serde_json]
version = "1.0"

[dev-dependencies.tempfile]
version = "3.20.0"

[dev-dependencies.tokio]
version = "1.44.1"
features = [
    "test-util",
    "macros",
    "rt-multi-thread",
]

[dev-dependencies.tokio-stream]
version = "0.1"
features = ["net"]

[dev-dependencies.tonic]
version = "0.14"
features = ["transport"]

[dev-dependencies.tonic-build]
version = "0.14"

[dev-dependencies.ulid]
version = "1.2.0"

[dev-dependencies.wiremock]
version = "0.6.4"

[lints.clippy]
dbg_macro = "deny"
implicit_hasher = "allow"
print_stderr = "deny"
print_stdout = "deny"
unwrap_used = "deny"

[lints.clippy.pedantic]
level = "deny"
priority = -1

[lints.rust]
missing_docs = "warn"