[package] name = "autometrics" version = { workspace = true } edition = { workspace = true } authors = { workspace = true } description = { workspace = true } documentation = { workspace = true } repository = { workspace = true } homepage = { workspace = true } license = { workspace = true } keywords = { workspace = true } categories = { workspace = true } readme = "README.md" [features] # Metrics backends metrics-0_21 = ["dep:metrics"] opentelemetry-0_24 = ["opentelemetry/metrics", "dep:prometheus"] prometheus-0_13 = ["dep:prometheus"] prometheus-client-0_22 = ["dep:prometheus-client"] # Deprecated feature flags metrics = ["metrics-0_21"] opentelemetry = ["opentelemetry-0_24"] prometheus = ["prometheus-0_13"] prometheus-client = ["prometheus-client-0_22"] exemplars-tracing-opentelemetry = ["exemplars-tracing-opentelemetry-0_25"] # Misc prometheus-exporter = [ "http", "metrics-exporter-prometheus", "opentelemetry-prometheus", "opentelemetry_sdk", "dep:prometheus", "dep:prometheus-client", ] otel-push-exporter = [ "opentelemetry_sdk", "dep:opentelemetry", "opentelemetry-otlp", "opentelemetry-otlp/metrics", "opentelemetry-otlp/tls-roots", "opentelemetry-otlp/reqwest-rustls" ] otel-push-exporter-http = [ "otel-push-exporter", "opentelemetry-otlp/http-proto" ] otel-push-exporter-grpc = [ "otel-push-exporter", "opentelemetry-otlp/grpc-tonic" ] otel-push-exporter-tokio = [ "otel-push-exporter", "opentelemetry_sdk/rt-tokio" ] otel-push-exporter-tokio-current-thread = [ "otel-push-exporter", "opentelemetry_sdk/rt-tokio-current-thread" ] otel-push-exporter-async-std = [ "otel-push-exporter", "opentelemetry_sdk/rt-async-std" ] # Exemplars exemplars-tracing = ["tracing", "tracing-subscriber"] exemplars-tracing-opentelemetry-0_25 = [ "dep:opentelemetry", "opentelemetry_sdk/trace", "tracing", "dep:tracing-opentelemetry", ] # Custom objectives custom-objective-percentile = [] custom-objective-latency = [] [dependencies] autometrics-macros = { workspace = true } linkme = "0.3" once_cell = "1.17" spez = "0.1.2" thiserror = "1" # Used for opentelemetry feature opentelemetry = { version = "0.24", default-features = false, optional = true } # Use for metrics feature metrics = { version = "0.21", default-features = false, optional = true } # Used for prometheus-exporter feature http = { version = "1.0.0", optional = true } metrics-exporter-prometheus = { version = "0.12", default-features = false, optional = true } opentelemetry-prometheus = { version = "0.17", optional = true } opentelemetry_sdk = { version = "0.24.1", default-features = false, features = [ "metrics", ], optional = true } opentelemetry-otlp = { version = "0.17", default-features = false, optional = true } prometheus = { version = "0.13", default-features = false, optional = true } # Used for prometheus-client feature prometheus-client = { version = "0.22", optional = true } # Used for exemplars-tracing feature tracing = { version = "0.1", optional = true } tracing-subscriber = { version = "0.3", default-features = false, features = [ "registry", ], optional = true } # Used for exemplars-tracing-opentelemetry feature tracing-opentelemetry = { version = "0.25", default-features = false, optional = true } [dev-dependencies] async-trait = "0.1.74" axum = { version = "0.7.2", features = ["tokio"] } criterion = "0.5" http = "1.0.0" opentelemetry = "0.24" opentelemetry-stdout = { version = "0.5", features = ["trace"] } prometheus-client = "0.22" tokio = { version = "1", features = ["full"] } tracing = "0.1" tracing-subscriber = "0.3" trybuild = "1.0" uuid = { version = "1", features = ["v4"] } vergen = { version = "8.1", features = ["git", "gitcl"] } [build-dependencies] cfg_aliases = "0.1" [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] [[bench]] name = "basic_benchmark" harness = false