Skip to content

Commit

Permalink
fix(run): align schemas url versions (#5085)
Browse files Browse the repository at this point in the history
* fix(run): align schemas url versions

* fix(run): align SchemaURL versions

---------

Co-authored-by: Jennifer Davis <[email protected]>
  • Loading branch information
OremGLG and iennae authored Jan 15, 2025
1 parent 62149a6 commit e1deb3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions run/custom-metrics/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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),
),
)
Expand Down
2 changes: 1 addition & 1 deletion run/custom-metrics/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}

Expand Down

0 comments on commit e1deb3a

Please sign in to comment.