Skip to content

Commit

Permalink
fix(config): Do not panic for observability config (#2639)
Browse files Browse the repository at this point in the history
## What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->

## Why ❔

<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.

Signed-off-by: Danil <[email protected]>
  • Loading branch information
Deniallugo committed Sep 2, 2024
1 parent 178b386 commit 1e768d4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/lib/protobuf_config/src/observability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ impl ProtoRepr for proto::Observability {
sentry_url,
sentry_environment,
log_format: required(&self.log_format).context("log_format")?.clone(),
opentelemetry: self
.opentelemetry
.as_ref()
.map(|cfg| cfg.read().context("opentelemetry"))
.transpose()?,
opentelemetry: self.opentelemetry.as_ref().and_then(|cfg| cfg.read().ok()),
log_directives: self.log_directives.clone(),
})
}
Expand Down

0 comments on commit 1e768d4

Please sign in to comment.