swarm-queue-client: add an authenticated HttpClient for OTLP exporters (otel-auth feature)
This commit is contained in:
parent
e8584e595b
commit
7913be5435
5 changed files with 147 additions and 0 deletions
23
Cargo.toml
23
Cargo.toml
|
|
@ -144,6 +144,29 @@ opentelemetry-otlp = { version = "0.32", default-features = false, features = [
|
|||
"reqwest-blocking-client",
|
||||
"reqwest-rustls",
|
||||
] }
|
||||
# The trait an OTLP exporter's HTTP transport is built on
|
||||
# (`opentelemetry_otlp::WithHttpConfig::with_http_client`) — pulled in
|
||||
# directly (not just transitively via `opentelemetry-otlp` above) by
|
||||
# `swarm-queue-client`'s `otel-auth` feature, which implements the trait
|
||||
# itself rather than using the crate's own blanket `reqwest`/
|
||||
# `reqwest-blocking` impls (this workspace's implementation needs to mint
|
||||
# a fresh bearer token per request, which no blanket impl can do). No
|
||||
# extra cargo features requested here for exactly that reason — the
|
||||
# blanket impls live behind `reqwest`/`reqwest-blocking` features this
|
||||
# workspace never turns on for this crate.
|
||||
opentelemetry-http = "0.32"
|
||||
# `async-trait`: `opentelemetry_http::HttpClient` predates stable
|
||||
# `async fn` in traits and is still expressed with this macro upstream —
|
||||
# implementing the trait (rather than only consuming the crate's own
|
||||
# blanket impls) means writing `#[async_trait::async_trait]` on the impl
|
||||
# block to match its expansion.
|
||||
async-trait = "0.1"
|
||||
# `bytes`/`http`: the payload and request/response types
|
||||
# `opentelemetry_http::HttpClient::send_bytes` is expressed in terms of —
|
||||
# needed to implement the trait, not just call something that already
|
||||
# does.
|
||||
bytes = "1"
|
||||
http = "1"
|
||||
http-body-util = "0.1"
|
||||
# ⚠️ Keep at 0.11.1 or newer, and keep it on the SAME reqwest as everything
|
||||
# else. 0.11.0 links reqwest 0.12 while the workspace is on 0.13, and cargo
|
||||
|
|
|
|||
Loading…
Reference in a new issue