rtb-telemetry 0.7.1

Opt-in anonymous usage telemetry with pluggable sinks. Part of the phpboyscout Rust toolkit.
Documentation
[package]
name = "rtb-telemetry"
description = "Opt-in anonymous usage telemetry with pluggable sinks. Part of the phpboyscout Rust toolkit."
version = "0.7.1"
edition = "2021"
rust-version = "1.82"
license = "MIT"
authors = ["Matt Cockayne <matt@phpboyscout.com>"]
repository = "https://gitlab.com/phpboyscout/rust/telemetry"
homepage = "https://telemetry.rust.phpboyscout.uk"
documentation = "https://docs.rs/rtb-telemetry"
readme = "README.md"
categories = ["development-tools"]
keywords = ["telemetry", "analytics", "privacy", "opt-in", "sinks"]

[lints.rust]
# `deny` (not forbid) so test files can `#![allow]` when they genuinely
# need it; `src/lib.rs` ships `#![forbid(unsafe_code)]` — that is the
# production guarantee.
unsafe_code = "deny"
missing_docs = "warn"

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
module_name_repetitions = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
multiple_crate_versions = "allow"

[features]
default = []
# Enables HttpSink + OtlpSink (gRPC + HTTP/protobuf transports).
# Pulls in reqwest, url, secrecy, and the opentelemetry stack.
remote-sinks = [
    "dep:reqwest",
    "dep:url",
    "dep:secrecy",
    "dep:opentelemetry",
    "dep:opentelemetry_sdk",
    "dep:opentelemetry-otlp",
    "dep:tonic",
]

[dependencies]
machine-uid = "0.6.0"
sha2 = "0.11.0"
tokio = { version = "1.53.0", features = ["full"] }
async-trait = "0.1.91"
serde = { version = "1.0.229", features = ["derive"] }
serde_json = "1.0.150"
thiserror = "2.0.19"
miette = { version = "7.6.0", features = ["fancy"] }
time = { version = "0.3.53", features = ["serde", "formatting", "parsing", "macros"] }
toml = "1.1.3"
uuid = { version = "1.24.0", features = ["v4", "serde"] }
rtb-redact = "0.6.0"

# Optional — gated on the `remote-sinks` feature.
reqwest = { version = "0.13.4", default-features = false, features = ["rustls", "json", "stream", "gzip"], optional = true }
url = { version = "2.5.8", optional = true }
secrecy = { version = "0.10.3", optional = true }
opentelemetry = { version = "0.32.0", optional = true }
opentelemetry_sdk = { version = "0.32.1", features = ["rt-tokio"], optional = true }
opentelemetry-otlp = { version = "0.32.0", default-features = false, features = ["grpc-tonic", "http-proto", "reqwest-client", "logs", "trace"], optional = true }
tonic = { version = "0.14.6", optional = true }

[dev-dependencies]
cucumber = { version = "0.23.0", features = ["macros"] }
insta = { version = "1.48.0", features = ["yaml", "json"] }
tempfile = "3.27.0"
wiremock = "0.6.5"