You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
* 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:
@@ -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...)
|
||||
|
||||
Reference in New Issue
Block a user