Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support to configure jaeger agent endpoint for tracing on databend-query #6340

Merged
merged 2 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions common/tracing/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ pub fn init_global_tracing(

// Jaeger layer.
let mut jaeger_layer = None;
let fuse_jaeger_env = env::var("DATABEND_JAEGER").unwrap_or_else(|_| "".to_string());
if !fuse_jaeger_env.is_empty() {
let jaeger_agent_endpoint =
env::var("DATABEND_JAEGER_AGENT_ENDPOINT").unwrap_or_else(|_| "".to_string());
if !jaeger_agent_endpoint.is_empty() {
global::set_text_map_propagator(TraceContextPropagator::new());

let tracer = opentelemetry_jaeger::new_pipeline()
.with_service_name(app_name)
.with_agent_endpoint(jaeger_agent_endpoint)
.install_batch(opentelemetry::runtime::Tokio)
.expect("install");

Expand Down
4 changes: 2 additions & 2 deletions query/bin/databend-query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ async fn main(_global_tracker: Arc<RuntimeTracker>) -> common_exception::Result<
}

let app_name = format!(
"databend-query-{}@{}:{}",
conf.query.cluster_id, conf.query.mysql_handler_host, conf.query.mysql_handler_port
"databend-query-{}-{}@{}",
conf.query.tenant_id, conf.query.cluster_id, conf.query.flight_api_address
);

let mut _sentry_guard = None;
Expand Down