From 7c80254e0d5a009979f04f9e75a7f07a9f6b0d38 Mon Sep 17 00:00:00 2001 From: zhyChesterCheung Date: Sat, 8 Jan 2022 20:22:56 +0800 Subject: [PATCH] change the instrument into Count --- exporters/metric/datadog/example_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exporters/metric/datadog/example_test.go b/exporters/metric/datadog/example_test.go index cd4a1e7c8ed..597160353c1 100644 --- a/exporters/metric/datadog/example_test.go +++ b/exporters/metric/datadog/example_test.go @@ -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)) }() @@ -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 // }