Skip to content

Conversation

@congx4
Copy link
Contributor

@congx4 congx4 commented Dec 22, 2025

Description

cargo upgrade --incompatible
-p opentelemetry
-p opentelemetry_sdk
-p opentelemetry-otlp
-p tracing-opentelemetry
&& cargo check --all-targets

cargo upgrade --incompatible
-p rand
-p rand_distr
&& cargo check --all-targets && cargo test

How was this PR tested?

cargo check --all-targets && cargo test

make test-all

@congx4 congx4 marked this pull request as ready for review December 23, 2025 22:08
0
};

global::shutdown_tracer_provider();
Copy link
Member

Choose a reason for hiding this comment

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

We need to call .shutdown on the processor in order to flush and send the in-flight spans. You will have to refactor setup_logging_and_tracing a little bit to do so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Returned the trace_provider from setup_logging_and_tracing, so it can be shutdown from main.rs.

let parent_cx =
global::get_text_map_propagator(|prop| prop.extract(&MetadataMap(request_metadata)));
Span::current().set_parent(parent_cx);
let _ = Span::current().set_parent(parent_cx);
Copy link
Member

Choose a reason for hiding this comment

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

When can this fail now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when I run cargo check --all-targets && cargo test in local, it is just warning:

warning: unused `Result` that must be used
   --> quickwit-proto/src/lib.rs:199:5
    |
199 |     Span::current().set_parent(parent_cx);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this `Result` may be an `Err` variant, which should be handled
    = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default
help: use `let _ = ...` to ignore the resulting value
    |
199 |     let _ = Span::current().set_parent(parent_cx);
    |     +++++++

But during CI phase, it shows as an error.

@congx4 congx4 requested a review from guilload December 26, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants