Skip to content

Commit

Permalink
Expose name of tracing and fix install batch issue
Browse files Browse the repository at this point in the history
Previously the tracing service name was defaulted to rust.dora which
prevented some functionalities of Jaeger tracing.

There were also issues with pushing traces as batch as see here: https://github.com/open-telemetry/opentelemetry-rust/issues/674
  • Loading branch information
haixuanTao committed Jul 5, 2022
1 parent b5f5202 commit d7f96e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ impl<'a> Extractor for MetadataMap<'a> {
///
/// TODO: Make Jaeger configurable
///
pub fn init_tracing() -> Result<sdktrace::Tracer, TraceError> {
pub fn init_tracing(name: &str) -> Result<sdktrace::Tracer, TraceError> {
global::set_text_map_propagator(TraceContextPropagator::new());
opentelemetry_jaeger::new_pipeline()
.with_agent_endpoint("172.17.0.1:6831")
.with_service_name("rust.dora")
.install_batch(opentelemetry::runtime::Tokio)
.with_service_name(name)
.install_simple()
}

pub fn serialize_context(context: &Context) -> String {
Expand Down

0 comments on commit d7f96e3

Please sign in to comment.