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

Add tag for service #119

Merged
merged 5 commits into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# History

## 1.2 (2018/05/30)

- Added service tag

## 1.1 (2017/03/19)

- Added message bus tags
Expand Down
3 changes: 2 additions & 1 deletion semantic_conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | Service name for a span which should override any default defined in tracer config for current and child spans. E.g., `"account-service"`, `"a_custom_microservice"`. Meaning should correspond with values set in `peer.service`. Note: intended use is for things like a service mesh which might have many services it is creating traces for. |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"for current and child spans" - this implies that if a root span of a trace sets the service tag, then all spans in that trace will be associated with that service. Need to find some wording that restricts the scope of this to spans created in the same process?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@objectiser I understand the concern. What do you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"current and child spans (reasonably considered to be within the scope of that service)" ?

Not sure - was wondering whether something based on the tracer, or within the current process - but couldn't find suitable phrase. So the above is vague enough so could mean anything but at the same time make it clear it does not mean all child spans.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@objectiser any other suggestions?

| `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
Expand Down
1 change: 1 addition & 0 deletions semantic_conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ standard_tags:
'peer.port': integer
'peer.service': string
'sampling.priority': integer
'service': string
'span.kind': string

standard_log_fields:
Expand Down