Skip to content

Commit

Permalink
Rename span and metric names
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Sep 26, 2023
1 parent 9da21a3 commit 93a69bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/dice/rolldice.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (

func init() {
var err error
rollCnt, err = meter.Int64Counter("roll_counter",
rollCnt, err = meter.Int64Counter("dice.rolls",
metric.WithDescription("The number of rolls by roll value"),
metric.WithUnit("{roll}"))
if err != nil {
Expand All @@ -43,7 +43,7 @@ func init() {
}

func rolldice(w http.ResponseWriter, r *http.Request) {
ctx, span := tracer.Start(r.Context(), "do_roll")
ctx, span := tracer.Start(r.Context(), "roll")
defer span.End()

roll := 1 + rand.Intn(6)
Expand Down

0 comments on commit 93a69bc

Please sign in to comment.