mirror of
https://github.com/traefik/traefik
synced 2026-02-03 11:10:33 +00:00
Add missing resource attributes detectors
This commit is contained in:
+4
-2
@@ -189,10 +189,12 @@ func (o *OTelLog) NewLoggerProvider() (*otelsdk.LoggerProvider, error) {
|
||||
|
||||
res, err := resource.New(context.Background(),
|
||||
resource.WithAttributes(attr...),
|
||||
resource.WithContainer(),
|
||||
resource.WithFromEnv(),
|
||||
resource.WithHost(),
|
||||
resource.WithOS(),
|
||||
resource.WithProcess(),
|
||||
resource.WithTelemetrySDK(),
|
||||
resource.WithOSType(),
|
||||
resource.WithProcessCommandArgs(),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("building resource: %w", err)
|
||||
|
||||
@@ -61,10 +61,12 @@ func (c *OTelTracing) Setup(serviceName string, sampleRate float64, resourceAttr
|
||||
|
||||
res, err := resource.New(context.Background(),
|
||||
resource.WithAttributes(attr...),
|
||||
resource.WithContainer(),
|
||||
resource.WithFromEnv(),
|
||||
resource.WithHost(),
|
||||
resource.WithOS(),
|
||||
resource.WithProcess(),
|
||||
resource.WithTelemetrySDK(),
|
||||
resource.WithOSType(),
|
||||
resource.WithProcessCommandArgs(),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("building resource: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user