Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Add service tag #287

Merged
merged 1 commit into from
Jul 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion opentracing-api/src/main/java/io/opentracing/tag/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ private Tags() {
*/
public static final String SPAN_KIND_CONSUMER = "consumer";

/**
* The service name for a span, which overrides any default "service name" property defined
* in a tracer's config. This tag is meant to only be used when a tracer is reporting spans
* on behalf of another service (for example, a service mesh reporting on behalf of the services
* it is proxying). This tag does not need to be used when reporting spans for the service the
* tracer is running in.
*
* @see #PEER_SERVICE
*/
public static final StringTag SERVICE = new StringTag("service");

/**
* HTTP_URL records the url of the incoming request.
*/
Expand All @@ -71,7 +82,9 @@ private Tags() {
public static final StringTag PEER_HOST_IPV6 = new StringTag("peer.ipv6");

/**
* PEER_SERVICE records the service name of the peer.
* PEER_SERVICE records the service name of the peer service.
*
* @see #SERVICE
*/
public static final StringTag PEER_SERVICE = new StringTag("peer.service");

Expand Down