fix(otel)!: do not use a global client

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
2025-06-09 10:28:42 +02:00
parent b6f8257981
commit 52083569c5
7 changed files with 64 additions and 64 deletions

View File

@ -7,11 +7,14 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp"
"go.opentelemetry.io/otel/log/global"
sdklog "go.opentelemetry.io/otel/sdk/log"
"go.linka.cloud/grpc-toolkit/logger"
)
func configureLogging(ctx context.Context, conf *config) *sdklog.LoggerProvider {
log := logger.C(ctx)
var opts []sdklog.LoggerProviderOption
if res := conf.newResource(); res != nil {
if res := conf.newResource(ctx); res != nil {
opts = append(opts, sdklog.WithResource(res))
}