Skip to content

Commit

Permalink
Fix metric API example
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Apr 5, 2023
1 parent 2b05ab1 commit 9838a45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion metric/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func ExampleMeter_asynchronous_single() {
//
// For demonstration purpose, a static value is used here.
usage := 75000
obsrv.Observe(int64(usage), attribute.Int("disk.id", 3))
s := attribute.NewSet(attribute.Int("disk.id", 3))
obsrv.Observe(int64(usage), instrument.WithAttributes(s))
return nil
}),
)
Expand Down

0 comments on commit 9838a45

Please sign in to comment.