Add missing resource attributes detectors
This commit is contained in:
parent
9862cd6780
commit
91331415ce
3 changed files with 12 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue