mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-02-07 13:31:42 +02:00
[example/jaeger] Remove prefix slash in Tracer.Start() (#292)
- trivial fix, original example generates "component-main//foo", which should be "component-main/foo"
This commit is contained in:
parent
2ac5725bc3
commit
17439d879c
@ -67,14 +67,14 @@ func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
tr := global.TraceProvider().GetTracer("component-main")
|
||||
ctx, span := tr.Start(ctx, "/foo")
|
||||
ctx, span := tr.Start(ctx, "foo")
|
||||
bar(ctx)
|
||||
span.End()
|
||||
}
|
||||
|
||||
func bar(ctx context.Context) {
|
||||
tr := global.TraceProvider().GetTracer("component-bar")
|
||||
_, span := tr.Start(ctx, "/bar")
|
||||
_, span := tr.Start(ctx, "bar")
|
||||
defer span.End()
|
||||
|
||||
// Do bar...
|
||||
|
Loading…
x
Reference in New Issue
Block a user