You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
Semconv metric helper caller-slice mutation fix (#7993)
This PR addresses issue #7987 (issue (1)): generated semconv metric helpers should not risk mutating caller-provided `attrs` backing arrays when required attributes are appended. Update the generator logic to merge required-attribute using capacity clamping before append: ``` append(attrs[:len(attrs):len(attrs)], requiredAttrs...) ``` This guarantees append allocates a new backing array for the merged slice instead of writing into caller memory when there are attributes appended. It makes not allocations in the case attributes are not appended.
This commit is contained in:
@@ -95,7 +95,7 @@ Int64
|
|||||||
{{ prefix }}metric.WithAttributes(
|
{{ prefix }}metric.WithAttributes(
|
||||||
{%- if attrs | required | length > 0 %}
|
{%- if attrs | required | length > 0 %}
|
||||||
{{ prefix }} append(
|
{{ prefix }} append(
|
||||||
{{ prefix }} attrs,
|
{{ prefix }} attrs[:len(attrs):len(attrs)],
|
||||||
{%- for attr in attrs | required | attribute_sort %}
|
{%- for attr in attrs | required | attribute_sort %}
|
||||||
{{ prefix }} {{ to_attribute(attr, pkg) }}
|
{{ prefix }} {{ to_attribute(attr, pkg) }}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ func (m CosmosDBClientOperationRequestCharge) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.operation.name", dbOperationName),
|
attribute.String("db.operation.name", dbOperationName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ func (m PipelineRunActive) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("cicd.pipeline.name", pipelineName),
|
attribute.String("cicd.pipeline.name", pipelineName),
|
||||||
attribute.String("cicd.pipeline.run.state", string(pipelineRunState)),
|
attribute.String("cicd.pipeline.run.state", string(pipelineRunState)),
|
||||||
)...,
|
)...,
|
||||||
@@ -299,7 +299,7 @@ func (m PipelineRunDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("cicd.pipeline.name", pipelineName),
|
attribute.String("cicd.pipeline.name", pipelineName),
|
||||||
attribute.String("cicd.pipeline.run.state", string(pipelineRunState)),
|
attribute.String("cicd.pipeline.run.state", string(pipelineRunState)),
|
||||||
)...,
|
)...,
|
||||||
@@ -434,7 +434,7 @@ func (m PipelineRunErrors) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("cicd.pipeline.name", pipelineName),
|
attribute.String("cicd.pipeline.name", pipelineName),
|
||||||
attribute.String("error.type", string(errorType)),
|
attribute.String("error.type", string(errorType)),
|
||||||
)...,
|
)...,
|
||||||
@@ -557,7 +557,7 @@ func (m SystemErrors) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("cicd.system.component", systemComponent),
|
attribute.String("cicd.system.component", systemComponent),
|
||||||
attribute.String("error.type", string(errorType)),
|
attribute.String("error.type", string(errorType)),
|
||||||
)...,
|
)...,
|
||||||
@@ -671,7 +671,7 @@ func (m WorkerCount) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("cicd.worker.state", string(workerState)),
|
attribute.String("cicd.worker.state", string(workerState)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ func (m ClientConnectionCount) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
attribute.String("db.client.connection.state", string(clientConnectionState)),
|
attribute.String("db.client.connection.state", string(clientConnectionState)),
|
||||||
)...,
|
)...,
|
||||||
@@ -429,7 +429,7 @@ func (m ClientConnectionCreateTime) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -545,7 +545,7 @@ func (m ClientConnectionIdleMax) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -661,7 +661,7 @@ func (m ClientConnectionIdleMin) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -777,7 +777,7 @@ func (m ClientConnectionMax) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -895,7 +895,7 @@ func (m ClientConnectionPendingRequests) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1012,7 +1012,7 @@ func (m ClientConnectionTimeouts) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1129,7 +1129,7 @@ func (m ClientConnectionUseTime) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1245,7 +1245,7 @@ func (m ClientConnectionWaitTime) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
attribute.String("db.client.connection.pool.name", clientConnectionPoolName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1360,7 +1360,7 @@ func (m ClientOperationDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.system.name", string(systemName)),
|
attribute.String("db.system.name", string(systemName)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1557,7 +1557,7 @@ func (m ClientResponseReturnedRows) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("db.system.name", string(systemName)),
|
attribute.String("db.system.name", string(systemName)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ func (m LookupDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("dns.question.name", questionName),
|
attribute.String("dns.question.name", questionName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ func (m ClientOperationDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("gen_ai.operation.name", string(operationName)),
|
attribute.String("gen_ai.operation.name", string(operationName)),
|
||||||
attribute.String("gen_ai.provider.name", string(providerName)),
|
attribute.String("gen_ai.provider.name", string(providerName)),
|
||||||
)...,
|
)...,
|
||||||
@@ -391,7 +391,7 @@ func (m ClientTokenUsage) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("gen_ai.operation.name", string(operationName)),
|
attribute.String("gen_ai.operation.name", string(operationName)),
|
||||||
attribute.String("gen_ai.provider.name", string(providerName)),
|
attribute.String("gen_ai.provider.name", string(providerName)),
|
||||||
attribute.String("gen_ai.token.type", string(tokenType)),
|
attribute.String("gen_ai.token.type", string(tokenType)),
|
||||||
@@ -537,7 +537,7 @@ func (m ServerRequestDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("gen_ai.operation.name", string(operationName)),
|
attribute.String("gen_ai.operation.name", string(operationName)),
|
||||||
attribute.String("gen_ai.provider.name", string(providerName)),
|
attribute.String("gen_ai.provider.name", string(providerName)),
|
||||||
)...,
|
)...,
|
||||||
@@ -689,7 +689,7 @@ func (m ServerTimePerOutputToken) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("gen_ai.operation.name", string(operationName)),
|
attribute.String("gen_ai.operation.name", string(operationName)),
|
||||||
attribute.String("gen_ai.provider.name", string(providerName)),
|
attribute.String("gen_ai.provider.name", string(providerName)),
|
||||||
)...,
|
)...,
|
||||||
@@ -833,7 +833,7 @@ func (m ServerTimeToFirstToken) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("gen_ai.operation.name", string(operationName)),
|
attribute.String("gen_ai.operation.name", string(operationName)),
|
||||||
attribute.String("gen_ai.provider.name", string(providerName)),
|
attribute.String("gen_ai.provider.name", string(providerName)),
|
||||||
)...,
|
)...,
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ func (m ClientActiveRequests) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("server.address", serverAddress),
|
attribute.String("server.address", serverAddress),
|
||||||
attribute.Int("server.port", serverPort),
|
attribute.Int("server.port", serverPort),
|
||||||
)...,
|
)...,
|
||||||
@@ -320,7 +320,7 @@ func (m ClientConnectionDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("server.address", serverAddress),
|
attribute.String("server.address", serverAddress),
|
||||||
attribute.Int("server.port", serverPort),
|
attribute.Int("server.port", serverPort),
|
||||||
)...,
|
)...,
|
||||||
@@ -467,7 +467,7 @@ func (m ClientOpenConnections) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.connection.state", string(connectionState)),
|
attribute.String("http.connection.state", string(connectionState)),
|
||||||
attribute.String("server.address", serverAddress),
|
attribute.String("server.address", serverAddress),
|
||||||
attribute.Int("server.port", serverPort),
|
attribute.Int("server.port", serverPort),
|
||||||
@@ -620,7 +620,7 @@ func (m ClientRequestBodySize) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.request.method", string(requestMethod)),
|
attribute.String("http.request.method", string(requestMethod)),
|
||||||
attribute.String("server.address", serverAddress),
|
attribute.String("server.address", serverAddress),
|
||||||
attribute.Int("server.port", serverPort),
|
attribute.Int("server.port", serverPort),
|
||||||
@@ -800,7 +800,7 @@ func (m ClientRequestDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.request.method", string(requestMethod)),
|
attribute.String("http.request.method", string(requestMethod)),
|
||||||
attribute.String("server.address", serverAddress),
|
attribute.String("server.address", serverAddress),
|
||||||
attribute.Int("server.port", serverPort),
|
attribute.Int("server.port", serverPort),
|
||||||
@@ -980,7 +980,7 @@ func (m ClientResponseBodySize) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.request.method", string(requestMethod)),
|
attribute.String("http.request.method", string(requestMethod)),
|
||||||
attribute.String("server.address", serverAddress),
|
attribute.String("server.address", serverAddress),
|
||||||
attribute.Int("server.port", serverPort),
|
attribute.Int("server.port", serverPort),
|
||||||
@@ -1157,7 +1157,7 @@ func (m ServerActiveRequests) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.request.method", string(requestMethod)),
|
attribute.String("http.request.method", string(requestMethod)),
|
||||||
attribute.String("url.scheme", urlScheme),
|
attribute.String("url.scheme", urlScheme),
|
||||||
)...,
|
)...,
|
||||||
@@ -1297,7 +1297,7 @@ func (m ServerRequestBodySize) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.request.method", string(requestMethod)),
|
attribute.String("http.request.method", string(requestMethod)),
|
||||||
attribute.String("url.scheme", urlScheme),
|
attribute.String("url.scheme", urlScheme),
|
||||||
)...,
|
)...,
|
||||||
@@ -1484,7 +1484,7 @@ func (m ServerRequestDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.request.method", string(requestMethod)),
|
attribute.String("http.request.method", string(requestMethod)),
|
||||||
attribute.String("url.scheme", urlScheme),
|
attribute.String("url.scheme", urlScheme),
|
||||||
)...,
|
)...,
|
||||||
@@ -1671,7 +1671,7 @@ func (m ServerResponseBodySize) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("http.request.method", string(requestMethod)),
|
attribute.String("http.request.method", string(requestMethod)),
|
||||||
attribute.String("url.scheme", urlScheme),
|
attribute.String("url.scheme", urlScheme),
|
||||||
)...,
|
)...,
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ func (m BatteryCharge) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -427,7 +427,7 @@ func (m BatteryChargeLimit) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -596,7 +596,7 @@ func (m BatteryTimeLeft) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.state", string(state)),
|
attribute.String("hw.state", string(state)),
|
||||||
)...,
|
)...,
|
||||||
@@ -757,7 +757,7 @@ func (m CPUSpeed) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -896,7 +896,7 @@ func (m CPUSpeedLimit) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1045,7 +1045,7 @@ func (m Energy) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.type", string(hwType)),
|
attribute.String("hw.type", string(hwType)),
|
||||||
)...,
|
)...,
|
||||||
@@ -1176,7 +1176,7 @@ func (m Errors) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.type", string(hwType)),
|
attribute.String("hw.type", string(hwType)),
|
||||||
)...,
|
)...,
|
||||||
@@ -1316,7 +1316,7 @@ func (m FanSpeed) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1448,7 +1448,7 @@ func (m FanSpeedLimit) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1586,7 +1586,7 @@ func (m FanSpeedRatio) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1722,7 +1722,7 @@ func (m GpuIO) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("network.io.direction", string(networkIoDirection)),
|
attribute.String("network.io.direction", string(networkIoDirection)),
|
||||||
)...,
|
)...,
|
||||||
@@ -1883,7 +1883,7 @@ func (m GpuMemoryLimit) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -2042,7 +2042,7 @@ func (m GpuMemoryUsage) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -2202,7 +2202,7 @@ func (m GpuMemoryUtilization) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -2362,7 +2362,7 @@ func (m GpuUtilization) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -2528,7 +2528,7 @@ func (m HostAmbientTemperature) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -2659,7 +2659,7 @@ func (m HostEnergy) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -2791,7 +2791,7 @@ func (m HostHeatingMargin) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -2922,7 +2922,7 @@ func (m HostPower) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -3053,7 +3053,7 @@ func (m LogicalDiskLimit) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -3190,7 +3190,7 @@ func (m LogicalDiskUsage) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.logical_disk.state", string(logicalDiskState)),
|
attribute.String("hw.logical_disk.state", string(logicalDiskState)),
|
||||||
)...,
|
)...,
|
||||||
@@ -3328,7 +3328,7 @@ func (m LogicalDiskUtilization) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.logical_disk.state", string(logicalDiskState)),
|
attribute.String("hw.logical_disk.state", string(logicalDiskState)),
|
||||||
)...,
|
)...,
|
||||||
@@ -3462,7 +3462,7 @@ func (m MemorySize) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -3614,7 +3614,7 @@ func (m NetworkBandwidthLimit) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -3775,7 +3775,7 @@ func (m NetworkBandwidthUtilization) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -3939,7 +3939,7 @@ func (m NetworkIO) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("network.io.direction", string(networkIoDirection)),
|
attribute.String("network.io.direction", string(networkIoDirection)),
|
||||||
)...,
|
)...,
|
||||||
@@ -4104,7 +4104,7 @@ func (m NetworkPackets) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("network.io.direction", string(networkIoDirection)),
|
attribute.String("network.io.direction", string(networkIoDirection)),
|
||||||
)...,
|
)...,
|
||||||
@@ -4265,7 +4265,7 @@ func (m NetworkUp) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -4430,7 +4430,7 @@ func (m PhysicalDiskEnduranceUtilization) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.physical_disk.state", string(physicalDiskState)),
|
attribute.String("hw.physical_disk.state", string(physicalDiskState)),
|
||||||
)...,
|
)...,
|
||||||
@@ -4591,7 +4591,7 @@ func (m PhysicalDiskSize) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -4754,7 +4754,7 @@ func (m PhysicalDiskSmart) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -4930,7 +4930,7 @@ func (m Power) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.type", string(hwType)),
|
attribute.String("hw.type", string(hwType)),
|
||||||
)...,
|
)...,
|
||||||
@@ -5059,7 +5059,7 @@ func (m PowerSupplyLimit) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -5211,7 +5211,7 @@ func (m PowerSupplyUsage) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -5358,7 +5358,7 @@ func (m PowerSupplyUtilization) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -5520,7 +5520,7 @@ func (m Status) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
attribute.String("hw.state", string(state)),
|
attribute.String("hw.state", string(state)),
|
||||||
attribute.String("hw.type", string(hwType)),
|
attribute.String("hw.type", string(hwType)),
|
||||||
@@ -5656,7 +5656,7 @@ func (m TapeDriveOperations) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -5809,7 +5809,7 @@ func (m Temperature) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -5941,7 +5941,7 @@ func (m TemperatureLimit) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -6079,7 +6079,7 @@ func (m Voltage) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -6211,7 +6211,7 @@ func (m VoltageLimit) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -6349,7 +6349,7 @@ func (m VoltageNominal) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("hw.id", id),
|
attribute.String("hw.id", id),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1379,7 +1379,7 @@ func (m ContainerStatusReason) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.container.status.reason", string(containerStatusReason)),
|
attribute.String("k8s.container.status.reason", string(containerStatusReason)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1500,7 +1500,7 @@ func (m ContainerStatusState) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.container.status.state", string(containerStatusState)),
|
attribute.String("k8s.container.status.state", string(containerStatusState)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -3872,7 +3872,7 @@ func (m NamespacePhase) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.namespace.phase", string(namespacePhase)),
|
attribute.String("k8s.namespace.phase", string(namespacePhase)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -3991,7 +3991,7 @@ func (m NodeConditionStatus) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.node.condition.status", string(nodeConditionStatus)),
|
attribute.String("k8s.node.condition.status", string(nodeConditionStatus)),
|
||||||
attribute.String("k8s.node.condition.type", string(nodeConditionType)),
|
attribute.String("k8s.node.condition.type", string(nodeConditionType)),
|
||||||
)...,
|
)...,
|
||||||
@@ -7195,7 +7195,7 @@ func (m PodStatusPhase) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.pod.status.phase", string(podStatusPhase)),
|
attribute.String("k8s.pod.status.phase", string(podStatusPhase)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -7316,7 +7316,7 @@ func (m PodStatusReason) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.pod.status.reason", string(podStatusReason)),
|
attribute.String("k8s.pod.status.reason", string(podStatusReason)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -7540,7 +7540,7 @@ func (m PodVolumeAvailable) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.volume.name", volumeName),
|
attribute.String("k8s.volume.name", volumeName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -7674,7 +7674,7 @@ func (m PodVolumeCapacity) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.volume.name", volumeName),
|
attribute.String("k8s.volume.name", volumeName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -7808,7 +7808,7 @@ func (m PodVolumeInodeCount) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.volume.name", volumeName),
|
attribute.String("k8s.volume.name", volumeName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -7942,7 +7942,7 @@ func (m PodVolumeInodeFree) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.volume.name", volumeName),
|
attribute.String("k8s.volume.name", volumeName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -8079,7 +8079,7 @@ func (m PodVolumeInodeUsed) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.volume.name", volumeName),
|
attribute.String("k8s.volume.name", volumeName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -8218,7 +8218,7 @@ func (m PodVolumeUsage) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.volume.name", volumeName),
|
attribute.String("k8s.volume.name", volumeName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -9610,7 +9610,7 @@ func (m ResourceQuotaHugepageCountRequestHard) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.hugepage.size", hugepageSize),
|
attribute.String("k8s.hugepage.size", hugepageSize),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -9734,7 +9734,7 @@ func (m ResourceQuotaHugepageCountRequestUsed) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.hugepage.size", hugepageSize),
|
attribute.String("k8s.hugepage.size", hugepageSize),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -10278,7 +10278,7 @@ func (m ResourceQuotaObjectCountHard) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.resourcequota.resource_name", resourcequotaResourceName),
|
attribute.String("k8s.resourcequota.resource_name", resourcequotaResourceName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -10402,7 +10402,7 @@ func (m ResourceQuotaObjectCountUsed) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.resourcequota.resource_name", resourcequotaResourceName),
|
attribute.String("k8s.resourcequota.resource_name", resourcequotaResourceName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -11094,7 +11094,7 @@ func (m ServiceEndpointCount) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.service.endpoint.address_type", string(serviceEndpointAddressType)),
|
attribute.String("k8s.service.endpoint.address_type", string(serviceEndpointAddressType)),
|
||||||
attribute.String("k8s.service.endpoint.condition", string(serviceEndpointCondition)),
|
attribute.String("k8s.service.endpoint.condition", string(serviceEndpointCondition)),
|
||||||
)...,
|
)...,
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ func (m ClientOperationDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("mcp.method.name", string(methodName)),
|
attribute.String("mcp.method.name", string(methodName)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -615,7 +615,7 @@ func (m ServerOperationDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("mcp.method.name", string(methodName)),
|
attribute.String("mcp.method.name", string(methodName)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ func (m ClientConsumedMessages) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("messaging.operation.name", operationName),
|
attribute.String("messaging.operation.name", operationName),
|
||||||
attribute.String("messaging.system", string(system)),
|
attribute.String("messaging.system", string(system)),
|
||||||
)...,
|
)...,
|
||||||
@@ -371,7 +371,7 @@ func (m ClientOperationDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("messaging.operation.name", operationName),
|
attribute.String("messaging.operation.name", operationName),
|
||||||
attribute.String("messaging.system", string(system)),
|
attribute.String("messaging.system", string(system)),
|
||||||
)...,
|
)...,
|
||||||
@@ -558,7 +558,7 @@ func (m ClientSentMessages) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("messaging.operation.name", operationName),
|
attribute.String("messaging.operation.name", operationName),
|
||||||
attribute.String("messaging.system", string(system)),
|
attribute.String("messaging.system", string(system)),
|
||||||
)...,
|
)...,
|
||||||
@@ -724,7 +724,7 @@ func (m ProcessDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("messaging.operation.name", operationName),
|
attribute.String("messaging.operation.name", operationName),
|
||||||
attribute.String("messaging.system", string(system)),
|
attribute.String("messaging.system", string(system)),
|
||||||
)...,
|
)...,
|
||||||
|
|||||||
@@ -994,7 +994,7 @@ func (m ClusterquotaHugepageCountRequestHard) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.hugepage.size", k8sHugepageSize),
|
attribute.String("k8s.hugepage.size", k8sHugepageSize),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1122,7 +1122,7 @@ func (m ClusterquotaHugepageCountRequestUsed) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.hugepage.size", k8sHugepageSize),
|
attribute.String("k8s.hugepage.size", k8sHugepageSize),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1691,7 +1691,7 @@ func (m ClusterquotaObjectCountHard) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.resourcequota.resource_name", k8sResourcequotaResourceName),
|
attribute.String("k8s.resourcequota.resource_name", k8sResourcequotaResourceName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1820,7 +1820,7 @@ func (m ClusterquotaObjectCountUsed) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("k8s.resourcequota.resource_name", k8sResourcequotaResourceName),
|
attribute.String("k8s.resourcequota.resource_name", k8sResourcequotaResourceName),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ func (m ClientCallDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("rpc.system.name", string(systemName)),
|
attribute.String("rpc.system.name", string(systemName)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -296,7 +296,7 @@ func (m ServerCallDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("rpc.system.name", string(systemName)),
|
attribute.String("rpc.system.name", string(systemName)),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ func (m ChangeCount) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.change.state", string(changeState)),
|
attribute.String("vcs.change.state", string(changeState)),
|
||||||
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
||||||
)...,
|
)...,
|
||||||
@@ -390,7 +390,7 @@ func (m ChangeDuration) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.change.state", string(changeState)),
|
attribute.String("vcs.change.state", string(changeState)),
|
||||||
attribute.String("vcs.ref.head.name", refHeadName),
|
attribute.String("vcs.ref.head.name", refHeadName),
|
||||||
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
||||||
@@ -536,7 +536,7 @@ func (m ChangeTimeToApproval) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.ref.head.name", refHeadName),
|
attribute.String("vcs.ref.head.name", refHeadName),
|
||||||
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
||||||
)...,
|
)...,
|
||||||
@@ -710,7 +710,7 @@ func (m ChangeTimeToMerge) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.ref.head.name", refHeadName),
|
attribute.String("vcs.ref.head.name", refHeadName),
|
||||||
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
||||||
)...,
|
)...,
|
||||||
@@ -877,7 +877,7 @@ func (m ContributorCount) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
||||||
)...,
|
)...,
|
||||||
),
|
),
|
||||||
@@ -1019,7 +1019,7 @@ func (m RefCount) Add(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.ref.type", string(refType)),
|
attribute.String("vcs.ref.type", string(refType)),
|
||||||
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
||||||
)...,
|
)...,
|
||||||
@@ -1192,7 +1192,7 @@ func (m RefLinesDelta) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.line_change.type", string(lineChangeType)),
|
attribute.String("vcs.line_change.type", string(lineChangeType)),
|
||||||
attribute.String("vcs.ref.base.name", refBaseName),
|
attribute.String("vcs.ref.base.name", refBaseName),
|
||||||
attribute.String("vcs.ref.base.type", string(refBaseType)),
|
attribute.String("vcs.ref.base.type", string(refBaseType)),
|
||||||
@@ -1381,7 +1381,7 @@ func (m RefRevisionsDelta) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.ref.base.name", refBaseName),
|
attribute.String("vcs.ref.base.name", refBaseName),
|
||||||
attribute.String("vcs.ref.base.type", string(refBaseType)),
|
attribute.String("vcs.ref.base.type", string(refBaseType)),
|
||||||
attribute.String("vcs.ref.head.name", refHeadName),
|
attribute.String("vcs.ref.head.name", refHeadName),
|
||||||
@@ -1548,7 +1548,7 @@ func (m RefTime) Record(
|
|||||||
*o,
|
*o,
|
||||||
metric.WithAttributes(
|
metric.WithAttributes(
|
||||||
append(
|
append(
|
||||||
attrs,
|
attrs[:len(attrs):len(attrs)],
|
||||||
attribute.String("vcs.ref.head.name", refHeadName),
|
attribute.String("vcs.ref.head.name", refHeadName),
|
||||||
attribute.String("vcs.ref.head.type", string(refHeadType)),
|
attribute.String("vcs.ref.head.type", string(refHeadType)),
|
||||||
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
attribute.String("vcs.repository.url.full", repositoryUrlFull),
|
||||||
|
|||||||
Reference in New Issue
Block a user