diff --git a/crates/common/src/config/telemetry.rs b/crates/common/src/config/telemetry.rs index 59d5e91e..a72b68d5 100644 --- a/crates/common/src/config/telemetry.rs +++ b/crates/common/src/config/telemetry.rs @@ -810,7 +810,11 @@ fn apply_events( for event_or_many in event_types { match event_or_many { EventOrMany::Event(event_type) => { - apply_fn(event_type); + if inclusive { + apply_fn(event_type); + } else { + exclude_events.insert(event_type); + } } EventOrMany::StartsWith(value) => { for (event_type, name) in event_names.iter() { diff --git a/tests/resources/otel/stalwart-config.toml b/tests/resources/otel/stalwart-config.toml index 99f8df2c..85e81452 100644 --- a/tests/resources/otel/stalwart-config.toml +++ b/tests/resources/otel/stalwart-config.toml @@ -3,6 +3,5 @@ tracer.otel.transport = "grpc" tracer.otel.endpoint = "http://127.0.0.1:4317" tracer.otel.level = "trace" metrics.open-telemetry.interval = "10s" -metrics.open-telemetry.enable = true metrics.open-telemetry.endpoint = "http://127.0.0.1:4317" metrics.open-telemetry.transport = "grpc"