diff --git a/CHANGELOG.md b/CHANGELOG.md index 772f27d53..d3da920be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm The package contains semantic conventions from the `v1.38.0` version of the OpenTelemetry Semantic Conventions. See the [migration documentation](./semconv/v1.38.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.37.0.`(#7648) - Add experimental observability metrics for simple log processor in `go.opentelemetry.io/otel/sdk/log`. (#7548) +- Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.36.0`. (#7656) ### Fixed diff --git a/semconv/v1.36.0/azureconv/metric.go b/semconv/v1.36.0/azureconv/metric.go index 9d08c2ca7..974eb1279 100644 --- a/semconv/v1.36.0/azureconv/metric.go +++ b/semconv/v1.36.0/azureconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package azureconv provides types and functionality for OpenTelemetry semantic // conventions in the "azure" namespace. package azureconv @@ -260,6 +260,7 @@ func (m CosmosDBClientOperationRequestCharge) Record( func (m CosmosDBClientOperationRequestCharge) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/cicdconv/metric.go b/semconv/v1.36.0/cicdconv/metric.go index 2e156d394..4e4d0ea2c 100644 --- a/semconv/v1.36.0/cicdconv/metric.go +++ b/semconv/v1.36.0/cicdconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package cicdconv provides types and functionality for OpenTelemetry semantic // conventions in the "cicd" namespace. package cicdconv @@ -291,6 +291,7 @@ func (m PipelineRunDuration) Record( func (m PipelineRunDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/containerconv/metric.go b/semconv/v1.36.0/containerconv/metric.go index 8bcacf5f4..23990dcd5 100644 --- a/semconv/v1.36.0/containerconv/metric.go +++ b/semconv/v1.36.0/containerconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package containerconv provides types and functionality for OpenTelemetry semantic // conventions in the "container" namespace. package containerconv @@ -268,6 +268,7 @@ func (m CPUUsage) Record( func (m CPUUsage) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -683,6 +684,7 @@ func (m Uptime) Record(ctx context.Context, val float64, attrs ...attribute.KeyV func (m Uptime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/dbconv/metric.go b/semconv/v1.36.0/dbconv/metric.go index 1db72b593..1bb56d48f 100644 --- a/semconv/v1.36.0/dbconv/metric.go +++ b/semconv/v1.36.0/dbconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package dbconv provides types and functionality for OpenTelemetry semantic // conventions in the "db" namespace. package dbconv @@ -421,6 +421,7 @@ func (m ClientConnectionCreateTime) Record( func (m ClientConnectionCreateTime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1060,6 +1061,7 @@ func (m ClientConnectionUseTime) Record( func (m ClientConnectionUseTime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1165,6 +1167,7 @@ func (m ClientConnectionWaitTime) Record( func (m ClientConnectionWaitTime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1271,6 +1274,7 @@ func (m ClientOperationDuration) Record( func (m ClientOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1455,6 +1459,7 @@ func (m ClientResponseReturnedRows) Record( func (m ClientResponseReturnedRows) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/dnsconv/metric.go b/semconv/v1.36.0/dnsconv/metric.go index b5348a23f..2cc5d813a 100644 --- a/semconv/v1.36.0/dnsconv/metric.go +++ b/semconv/v1.36.0/dnsconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package dnsconv provides types and functionality for OpenTelemetry semantic // conventions in the "dns" namespace. package dnsconv @@ -120,6 +120,7 @@ func (m LookupDuration) Record( func (m LookupDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/faasconv/metric.go b/semconv/v1.36.0/faasconv/metric.go index c952a507e..4a4ad43ba 100644 --- a/semconv/v1.36.0/faasconv/metric.go +++ b/semconv/v1.36.0/faasconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package faasconv provides types and functionality for OpenTelemetry semantic // conventions in the "faas" namespace. package faasconv @@ -227,6 +227,7 @@ func (m CPUUsage) Record( func (m CPUUsage) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -432,6 +433,7 @@ func (m InitDuration) Record( func (m InitDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -637,6 +639,7 @@ func (m InvokeDuration) Record( func (m InvokeDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -739,6 +742,7 @@ func (m MemUsage) Record( func (m MemUsage) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -841,6 +845,7 @@ func (m NetIO) Record( func (m NetIO) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/genaiconv/metric.go b/semconv/v1.36.0/genaiconv/metric.go index 7b049c1ca..e2917c04a 100644 --- a/semconv/v1.36.0/genaiconv/metric.go +++ b/semconv/v1.36.0/genaiconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package genaiconv provides types and functionality for OpenTelemetry semantic // conventions in the "gen_ai" namespace. package genaiconv @@ -208,6 +208,7 @@ func (m ClientOperationDuration) Record( func (m ClientOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -351,6 +352,7 @@ func (m ClientTokenUsage) Record( func (m ClientTokenUsage) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -484,6 +486,7 @@ func (m ServerRequestDuration) Record( func (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -624,6 +627,7 @@ func (m ServerTimePerOutputToken) Record( func (m ServerTimePerOutputToken) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -756,6 +760,7 @@ func (m ServerTimeToFirstToken) Record( func (m ServerTimeToFirstToken) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/goconv/metric.go b/semconv/v1.36.0/goconv/metric.go index fe9e2933e..0b5628bab 100644 --- a/semconv/v1.36.0/goconv/metric.go +++ b/semconv/v1.36.0/goconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package goconv provides types and functionality for OpenTelemetry semantic // conventions in the "go" namespace. package goconv @@ -518,6 +518,7 @@ func (m ScheduleDuration) Record(ctx context.Context, val float64, attrs ...attr func (m ScheduleDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/httpconv/metric.go b/semconv/v1.36.0/httpconv/metric.go index 552763e31..c35c82a31 100644 --- a/semconv/v1.36.0/httpconv/metric.go +++ b/semconv/v1.36.0/httpconv/metric.go @@ -316,6 +316,7 @@ func (m ClientConnectionDuration) Record( func (m ClientConnectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -606,6 +607,7 @@ func (m ClientRequestBodySize) Record( func (m ClientRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -770,6 +772,7 @@ func (m ClientRequestDuration) Record( func (m ClientRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -948,6 +951,7 @@ func (m ClientResponseBodySize) Record( func (m ClientResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1241,6 +1245,7 @@ func (m ServerRequestBodySize) Record( func (m ServerRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1408,6 +1413,7 @@ func (m ServerRequestDuration) Record( func (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1589,6 +1595,7 @@ func (m ServerResponseBodySize) Record( func (m ServerResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/hwconv/metric.go b/semconv/v1.36.0/hwconv/metric.go index 2e8ca7f80..2f73550dc 100644 --- a/semconv/v1.36.0/hwconv/metric.go +++ b/semconv/v1.36.0/hwconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package hwconv provides types and functionality for OpenTelemetry semantic // conventions in the "hw" namespace. package hwconv @@ -415,6 +415,7 @@ func (m HostAmbientTemperature) Record( func (m HostAmbientTemperature) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -657,6 +658,7 @@ func (m HostHeatingMargin) Record( func (m HostHeatingMargin) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -782,6 +784,7 @@ func (m HostPower) Record( func (m HostPower) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -905,6 +908,7 @@ func (m Power) Record( func (m Power) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/k8sconv/metric.go b/semconv/v1.36.0/k8sconv/metric.go index 5f6328b9b..689905d29 100644 --- a/semconv/v1.36.0/k8sconv/metric.go +++ b/semconv/v1.36.0/k8sconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package k8sconv provides types and functionality for OpenTelemetry semantic // conventions in the "k8s" namespace. package k8sconv @@ -2359,6 +2359,7 @@ func (m HPAMetricTargetCPUAverageUtilization) Record( func (m HPAMetricTargetCPUAverageUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -2489,6 +2490,7 @@ func (m HPAMetricTargetCPUAverageValue) Record( func (m HPAMetricTargetCPUAverageValue) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -2617,6 +2619,7 @@ func (m HPAMetricTargetCPUValue) Record( func (m HPAMetricTargetCPUValue) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -3925,6 +3928,7 @@ func (m NodeCPUUsage) Record(ctx context.Context, val int64, attrs ...attribute. func (m NodeCPUUsage) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -4012,6 +4016,7 @@ func (m NodeMemoryUsage) Record(ctx context.Context, val int64, attrs ...attribu func (m NodeMemoryUsage) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -4323,6 +4328,7 @@ func (m NodeUptime) Record(ctx context.Context, val float64, attrs ...attribute. func (m NodeUptime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -4500,6 +4506,7 @@ func (m PodCPUUsage) Record(ctx context.Context, val int64, attrs ...attribute.K func (m PodCPUUsage) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -4587,6 +4594,7 @@ func (m PodMemoryUsage) Record(ctx context.Context, val int64, attrs ...attribut func (m PodMemoryUsage) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -4898,6 +4906,7 @@ func (m PodUptime) Record(ctx context.Context, val float64, attrs ...attribute.K func (m PodUptime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/messagingconv/metric.go b/semconv/v1.36.0/messagingconv/metric.go index 5f1837fe6..60cf4159c 100644 --- a/semconv/v1.36.0/messagingconv/metric.go +++ b/semconv/v1.36.0/messagingconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package messagingconv provides types and functionality for OpenTelemetry semantic // conventions in the "messaging" namespace. package messagingconv @@ -364,6 +364,7 @@ func (m ClientOperationDuration) Record( func (m ClientOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -694,6 +695,7 @@ func (m ProcessDuration) Record( func (m ProcessDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/otelconv/metric.go b/semconv/v1.36.0/otelconv/metric.go index f5dd8fe80..cb542d58f 100644 --- a/semconv/v1.36.0/otelconv/metric.go +++ b/semconv/v1.36.0/otelconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package otelconv provides types and functionality for OpenTelemetry semantic // conventions in the "otel" namespace. package otelconv @@ -825,6 +825,7 @@ func (m SDKExporterOperationDuration) Record( func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1343,6 +1344,7 @@ func (m SDKMetricReaderCollectionDuration) Record( func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/processconv/metric.go b/semconv/v1.36.0/processconv/metric.go index 608c62126..7fecd2ac9 100644 --- a/semconv/v1.36.0/processconv/metric.go +++ b/semconv/v1.36.0/processconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package processconv provides types and functionality for OpenTelemetry semantic // conventions in the "process" namespace. package processconv @@ -345,6 +345,7 @@ func (m CPUUtilization) Record( func (m CPUUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1088,6 +1089,7 @@ func (m Uptime) Record(ctx context.Context, val float64, attrs ...attribute.KeyV func (m Uptime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/rpcconv/metric.go b/semconv/v1.36.0/rpcconv/metric.go index 146b7eda6..4b1fc7813 100644 --- a/semconv/v1.36.0/rpcconv/metric.go +++ b/semconv/v1.36.0/rpcconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package rpcconv provides types and functionality for OpenTelemetry semantic // conventions in the "rpc" namespace. package rpcconv @@ -102,6 +102,7 @@ func (m ClientDuration) Record(ctx context.Context, val float64, attrs ...attrib func (m ClientDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -189,6 +190,7 @@ func (m ClientRequestSize) Record(ctx context.Context, val int64, attrs ...attri func (m ClientRequestSize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -280,6 +282,7 @@ func (m ClientRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...at func (m ClientRequestsPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -367,6 +370,7 @@ func (m ClientResponseSize) Record(ctx context.Context, val int64, attrs ...attr func (m ClientResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -458,6 +462,7 @@ func (m ClientResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...a func (m ClientResponsesPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -551,6 +556,7 @@ func (m ServerDuration) Record(ctx context.Context, val float64, attrs ...attrib func (m ServerDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -638,6 +644,7 @@ func (m ServerRequestSize) Record(ctx context.Context, val int64, attrs ...attri func (m ServerRequestSize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -729,6 +736,7 @@ func (m ServerRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...at func (m ServerRequestsPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -816,6 +824,7 @@ func (m ServerResponseSize) Record(ctx context.Context, val int64, attrs ...attr func (m ServerResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -907,6 +916,7 @@ func (m ServerResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...a func (m ServerResponsesPerRPC) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/signalrconv/metric.go b/semconv/v1.36.0/signalrconv/metric.go index 57fb95286..980a1a0fc 100644 --- a/semconv/v1.36.0/signalrconv/metric.go +++ b/semconv/v1.36.0/signalrconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package signalrconv provides types and functionality for OpenTelemetry semantic // conventions in the "signalr" namespace. package signalrconv @@ -257,6 +257,7 @@ func (m ServerConnectionDuration) Record( func (m ServerConnectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Histogram.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/systemconv/metric.go b/semconv/v1.36.0/systemconv/metric.go index 30dd2d24b..c832509c4 100644 --- a/semconv/v1.36.0/systemconv/metric.go +++ b/semconv/v1.36.0/systemconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package systemconv provides types and functionality for OpenTelemetry semantic // conventions in the "system" namespace. package systemconv @@ -332,6 +332,7 @@ func (m CPUFrequency) Record( func (m CPUFrequency) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -679,6 +680,7 @@ func (m CPUUtilization) Record( func (m CPUUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1708,6 +1710,7 @@ func (m FilesystemUtilization) Record( func (m FilesystemUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -3196,6 +3199,7 @@ func (m PagingUtilization) Record( func (m PagingUtilization) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -3489,6 +3493,7 @@ func (m Uptime) Record(ctx context.Context, val float64, attrs ...attribute.KeyV func (m Uptime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) diff --git a/semconv/v1.36.0/vcsconv/metric.go b/semconv/v1.36.0/vcsconv/metric.go index 5f1974cd3..1320589fc 100644 --- a/semconv/v1.36.0/vcsconv/metric.go +++ b/semconv/v1.36.0/vcsconv/metric.go @@ -3,7 +3,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package httpconv provides types and functionality for OpenTelemetry semantic +// Package vcsconv provides types and functionality for OpenTelemetry semantic // conventions in the "vcs" namespace. package vcsconv @@ -382,6 +382,7 @@ func (m ChangeDuration) Record( func (m ChangeDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -515,6 +516,7 @@ func (m ChangeTimeToApproval) Record( func (m ChangeTimeToApproval) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -677,6 +679,7 @@ func (m ChangeTimeToMerge) Record( func (m ChangeTimeToMerge) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -832,6 +835,7 @@ func (m ContributorCount) Record( func (m ContributorCount) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1132,6 +1136,7 @@ func (m RefLinesDelta) Record( func (m RefLinesDelta) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1303,6 +1308,7 @@ func (m RefRevisionsDelta) Record( func (m RefRevisionsDelta) RecordSet(ctx context.Context, val int64, set attribute.Set) { if set.Len() == 0 { m.Int64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption) @@ -1449,6 +1455,7 @@ func (m RefTime) Record( func (m RefTime) RecordSet(ctx context.Context, val float64, set attribute.Set) { if set.Len() == 0 { m.Float64Gauge.Record(ctx, val) + return } o := recOptPool.Get().(*[]metric.RecordOption)