You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am investigating how we could leverage CloudEvents within my org, but am uncertain how we can include tracing information in a CloudEvent so that traces can be followed across service boundaries and correlated by Jaeger / Tempo.
For example:
One service is written in Rust, and it leverages the tracing crate. The functions are leveraging the instrument macro and with tracing configured as seen here. We'd like to publish a CloudEvent externally to the application (Kafa for example), and we see that we should use this extension extension API, but there no examples how to use it.
Describe the solution you'd like
An example added to the /examples folder where an event is published that includes tracing information according to the CloudEvents distributed tracing spec whilst using the tracing crate, the most prominent tracing crate for Rust.
let example_event = cloudevents::EventBuilderV10::new().id(Ulid::new()).source(SOURCE_NAME).ty(EXAMPLE_EVENT_TYPE).time(chrono::Utc::now()).subject(example_object.id).data(
mime::APPLICATION_OCTET_STREAM.to_string(),
bincode::serialize(&example_object)?,).extension("traceparent", bincode::serialize(&WHAT_GOES_HERE))// <-- How to get values as required by traceparent here?.build()?;
The text was updated successfully, but these errors were encountered:
Found the solution. I still think adding an example is a good idea, and I'm also wondering if a builder param behind a feature flag makes sense here to automate all this boilerplate?
Is your feature request related to a problem? Please describe.
I am investigating how we could leverage CloudEvents within my org, but am uncertain how we can include tracing information in a CloudEvent so that traces can be followed across service boundaries and correlated by Jaeger / Tempo.
For example:
One service is written in Rust, and it leverages the
tracing
crate. The functions are leveraging the instrument macro and with tracing configured as seen here. We'd like to publish a CloudEvent externally to the application (Kafa for example), and we see that we should use this extension extension API, but there no examples how to use it.Describe the solution you'd like
An example added to the /examples folder where an event is published that includes tracing information according to the CloudEvents distributed tracing spec whilst using the
tracing
crate, the most prominent tracing crate for Rust.The text was updated successfully, but these errors were encountered: