1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-07-13 01:00:22 +02:00

add shorter version for global providers (#538)

This commit is contained in:
Gustavo Silva Paiva
2020-03-11 12:23:32 -03:00
committed by GitHub
parent 9674c81cb7
commit 85751428a3
16 changed files with 49 additions and 29 deletions

View File

@ -70,8 +70,8 @@ func main() {
// Note: Have to get the meter and tracer after the global is
// initialized. See OTEP 0005.
tracer := global.TraceProvider().Tracer("ex.com/basic")
meter := global.MeterProvider().Meter("ex.com/basic")
tracer := global.Tracer("ex.com/basic")
meter := global.Meter("ex.com/basic")
commonLabels := meter.Labels(lemonsKey.Int(10), key.String("A", "1"), key.String("B", "2"), key.String("C", "3"))