We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73a4a33 commit f6a022eCopy full SHA for f6a022e
instrumentation.go
@@ -409,12 +409,9 @@ func WithSampler(sampler trace.Sampler) InstrumentationOption {
409
})
410
}
411
412
-// WithAdditionalResourceAttributes returns an [InstrumentationOption] that will
413
-// configure an [Instrumentation] to use the provided attributes as additional
414
-// OpenTelemetry Resource attributes.
415
-func WithAdditionalResourceAttributes(attrs []attribute.KeyValue) InstrumentationOption {
+func WithResourceAttributes(attrs ...attribute.KeyValue) InstrumentationOption {
416
return fnOpt(func(_ context.Context, c instConfig) (instConfig, error) {
417
- c.additionalResAttrs = attrs
+ c.additionalResAttrs = append(c.additionalResAttrs, attrs...)
418
return c, nil
419
420
0 commit comments