Skip to content

Commit

Permalink
opentelemetry: Disable events for NoopLogger
Browse files Browse the repository at this point in the history
NoopLogger should be using a little resources as possible ideally none.
This should help accomplish that.
  • Loading branch information
hdost committed Feb 6, 2024
1 parent 6221d8d commit 9de34eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion opentelemetry/CHANGELOG.md
Expand Up @@ -6,7 +6,7 @@

- [#1410](https://github.com/open-telemetry/opentelemetry-rust/pull/1410) Add experimental synchronous gauge. This is behind the feature flag, and can be enabled by enabling the feature `otel_unstable` for opentelemetry crate.

- [#1410](https://github.com/open-telemetry/opentelemetry-rust/pull/1410) Guidelines to add new unstable/experimental features.
- [#1410](https://github.com/open-telemetry/opentelemetry-rust/pull/1410) Guidelines to add new unstable/experimental features.

### Changed

Expand All @@ -27,6 +27,8 @@ gains, and avoids `IndexMap` dependency. This affects `body` and `attributes` of
`observe()` calls, and only accept a precreated `AttributeSet`
value.
[#1421](https://github.com/open-telemetry/opentelemetry-rust/pull/1421)
- Turned off events for NoopLogger to save on operations
[1455](https://github.com/open-telemetry/opentelemetry-rust/issues/1455)

### Removed

Expand Down
2 changes: 1 addition & 1 deletion opentelemetry/src/logs/noop.rs
Expand Up @@ -42,6 +42,6 @@ impl Logger for NoopLogger {
fn emit(&self, _record: LogRecord) {}
#[cfg(feature = "logs_level_enabled")]
fn event_enabled(&self, _level: super::Severity, _target: &str) -> bool {
true
false

Check warning on line 45 in opentelemetry/src/logs/noop.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry/src/logs/noop.rs#L45

Added line #L45 was not covered by tests
}
}

0 comments on commit 9de34eb

Please sign in to comment.