[package]
name = "id_effect_opentelemetry"
version = "0.3.0"
edition = "2024"
license = "CC-BY-SA-4.0"
description = "OpenTelemetry tracing and metrics integration for id_effect (Phase B / @effect/opentelemetry parity)"
repository = "https://github.com/Industrial/id_effect"
readme = "README.md"
keywords = ["effect", "opentelemetry", "tracing", "observability"]
categories = ["development-tools"]

[lints.rust]
unsafe_code = "forbid"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)'] }

[features]
default = ["otlp"]
otlp = ["dep:opentelemetry-otlp", "dep:opentelemetry-semantic-conventions"]
config = ["dep:id_effect_config"]
platform = ["dep:id_effect_platform"]

[dependencies]
id_effect = { path = "../id_effect", version = "0.3.0" }
id_effect_logger = { path = "../id_effect_logger", version = "0.3.0" }
id_effect_config = { path = "../id_effect_config", version = "0.3.0", optional = true }
id_effect_platform = { path = "../id_effect_platform", version = "0.3.0", optional = true }
opentelemetry = { version = "0.32", default-features = false, features = [
  "trace",
  "metrics",
  "logs",
] }
opentelemetry_sdk = { version = "0.32", default-features = false, features = [
  "trace",
  "metrics",
  "logs",
  "rt-tokio",
  "testing",
] }
opentelemetry-otlp = { version = "0.32", optional = true, default-features = false, features = [
  "trace",
  "metrics",
  "logs",
  "grpc-tonic",
  "http-proto",
] }
opentelemetry-semantic-conventions = { version = "0.32", optional = true }
opentelemetry-appender-tracing = "0.32"
# Minimum version that introduced the `wrappers` module required by opentelemetry_sdk's rt-tokio feature.
# This fixes `cargo -Z minimal-versions` which otherwise resolves tokio-stream to 0.1.0 (no wrappers).
tokio-stream = { version = "0.1.3", default-features = false, features = [
  "time",
] }
tracing = "0.1"
tracing-opentelemetry = "0.33"
tracing-subscriber = { version = "0.3", default-features = false, features = [
  "registry",
  "fmt",
  "std",
  "env-filter",
] }

tokio = { version = "1.50.0", default-features = false, features = [
  "macros",
  "rt",
  "signal",
] }
axum = { version = "0.8" }
http = "1"

[dev-dependencies]
id_effect_tokio = { path = "../id_effect_tokio" }
tower = { version = "0.5", features = ["util"] }
tokio = { version = "1.50.0", features = [
  "macros",
  "rt-multi-thread",
  "signal",
] }
