Merge branch 'pratik/otel-phase1b-telemetry-infra' into pratik/otel-phase1c-rpc-integration

This commit is contained in:
Pratik Mankawde
2026-07-08 15:18:06 +01:00
2 changed files with 7 additions and 0 deletions

View File

@@ -91,6 +91,7 @@
#include <atomic>
#include <chrono>
#include <cstdint>
#include <memory>
#include <string>
#include <string_view>

View File

@@ -274,7 +274,9 @@ public:
otlp_http::OtlpHttpExporterOptions exporterOpts;
exporterOpts.url = setup_.exporterEndpoint;
if (setup_.useTls)
{
exporterOpts.ssl_ca_cert_path = setup_.tlsCertPath;
}
auto exporter = otlp_http::OtlpHttpExporterFactory::Create(exporterOpts);
@@ -394,7 +396,9 @@ public:
getTracer(std::string_view name = kTracerName) override
{
if (!sdkProvider_)
{
return trace_api::Provider::GetTracerProvider()->GetTracer(std::string(name));
}
return sdkProvider_->GetTracer(std::string(name));
}
@@ -427,7 +431,9 @@ std::unique_ptr<Telemetry>
makeTelemetry(Telemetry::Setup const& setup, beast::Journal journal)
{
if (setup.enabled)
{
return std::make_unique<TelemetryImpl>(setup, journal);
}
return std::make_unique<NullTelemetryOtel>(setup);
}