1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-24 03:47:19 +02:00

Update otel.Meter to global.Meter in Getting Started Document.(#2087) (#2093)

* Update otel.Meter to global.Meter in Getting Started Document. (#2087)

Signed-off-by: lastchiliarch <lastchiliarch@163.com>

* Update CHANGELOG.md

Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
This commit is contained in:
sicong.huang 2021-07-17 00:18:22 +08:00 committed by GitHub
parent 00a1ec5fc4
commit d3063a3d12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,7 +152,7 @@ To set up some metric instruments, add the following code to your `main.go` file
commonAttributes := []attribute.KeyValue{lemonsKey.Int(10), attribute.String("A", "1"), attribute.String("B", "2"), attribute.String("C", "3")}
meter := otel.Meter("ex.com/basic")
meter := global.Meter("ex.com/basic")
observerCallback := func(_ context.Context, result metric.Float64ObserverResult) {
result.Observe(1, commonAttributes...)