[chore] Roll otel deps back to v1.29.0 / v0.51.0 (#3337)

This commit is contained in:
tobi 2024-09-24 12:26:26 +02:00 committed by GitHub
commit de72855790
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 252 additions and 372 deletions

View file

@ -7,7 +7,6 @@ import (
"strings"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/metric"
@ -132,10 +131,7 @@ func WithoutScopeInfo() Option {
// have special behavior based on their name.
func WithNamespace(ns string) Option {
return optionFunc(func(cfg config) config {
if model.NameValidationScheme != model.UTF8Validation {
// Only sanitize if prometheus does not support UTF-8.
ns = model.EscapeName(ns, model.NameEscapingScheme)
}
ns = sanitizeName(ns)
if !strings.HasSuffix(ns, "_") {
// namespace and metric names should be separated with an underscore,
// adds a trailing underscore if there is not one already.