1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

Fix package documentation name and return error in semconv/v1.36.0 (#7656)

Identified in the review of #7648
This commit is contained in:
Tyler Yahn
2025-12-05 08:18:09 -08:00
committed by GitHub
parent be85ff8704
commit a64b9ec518
19 changed files with 88 additions and 17 deletions
+2 -1
View File
@@ -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)
+2 -1
View File
@@ -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)
+3 -1
View File
@@ -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)
+6 -1
View File
@@ -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)
+2 -1
View File
@@ -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)
+6 -1
View File
@@ -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)
+6 -1
View File
@@ -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)
+2 -1
View File
@@ -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)
+7
View File
@@ -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)
+5 -1
View File
@@ -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)
+10 -1
View File
@@ -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)
+3 -1
View File
@@ -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)
+3 -1
View File
@@ -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)
+3 -1
View File
@@ -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)
+11 -1
View File
@@ -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)
+2 -1
View File
@@ -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)
+6 -1
View File
@@ -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)
+8 -1
View File
@@ -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)