Skip to content

Commit

Permalink
compute_ctl: print OpenTelemetry errors via tracing, not stdout (#9830)
Browse files Browse the repository at this point in the history
Before, `OpenTelemetry` errors were printed to stdout/stderr directly,
causing one of the few log lines without a timestamp, like:

```
OpenTelemetry trace error occurred. error sending request for url (http://localhost:4318/v1/traces)
```

Now, we print:

```
2024-11-21T02:24:20.511160Z  INFO OpenTelemetry error: error sending request for url (http://localhost:4318/v1/traces)
```

I found this while investigating #9731.
  • Loading branch information
arpad-m authored Nov 21, 2024
1 parent 2d6bf17 commit 59c2c3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compute_tools/src/bin/compute_ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ fn main() -> Result<()> {
fn init() -> Result<(String, clap::ArgMatches)> {
init_tracing_and_logging(DEFAULT_LOG_LEVEL)?;

opentelemetry::global::set_error_handler(|err| {
tracing::info!("OpenTelemetry error: {err}");
})
.expect("global error handler lock poisoned");

let mut signals = Signals::new([SIGINT, SIGTERM, SIGQUIT])?;
thread::spawn(move || {
for sig in signals.forever() {
Expand Down

1 comment on commit 59c2c3f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5535 tests run: 5308 passed, 1 failed, 226 skipped (full report)


Failures on Postgres 17

  • test_non_uploaded_branch_is_deleted_after_restart: debug-x86-64
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_non_uploaded_branch_is_deleted_after_restart[debug-pg17]"
Flaky tests (1)

Postgres 15

Test coverage report is not available

The comment gets automatically updated with the latest test results
59c2c3f at 2024-11-21T05:39:55.258Z :recycle:

Please sign in to comment.