[chore] Bump otel deps -> v1.30.0/v0.52.0 (#3307)

This commit is contained in:
tobi 2024-09-16 11:06:00 +02:00 committed by GitHub
commit b2572b9e07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
97 changed files with 3438 additions and 1645 deletions

View file

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