Second increment of the per-crate README effort, covering the rest of the infra/wire/priv column: hive-priv, hive-metric, hive-types, hive-sh4re, hive-core-agent-sock, hive-agent-sock. Same shape as the first batch — purpose + when-to-use, and point at the crate-root //! docs plus the relevant docs/ pages rather than duplicating them. Wires readme = "README.md" into each Cargo.toml [package]. Disjoint from the batch-1 crates, so the two increments compose cleanly.
27 lines
945 B
TOML
27 lines
945 B
TOML
[package]
|
|
name = "hive-metric"
|
|
version.workspace = true
|
|
readme = "README.md"
|
|
edition.workspace = true
|
|
|
|
[[bin]]
|
|
name = "hive-metric"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
clap.workspace = true
|
|
# OTEL SDK — only used by this crate, so kept local rather than in workspace.dependencies.
|
|
opentelemetry = "0.32"
|
|
opentelemetry_sdk = { version = "0.32", features = ["metrics"] }
|
|
# Blocking (not async) reqwest client on purpose: the metrics SDK drives the
|
|
# OTLP push from a `PeriodicReader` background thread that has no Tokio runtime,
|
|
# so the async client panics there with "no reactor running". The blocking
|
|
# client sends on that thread directly — and for a fire-and-forget CLI that
|
|
# records one point then `shutdown()`s, a synchronous send is exactly right.
|
|
opentelemetry-otlp = { version = "0.32", default-features = false, features = [
|
|
"metrics",
|
|
"http-json",
|
|
"reqwest-blocking-client",
|
|
"reqwest-rustls",
|
|
] }
|