From d62ad18c758081d537f737b9f33d37bafe55c3f0 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Mon, 31 Jan 2022 11:14:02 -0600 Subject: [PATCH] Add opentracing.ref_type semantic convention. (#2297) --- semantic_conventions/trace/compatibility.yaml | 20 +++++++++++ .../trace/semantic_conventions/README.md | 1 + .../semantic_conventions/compatibility.md | 36 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 semantic_conventions/trace/compatibility.yaml create mode 100644 specification/trace/semantic_conventions/compatibility.md diff --git a/semantic_conventions/trace/compatibility.yaml b/semantic_conventions/trace/compatibility.yaml new file mode 100644 index 000000000..8952c0303 --- /dev/null +++ b/semantic_conventions/trace/compatibility.yaml @@ -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' diff --git a/specification/trace/semantic_conventions/README.md b/specification/trace/semantic_conventions/README.md index f1e37be01..5fdb89716 100644 --- a/specification/trace/semantic_conventions/README.md +++ b/specification/trace/semantic_conventions/README.md @@ -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: diff --git a/specification/trace/semantic_conventions/compatibility.md b/specification/trace/semantic_conventions/compatibility.md new file mode 100644 index 000000000..4c95a52e6 --- /dev/null +++ b/specification/trace/semantic_conventions/compatibility.md @@ -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. + + + + + +- [OpenTracing](#opentracing) + + + +## 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). + + +| 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 | +