Skip to content

Commit 9cc5f6e

Browse files
authored
feat(observability): export OTLP over HTTP/protobuf to any collector (#5082)
Every OTLP export (gateway traces, OCSF logs, supervisor traces, and the agent trace relay) spoke gRPC only, so trace backends that accept only OTLP/HTTP needed a translating collector in between. Each [openshell.gateway.otlp] table accepts protocol = "grpc" or "http/protobuf". A table without its own endpoint uses the whole shared collector; a table with its own endpoint inherits nothing from it. Compute drivers take the collectors through one shared set of flags, read from the same environment variables that supervisors receive, and pass them on through one SupervisorOtlp value that replaces the per-lane driver fields. OTLP/HTTP goes through a single client in openshell-otel, shared by the SDK exporters and the relay, that bounds each request by the export timeout and fails exports whose response is incomplete or larger than 64 KiB. Exporters send no query parameters, so an endpoint with a query string is a configuration error. Refs #5067 Signed-off-by: Kris Hicks <khicks@nvidia.com>
1 parent 634ca7d commit 9cc5f6e

55 files changed

Lines changed: 2405 additions & 701 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Cargo.lock‎

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ tracing-appender = "0.2"
7373
opentelemetry-proto = { version = "0.33", default-features = false, features = ["gen-tonic", "trace"] }
7474
opentelemetry = "0.33"
7575
opentelemetry_sdk = { version = "0.33", features = ["rt-tokio"] }
76+
opentelemetry-http = { version = "0.33", default-features = false }
7677
opentelemetry-otlp = { version = "0.33", default-features = false, features = ["grpc-tonic", "gzip-tonic", "tls-aws-lc", "tls-roots", "trace"] }
7778
tracing-opentelemetry = { version = "0.34", default-features = false, features = ["tracing-log"] }
7879

‎crates/openshell-core/Cargo.toml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ reqwest = { workspace = true, features = ["blocking", "rustls-tls-native-roots-n
4141
tar = { version = "0.4", optional = true }
4242
tempfile = { version = "3", optional = true }
4343
openshell-otel = { path = "../openshell-otel", optional = true }
44+
clap = { workspace = true, optional = true }
4445

4546
[target.'cfg(unix)'.dependencies]
4647
nix = { workspace = true }
@@ -58,8 +59,12 @@ telemetry = ["dep:reqwest", "dep:chrono", "reqwest?/blocking"]
5859
oauth = ["dep:reqwest"]
5960
## Strict Ed25519 JWT issuance and verification for authenticated sandbox sessions.
6061
jwt = ["dep:jsonwebtoken", "dep:zeroize"]
62+
## Conversions to `openshell-otel` types.
63+
otel = ["dep:openshell-otel"]
64+
## Command-line flags shared by compute drivers.
65+
clap = ["dep:clap"]
6166
## Propagate the active W3C trace context on supervisor gateway calls.
62-
trace-context = ["dep:openshell-otel"]
67+
trace-context = ["otel"]
6368

6469
[build-dependencies]
6570
tonic-prost-build = { workspace = true }

0 commit comments

Comments
 (0)