From f7ca62c911b47cdc2a0b07298f75fe3ad9b0b6eb Mon Sep 17 00:00:00 2001 From: Tyler Benson Date: Thu, 12 Jul 2018 16:23:26 -0400 Subject: [PATCH] Add tag for service (#119) Extend the semantic conventions to include the `service` tag. * This tag overrides the default "service name" for a span. * It is only used when a tracer is reporting spans on behalf of another service. --- CHANGELOG.md | 4 ++++ semantic_conventions.md | 3 ++- semantic_conventions.yaml | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9e8b9b..8acc0c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # History +## 1.2 (2018/05/30) + +- Added service tag + ## 1.1 (2017/03/19) - Added message bus tags diff --git a/semantic_conventions.md b/semantic_conventions.md index 46d71af..7174ace 100644 --- a/semantic_conventions.md +++ b/semantic_conventions.md @@ -31,8 +31,9 @@ Span tags apply to **the entire Span**; as such, they apply to the entire timera | `peer.ipv4` | string | Remote IPv4 address as a `.`-separated tuple. E.g., `"127.0.0.1"` | | `peer.ipv6` | string | Remote IPv6 address as a string of colon-separated 4-char hex tuples. E.g., `"2001:0db8:85a3:0000:0000:8a2e:0370:7334"` | | `peer.port` | integer | Remote port. E.g., `80` | -| `peer.service` | string | Remote service name (for some unspecified definition of `"service"`). E.g., `"elasticsearch"`, `"a_custom_microservice"`, `"memcache"` | +| `peer.service` | string | Remote service name (for some unspecified definition of `"service"`). E.g., `"elasticsearch"`, `"a_custom_microservice"`, `"memcache"`. Meaning should correspond with values set in `service`. | | `sampling.priority` | integer | If greater than 0, a hint to the Tracer to do its best to capture the trace. If 0, a hint to the trace to not-capture the trace. If absent, the Tracer should use its default sampling mechanism. | +| `service` | string | The service name for a span, which overrides any default "service name" property defined in a tracer's config. The meaning of `service` should correspond to the value set in `peer.service`, except it is applied to the current span. 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, or an out-of-band reporter which reads in log files). This tag does not need to be used when reporting spans for the service the tracer is running in. | | `span.kind` | string | Either `"client"` or `"server"` for the appropriate roles in an RPC, and `"producer"` or `"consumer"` for the appropriate roles in a messaging scenario. | ### Log fields table diff --git a/semantic_conventions.yaml b/semantic_conventions.yaml index a44992e..ea7ab9e 100644 --- a/semantic_conventions.yaml +++ b/semantic_conventions.yaml @@ -24,6 +24,7 @@ standard_tags: 'peer.port': integer 'peer.service': string 'sampling.priority': integer + 'service': string 'span.kind': string standard_log_fields: