Skip to content

Commit

Permalink
Add opentracing.ref_type semantic convention. (#2297)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosalberto committed Jan 31, 2022
1 parent cb2e71e commit b024a66
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ release.
([2100](https://github.com/open-telemetry/opentelemetry-specification/pull/2100))
- Add JVM memory runtime semantic
conventions. ([#2272](https://github.com/open-telemetry/opentelemetry-specification/pull/2272))
- Add opentracing.ref_type semantic convention.
([#2297](https://github.com/open-telemetry/opentelemetry-specification/pull/2297))

### Compatibility

Expand Down
20 changes: 20 additions & 0 deletions semantic_conventions/trace/compatibility.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
groups:
- id: opentracing
prefix: opentracing
brief: 'This document defines semantic conventions for the OpenTracing Shim'
note: >
These conventions are used by the OpenTracing Shim layer.
attributes:
- id: ref_type
brief: 'Parent-child Reference type'
note: >
The causal relationship between a child Span and a parent Span.
type:
allow_custom_values: false
members:
- id: child_of
value: 'child_of'
brief: 'The parent Span depends on the child Span in some capacity'
- id: follows_from
value: 'follows_from'
brief: 'The parent Span does not depend in any way on the result of the child Span'
5 changes: 3 additions & 2 deletions specification/compatibility/opentracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ If a list of `Span` references is specified, the first `SpanContext`
with **Child Of** type in the entire list is used as parent, else the
the first `SpanContext` is used as parent. All values in the list
MUST be added as [Link](../trace/api.md)s with the reference type value
as a `Link` attribute, i.e. `opentracing.ref_type` set to `follows_from` or
`child_of`.
as a `Link` attribute, i.e.
[opentracing.ref_type](../trace/semantic_conventions/compatibility.md#opentracing)
set to `follows_from` or `child_of`.

If a list of `Span` references is specified, the union of their
`Baggage` values MUST be used as the initial `Baggage` of the newly created
Expand Down
1 change: 1 addition & 0 deletions specification/trace/semantic_conventions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The following semantic conventions for spans are defined:
* [Messaging](messaging.md): For messaging systems (queues, publish/subscribe, etc.) spans.
* [FaaS](faas.md): For [Function as a Service](https://en.wikipedia.org/wiki/Function_as_a_service) (e.g., AWS Lambda) spans.
* [Exceptions](exceptions.md): For recording exceptions associated with a span.
* [Compatibility](compatibility.md): For spans generated by compatibility components, e.g. OpenTracing Shim layer.

The following library-specific semantic conventions are defined:

Expand Down
36 changes: 36 additions & 0 deletions specification/trace/semantic_conventions/compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Semantic conventions for Compatibility components

**Status**: [Experimental](../../document-status.md)

This document defines trace semantic conventions used by the
compatibility components, e.g. OpenTracing Shim layer.

<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` -->

<!-- toc -->

- [OpenTracing](#opentracing)

<!-- tocstop -->

## OpenTracing

`Link`s created by the OpenTracing Shim MUST set `opentracing.ref_type`
with one of the accepted values, describing the direct causal relationships
between a child Span and a parent Span, as defined by
[OpenTracing](https://github.com/opentracing/specification/blob/master/specification.md).

<!-- semconv opentracing -->
| Attribute | Type | Description | Examples | Required |
|---|---|---|---|---|
| `opentracing.ref_type` | string | Parent-child Reference type [1] | `child_of` | No |

**[1]:** The causal relationship between a child Span and a parent Span.

`opentracing.ref_type` MUST be one of the following:

| Value | Description |
|---|---|
| `child_of` | The parent Span depends on the child Span in some capacity |
| `follows_from` | The parent Span does not depend in any way on the result of the child Span |
<!-- endsemconv -->

0 comments on commit b024a66

Please sign in to comment.