feat: allow setting service.name for OTLP metrics

This commit is contained in:
Carlos Martell 2024-09-27 02:58:05 -07:00 committed by GitHub
parent 7bb181dfa0
commit eccfcc0924
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 202 additions and 143 deletions

View file

@ -207,7 +207,7 @@ func newOpenTelemetryMeterProvider(ctx context.Context, config *types.OTLP) (*sd
}
res, err := resource.New(ctx,
resource.WithAttributes(semconv.ServiceNameKey.String("traefik")),
resource.WithAttributes(semconv.ServiceNameKey.String(config.ServiceName)),
resource.WithAttributes(semconv.ServiceVersionKey.String(version.Version)),
resource.WithFromEnv(),
resource.WithTelemetrySDK(),