mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
Merge pull request #12676 from prometheus/otel-resend-count
remote-write: add http.resend_count tracing attribute
This commit is contained in:
commit
d7293ea8b5
|
@ -29,6 +29,7 @@ import (
|
|||
"github.com/prometheus/common/model"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
|
||||
"go.uber.org/atomic"
|
||||
|
||||
"github.com/prometheus/prometheus/config"
|
||||
|
@ -545,6 +546,10 @@ func (t *QueueManager) sendMetadataWithBackoff(ctx context.Context, metadata []p
|
|||
attribute.String("remote_name", t.storeClient.Name()),
|
||||
attribute.String("remote_url", t.storeClient.Endpoint()),
|
||||
)
|
||||
// Attributes defined by OpenTelemetry semantic conventions.
|
||||
if try > 0 {
|
||||
span.SetAttributes(semconv.HTTPResendCount(try))
|
||||
}
|
||||
|
||||
begin := time.Now()
|
||||
err := t.storeClient.Store(ctx, req)
|
||||
|
|
Loading…
Reference in a new issue