From 5c139e2d8a260544bc5e730de0440edbab4b0f03 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 22 Oct 2025 17:57:29 +0200 Subject: add support for OTLP logging/tracing (#599) - adds `zentelemetry` project which houses new functionality for serializing logs and traces in OpenTelemetry Protocol format (OTLP) - moved existing stats functionality from `zencore` to `zentelemetry` - adds `TRefCounted` for vtable-less refcounting - adds `MemoryArena` class which allows for linear allocation of memory from chunks - adds `protozero` which is used to encode OTLP protobuf messages --- src/zenserver/diag/logging.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/zenserver/diag/logging.cpp') diff --git a/src/zenserver/diag/logging.cpp b/src/zenserver/diag/logging.cpp index 50cf62274..90af79651 100644 --- a/src/zenserver/diag/logging.cpp +++ b/src/zenserver/diag/logging.cpp @@ -12,6 +12,8 @@ #include #include +#include "otlphttp.h" + ZEN_THIRD_PARTY_INCLUDES_START #include ZEN_THIRD_PARTY_INCLUDES_END @@ -73,6 +75,16 @@ InitializeServerLogging(const ZenServerConfig& InOptions) spdlog::apply_logger_env_levels(ZenClientLogger); spdlog::register_logger(ZenClientLogger); + // + +#if ZEN_WITH_OTEL + if (false) + { + auto OtelSink = std::make_shared("http://signoz.localdomain:4318"); + zen::logging::Default().SpdLogger->sinks().push_back(std::move(OtelSink)); + } +#endif + FinishInitializeLogging(LogOptions); const zen::Oid ServerSessionId = zen::GetSessionId(); -- cgit v1.2.3