[package]
name                   = "hydra-tracing"
version                = "0.1.0"
edition                = "2024"
license                = "GPL-3.0"
rust-version.workspace = true

[dependencies]
color-eyre.workspace    = true
thiserror.workspace     = true
tracing.workspace       = true
tracing-error.workspace = true
tracing-log.workspace   = true
tracing-subscriber      = { workspace = true, features = [ "registry", "env-filter" ] }

http  = { workspace = true, optional = true }
tonic = { workspace = true, optional = true }

opentelemetry                      = { workspace = true, optional = true }
opentelemetry-http                 = { workspace = true, optional = true }
opentelemetry-otlp                 = { workspace = true, optional = true, features = [ "grpc-tonic" ] }
opentelemetry-semantic-conventions = { workspace = true, optional = true }
opentelemetry_sdk                  = { workspace = true, features = [ "rt-tokio" ], optional = true }
tracing-opentelemetry              = { workspace = true, optional = true }

[features]
otel = [
    "opentelemetry",
    "opentelemetry_sdk",
    "opentelemetry-otlp",
    "opentelemetry-http",
    "opentelemetry-semantic-conventions",
    "tracing-opentelemetry",
]
tonic = [ "dep:tonic", "http" ]
