Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(stackable-telemetry): Disable export of h2 events via OTLP #796

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/stackable-telemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ All notable changes to this project will be documented in this file.
- Bump GitHub workflow actions ([#772]).
- Revert `zeroize` version bump ([#772]).

### Fixed

- Prevent infinite events being exported via OTLP, as described in [open-telemetry/opentelemetry-rust#761] ([#796]).

[#772]: https://github.com/stackabletech/operator-rs/pull/772
[#782]: https://github.com/stackabletech/operator-rs/pull/782
[#796]: https://github.com/stackabletech/operator-rs/pull/796
[open-telemetry/opentelemetry-rust#761]: https://github.com/open-telemetry/opentelemetry-rust/issues/761
14 changes: 6 additions & 8 deletions crates/stackable-telemetry/src/tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ impl Tracing {
if self.otlp_log_config.enabled {
let env_filter_layer = EnvFilter::builder()
.with_default_directive(self.otlp_log_config.level_filter.into()) // TODO (@NickLarsenNZ): support Directives
.from_env_lossy();
.from_env_lossy()
// TODO (@NickLarsenNZ): Remove this directive once https://github.com/open-telemetry/opentelemetry-rust/issues/761 is resolved
.add_directive("h2=off".parse().expect("invalid directive"));

let log_exporter = opentelemetry_otlp::new_exporter().tonic();
let otel_log =
Expand All @@ -173,13 +175,9 @@ impl Tracing {
if self.otlp_trace_config.enabled {
let env_filter_layer = EnvFilter::builder()
.with_default_directive(self.otlp_trace_config.level_filter.into()) // TODO (@NickLarsenNZ): support Directives
.from_env_lossy();
// .add_directive("hyper=info".parse().expect("invalid directive"))
// .add_directive("tonic=warn".parse().expect("invalid directive"))
// .add_directive("tokio_util=warn".parse().expect("invalid directive"))
// .add_directive("hyper=info".parse().expect("invalid directive"))
// .add_directive("h2=info".parse().expect("invalid directive"))
// .add_directive("tower=info".parse().expect("invalid directive"));
.from_env_lossy()
// TODO (@NickLarsenNZ): Remove this directive once https://github.com/open-telemetry/opentelemetry-rust/issues/761 is resolved
.add_directive("h2=off".parse().expect("invalid directive"));

let trace_exporter = opentelemetry_otlp::new_exporter().tonic();
let otel_tracer = opentelemetry_otlp::new_pipeline()
Expand Down
Loading