Skip to content

Commit

Permalink
change the instrument into Count
Browse files Browse the repository at this point in the history
  • Loading branch information
hanyuancheung committed Jan 8, 2022
1 parent 6a4a904 commit 7c80254
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporters/metric/datadog/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func ExampleExporter() {
defer func() { handleErr(cont.Stop(ctx)) }()
global.SetMeterProvider(cont)
meter := global.Meter("marwandist")
m := metric.Must(meter).NewInt64Histogram("myrecorder")
m := metric.Must(meter).NewInt64Counter("mycounter")
meter.RecordBatch(context.Background(), []attribute.KeyValue{attribute.Int("l", 1)},
m.Measurement(1), m.Measurement(50), m.Measurement(100))
}()
Expand Down Expand Up @@ -100,7 +100,7 @@ func ExampleExporter() {
}

// Output:
// myrecorder:151|c|#env:dev,l:1,service.name:ExampleExporter,telemetry.sdk.language:go,telemetry.sdk.name:opentelemetry,telemetry.sdk.version:1.2.0
// mycounter:151|c|#env:dev,l:1,service.name:ExampleExporter,telemetry.sdk.language:go,telemetry.sdk.name:opentelemetry,telemetry.sdk.version:1.2.0
//
}

Expand Down

0 comments on commit 7c80254

Please sign in to comment.