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", }, }