You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-12-03 23:21:27 +02:00
change key to a string alias and KeyValue constructors (#217)
* change key to a string alias and KeyValue constructors * fix int and uint tests
This commit is contained in:
committed by
rghetia
parent
75562dd381
commit
5e409de1aa
@@ -48,7 +48,7 @@ func Do(ctx context.Context, f func(ctx context.Context)) {
|
||||
m := FromContext(ctx)
|
||||
keyvals := make([]string, 0, 2*len(m.m))
|
||||
for k, v := range m.m {
|
||||
keyvals = append(keyvals, k.Name, v.value.Emit())
|
||||
keyvals = append(keyvals, string(k), v.value.Emit())
|
||||
}
|
||||
pprof.Do(ctx, pprof.Labels(keyvals...), f)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user