From e1deb3ab3359c48453f3b4328c8d1549594ae523 Mon Sep 17 00:00:00 2001 From: OremGLG Date: Wed, 15 Jan 2025 20:49:44 +0000 Subject: [PATCH] fix(run): align schemas url versions (#5085) * fix(run): align schemas url versions * fix(run): align SchemaURL versions --------- Co-authored-by: Jennifer Davis --- run/custom-metrics/main.go | 4 ++-- run/custom-metrics/main_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/run/custom-metrics/main.go b/run/custom-metrics/main.go index 11b0a70e7e..c60839c4db 100644 --- a/run/custom-metrics/main.go +++ b/run/custom-metrics/main.go @@ -48,7 +48,7 @@ func main() { func handler(w http.ResponseWriter, r *http.Request) { counter.Add(context.Background(), 100) - fmt.Fprintln(w, "Incremented sidecar_sample_counter metric!") + fmt.Fprintln(w, "Incremented sidecar_sample_counter_total metric!") } func setupCounter(ctx context.Context) func(context.Context) error { @@ -59,7 +59,7 @@ func setupCounter(ctx context.Context) func(context.Context) error { r, err := resource.Merge( resource.Default(), resource.NewWithAttributes( - semconv.SchemaURL, + resource.Default().SchemaURL(), semconv.ServiceName(serviceName), ), ) diff --git a/run/custom-metrics/main_test.go b/run/custom-metrics/main_test.go index 58c62b38d7..47efb89207 100644 --- a/run/custom-metrics/main_test.go +++ b/run/custom-metrics/main_test.go @@ -40,7 +40,7 @@ func TestHandler(t *testing.T) { }{ { name: "basic test", - expected: "Incremented sidecar_sample_counter metric!\n", + expected: "Incremented sidecar_sample_counter_total metric!\n", }, }