Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
voidlock committed Oct 20, 2023
1 parent b429dbb commit 50e6369
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go-kit/metrics/provider/otel/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (

const (
// DefaultAgentEndpoint is a default exporter endpoint that points to a local otel collector.
DefaultAgentEndpoint = "0.0.0.0:55680"
DefaultAgentEndpoint = "http://0.0.0.0:55680"

// If you are encountering this error it means that you are attempting to
// establish an aggregation selection (explicit, or exponential) after you have
Expand Down
8 changes: 6 additions & 2 deletions go-kit/metrics/provider/otel/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ package otel

import (
"context"
"runtime/debug"
"testing"
)

func TestNewCardinalityCounter_InsertDoesNotPanic(t *testing.T) {
defer func() {
if r := recover(); r != nil {
t.Errorf("The code did panic")
t.Errorf("The code did panic: %#v\n %s", r, string(debug.Stack()))
}
}()

p, _ := New(context.Background(), "my-service")
p, err := New(context.Background(), "my-service")
if err != nil {
t.Errorf("failed to start metrics provider: %s", err)
}
c := p.NewCardinalityCounter("my-counter")

c.Insert([]byte("hey"))
Expand Down

0 comments on commit 50e6369

Please sign in to comment.