manual instrumentation
.
Tracer
object which you can acquire from the OpenTelemetry API.
Each tracer is associated with a name and optional version.
These name and version are recorded as “instrumentation scope” into all spans created by this tracer.
Humans viewing the trace and data processors downstream can use this information to understand the origin of each span.
It is best practice to use the go module and package name for the tracer name.
my_application.my_attribute
, example: my_service.user_id
.
Read more here
To record attributes, use the SetAttributes
method on the span object.