Skip to content

Commit f6a022e

Browse files
edeNFedpellared
andauthored
Update instrumentation.go
Co-authored-by: Robert Pająk <[email protected]>
1 parent 73a4a33 commit f6a022e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

instrumentation.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,9 @@ func WithSampler(sampler trace.Sampler) InstrumentationOption {
409409
})
410410
}
411411

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 {
412+
func WithResourceAttributes(attrs ...attribute.KeyValue) InstrumentationOption {
416413
return fnOpt(func(_ context.Context, c instConfig) (instConfig, error) {
417-
c.additionalResAttrs = attrs
414+
c.additionalResAttrs = append(c.additionalResAttrs, attrs...)
418415
return c, nil
419416
})
420417
}

0 commit comments

Comments
 (0)