Skip to content

Commit ed3c487

Browse files
fix(deps): update googleapis to 81fb87f (open-telemetry#6430)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [google.golang.org/genproto/googleapis/api](https://redirect.github.com/googleapis/go-genproto) | indirect | digest | `29e43e6` -> `81fb87f` | | [google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto) | indirect | digest | `a0af3ef` -> `81fb87f` | | [google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto) | require | digest | `a0af3ef` -> `81fb87f` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOTQuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE5NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent bafd36e commit ed3c487

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

exporters/prometheus/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func TestNewConfig(t *testing.T) {
133133
},
134134
wantConfig: config{
135135
registerer: prometheus.DefaultRegisterer,
136-
namespace: "test/_",
136+
namespace: "test_",
137137
},
138138
},
139139
}

exporters/prometheus/exporter.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ import (
2626
"go.opentelemetry.io/otel/sdk/resource"
2727
)
2828

29+
func init() {
30+
model.NameValidationScheme = model.LegacyValidation
31+
}
32+
2933
const (
3034
targetInfoMetricName = "target_info"
3135
targetInfoDescription = "Target metadata"

exporters/prometheus/exporter_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestPrometheusExporter(t *testing.T) {
3535
recordMetrics func(ctx context.Context, meter otelmetric.Meter)
3636
options []Option
3737
expectedFile string
38-
disableUTF8 bool
38+
enableUTF8 bool
3939
}{
4040
{
4141
name: "counter",
@@ -195,7 +195,6 @@ func TestPrometheusExporter(t *testing.T) {
195195
{
196196
name: "sanitized attributes to labels",
197197
expectedFile: "testdata/sanitized_labels.txt",
198-
disableUTF8: true,
199198
options: []Option{WithoutUnits()},
200199
recordMetrics: func(ctx context.Context, meter otelmetric.Meter) {
201200
opt := otelmetric.WithAttributes(
@@ -405,6 +404,7 @@ func TestPrometheusExporter(t *testing.T) {
405404
{
406405
name: "counter utf-8",
407406
expectedFile: "testdata/counter_utf8.txt",
407+
enableUTF8: true,
408408
recordMetrics: func(ctx context.Context, meter otelmetric.Meter) {
409409
opt := otelmetric.WithAttributes(
410410
attribute.Key("A.G").String("B"),
@@ -471,11 +471,11 @@ func TestPrometheusExporter(t *testing.T) {
471471

472472
for _, tc := range testCases {
473473
t.Run(tc.name, func(t *testing.T) {
474-
if tc.disableUTF8 {
475-
model.NameValidationScheme = model.LegacyValidation
474+
if tc.enableUTF8 {
475+
model.NameValidationScheme = model.UTF8Validation
476476
defer func() {
477477
// Reset to defaults
478-
model.NameValidationScheme = model.UTF8Validation
478+
model.NameValidationScheme = model.LegacyValidation
479479
}()
480480
}
481481
ctx := context.Background()

0 commit comments

Comments
 (0)