From 83ddcbb76de5db4bb54d64ced6a37be3f480ed26 Mon Sep 17 00:00:00 2001 From: everpcpc Date: Thu, 19 Sep 2024 18:54:38 +0800 Subject: [PATCH] fix: typo for query & profile logging config --- .../deploy/config/databend-query-node-otlp-logs.toml | 4 ++-- src/common/tracing/src/init.rs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/ci/deploy/config/databend-query-node-otlp-logs.toml b/scripts/ci/deploy/config/databend-query-node-otlp-logs.toml index 3b9df9113073..ad9abf5cdd29 100644 --- a/scripts/ci/deploy/config/databend-query-node-otlp-logs.toml +++ b/scripts/ci/deploy/config/databend-query-node-otlp-logs.toml @@ -52,14 +52,14 @@ dir = "./.databend/logs_1" [log.query] on = true -otlp_endpoint = "http://127.0.0.1:4317/v1/logs" +otlp_endpoint = "http://127.0.0.1:4317" [log.query.otlp_labels] qkey1 = "qvalue1" qkey2 = "qvalue2" [log.profile] on = true -otlp_endpoint = "http://127.0.0.1:4318/v1/logs" +otlp_endpoint = "http://127.0.0.1:4318" otlp_protocol = "http" [log.profile.otlp_labels] pkey1 = "pvalue1" diff --git a/src/common/tracing/src/init.rs b/src/common/tracing/src/init.rs index 52097dca157c..93b5793dfdea 100644 --- a/src/common/tracing/src/init.rs +++ b/src/common/tracing/src/init.rs @@ -228,7 +228,7 @@ pub fn init_logging( .chain([(Cow::from("category"), Cow::from("system"))]); let mut otel_builder = logforth::append::opentelemetry::OpentelemetryLogBuilder::new( log_name, - &cfg.otlp.endpoint.endpoint, + format!("{}/v1/logs", &cfg.otlp.endpoint.endpoint), ) .with_protocol(cfg.otlp.endpoint.protocol.into()); for (k, v) in labels { @@ -305,9 +305,9 @@ pub fn init_logging( .chain([(Cow::from("category"), Cow::from("query"))]); let mut otel_builder = logforth::append::opentelemetry::OpentelemetryLogBuilder::new( log_name, - &cfg.otlp.endpoint.endpoint, + format!("{}/v1/logs", &endpoint.endpoint), ) - .with_protocol(cfg.otlp.endpoint.protocol.into()); + .with_protocol(endpoint.protocol.into()); for (k, v) in labels { otel_builder = otel_builder.add_label(k, v); } @@ -347,9 +347,9 @@ pub fn init_logging( .chain([(Cow::from("category"), Cow::from("profile"))]); let mut otel_builder = logforth::append::opentelemetry::OpentelemetryLogBuilder::new( log_name, - &cfg.otlp.endpoint.endpoint, + format!("{}/v1/logs", &endpoint.endpoint), ) - .with_protocol(cfg.otlp.endpoint.protocol.into()); + .with_protocol(endpoint.protocol.into()); for (k, v) in labels { otel_builder = otel_builder.add_label(k, v); }