Semantic convention for a remote service name #648
Labels
area:semantic-conventions
Related to semantic conventions
spec:trace
Related to the specification/trace directory
Many tracing systems rely on client/server spans having a well defined service name. For example, if there is a service with two methods,
UserCache.Get
andUserCache.Store
, then the service name in this case isUserCache
. Tracing systems use this to create dependency graphs showing what services are depending on what other services.We currently provide the
service.name
onResource
https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/resource/semantic_conventions/README.md#service
This can be used as the service name for server spans. However, it is also important for client spans to have a service name.
While most tracing systems will be able to combine server/client spans in a way that the server span's service name is the ground truth, not all of them can
Some servers are not traced, in particular databases currently are rarely instrumented and rely on client spans to show up in traces / service graphs.
OpenTracing has
peer.service
, Zipkin hasendpoint.serviceName
, and I think we need something similar here too that applies to all client spans as a general concept and give the user the ability to set this to a name that makes sense to them (if theUserCache
above is a redis database, the wordsUserCache
will not appear anywhere in the protocol and possibly not int he URL. It is a semantic concept defined by the user and needs to be settable).How about adding
peer.service
to the general conventions at https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/span-general.md ?Note, this should not be confused with
net.peer.name
which is defined as the DNS name. It is not uncommon for a single service to be accessed from multiple DNS endpoints, due to sharding or similar, but still is a single service in terms of a service graph.The text was updated successfully, but these errors were encountered: