1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-03-17 20:57:51 +02:00

doc(metric): fix incorrect explanation of how metric.WithAttributes works (#5822)

This commit is contained in:
Cattī Crūdēlēs 2024-09-16 15:09:28 +08:00 committed by GitHub
parent 80e18a5841
commit 38b9734230
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,7 +351,7 @@ func WithAttributeSet(attributes attribute.Set) MeasurementOption {
//
// cp := make([]attribute.KeyValue, len(attributes))
// copy(cp, attributes)
// WithAttributes(attribute.NewSet(cp...))
// WithAttributeSet(attribute.NewSet(cp...))
//
// [attribute.NewSet] may modify the passed attributes so this will make a copy
// of attributes before creating a set in order to ensure this function is