diff options
| author | Stefan Boberg <[email protected]> | 2026-01-19 13:39:03 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-01-19 13:39:03 +0100 |
| commit | ee0c0810b5720a01318a0115da68760b20059459 (patch) | |
| tree | bcd25a41a639b487b9375830ee5e1e0d0c0cf9b6 /src/zenserver/diag/logging.cpp | |
| parent | small doc updates (#715) (diff) | |
| download | zen-ee0c0810b5720a01318a0115da68760b20059459.tar.xz zen-ee0c0810b5720a01318a0115da68760b20059459.zip | |
OTLP/trace improvements (#717)
This PR brings over some changes made to avoid performing setup for otel instrumentation if we are not sending otel information anywhere anyway.
It also adds the ability to configure an OTLP endpoint on the command line using `--otlp-endpoint=<URI>`.
Bear in mind that OTLP support is still not officially supported so this should not be used in production at this stage.
Diffstat (limited to 'src/zenserver/diag/logging.cpp')
| -rw-r--r-- | src/zenserver/diag/logging.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/zenserver/diag/logging.cpp b/src/zenserver/diag/logging.cpp index 80da240e8..4962b9006 100644 --- a/src/zenserver/diag/logging.cpp +++ b/src/zenserver/diag/logging.cpp @@ -78,12 +78,11 @@ InitializeServerLogging(const ZenServerConfig& InOptions, bool WithCacheService) spdlog::register_logger(ZenClientLogger); } - // - #if ZEN_WITH_OTEL - if (false) + if (!InOptions.OtelEndpointUri.empty()) { - auto OtelSink = std::make_shared<zen::logging::OtelHttpProtobufSink>("http://signoz.localdomain:4318"); + // TODO: Should sanity check that endpoint is reachable? Also, a valid URI? + auto OtelSink = std::make_shared<zen::logging::OtelHttpProtobufSink>(InOptions.OtelEndpointUri); zen::logging::Default().SpdLogger->sinks().push_back(std::move(OtelSink)); } #endif |