Skip to content

Commit

Permalink
opentelemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanKung committed Jan 26, 2024
1 parent 09129c4 commit 8670d3d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
2 changes: 0 additions & 2 deletions crates/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ node = [
"form_urlencoded",
"pin-project",
"async-stream",
"opentelemetry",
"opentelemetry-jaeger",
"backtrace",
"lazy_static",
"axum/ws",
Expand Down
23 changes: 0 additions & 23 deletions crates/node/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,6 @@ pub mod node {
.with_writer(std::io::stderr)
.with_filter(level_filter),
);

// Jaeger
let subscriber = {
if let Ok(endpoint) = std::env::var("RINGS_JAEGER_AGENT_ENDPOINT") {
global::set_text_map_propagator(TraceContextPropagator::new());
let jaeger = opentelemetry_jaeger::new_agent_pipeline()
.with_service_name("rings")
.with_endpoint(endpoint)
.with_auto_split_batch(true)
.install_batch(opentelemetry::runtime::Tokio)
.expect("opentelemetry_jaeger install");
subscriber.with(Some(
tracing_opentelemetry::layer()
.with_tracer(jaeger)
.with_filter(level_filter),
))
} else {
subscriber.with(None)
}
};

// Enable log compatible layer to convert log record to tracing span.
// We will ignore any errors that returned by this functions.
let _ = LogTracer::init();
Expand Down Expand Up @@ -206,8 +185,6 @@ pub mod browser {
.build(),
));

//TODO: Jaeger in browser. How to setup agent endpoint?

// Enable log compatible layer to convert log record to tracing span.
// We will ignore any errors that returned by this functions.
let _ = LogTracer::init();
Expand Down

0 comments on commit 8670d3d

Please sign in to comment.