Closed androna-xm closed 3 years ago
Only on reporting. What are you trying to achieve?
On Mon, 14 Jun 2021, 19:48 androna-xm, @.***> wrote:
Is there a function to get the TraceID of a trace created?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin-go/issues/195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXOYATDSBVOG6UZHQSVYJLTSY6G7ANCNFSM46VVZDKQ .
I would like to get the TraceID to add it as an exemplar to a metric. So i guess i have to use an instrumentation tool ( Opencencus or OpenTelemetry ) to get the TraceID ?
You do have access to TraceID from span context:
// get as hex string (the typical propagation format)
span.Context().ID.String()
@basvanbeek is totally right, I misunderstood the question.
As he pointed out you can access to it through the context so you can use that and put in the metric.
That's great! Thank you!
Is there a function to get the TraceID of a trace created?