uniform
Build and Publish / BuildAndDeployArm64 (push) Failing after 7s
Build and Publish / BuildAndDeployAmd64 (push) Failing after 7s

This commit is contained in:
2026-07-20 00:13:24 +02:00
parent 83ed477aa4
commit e6f69f500a
14 changed files with 457 additions and 471 deletions
+3 -3
View File
@@ -15,11 +15,11 @@ import (
)
// SetupOTelSDK bootstraps the OpenTelemetry pipeline (propagator + traces +
// metrics, and an opt-in logger — see NewLoggerProvider). It is shared by every
// metrics, and an opt-in logger controlled by logCfg). It is shared by every
// service main package; the service name comes from OTEL_RESOURCE_ATTRIBUTES, so
// the same setup works everywhere. If it returns no error, call the returned
// shutdown for proper cleanup.
func SetupOTelSDK(ctx context.Context) (func(context.Context) error, error) {
func SetupOTelSDK(ctx context.Context, logCfg LoggerConfig) (func(context.Context) error, error) {
var shutdownFuncs []func(context.Context) error
var err error
@@ -58,7 +58,7 @@ func SetupOTelSDK(ctx context.Context) (func(context.Context) error, error) {
// Logger provider is opt-in via OTEL_LOGS_ENABLED; nil means logs are off.
// Traces + metrics above are always on.
loggerProvider, err := NewLoggerProvider(ctx)
loggerProvider, err := NewLoggerProvider(ctx, logCfg)
if err != nil {
handleErr(err)
return shutdown, err