From 3ee90577d4c5eae5083e486bc50f4b6c1df6182f Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Thu, 31 May 2018 08:55:52 -0700 Subject: [PATCH 1/2] Add extension for Distrubted Tracing spec. I think this merits the initial statnce of being an extension for a few reasons: 1. I want to adhere to the CNCF policy against kingmaking even though I think the world is better off with one interoperable tracing standard. 2. Nothing in the trace state should have an effect on application logic. 3. I like exercising our thoughts on extensions. Signed-off-by: Thomas Bouldin --- extensions.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/extensions.md b/extensions.md index ed70f3758..d660304fc 100644 --- a/extensions.md +++ b/extensions.md @@ -1,7 +1,7 @@ # CloudEvents Extension Attributes The [CloudEvents specification](spec.md) defines a set of metadata attributes -than can be used when tranforming a generic event into a CloudEvent. +than can be used when transforming a generic event into a CloudEvent. The list of attributes specified in that document represent the minimal set that the specification authors deemed most likely to be used in a majority of situations. @@ -20,4 +20,30 @@ standing and might be changed, or removed, at any time. ## Extension Attributes -None at this time. +### distributedTracing + +This extension embeds context from +[Distributed Tracing](https://w3c.github.io/distributed-tracing/report-trace-context.html) +so that distributed systems can include traces that span an event-driven system. +This is the foundation of many other systems, such as Open Tracing, on which +platforms like Prometheus are built. + +#### traceparent +* Type: `String` +* Description: Contains a a trace ID, span ID, and trace options as defined in + [section 2.2.2](https://w3c.github.io/distributed-tracing/report-trace-context.html#field-value) +* Constraints + * REQUIRED + * To integrate with Distributed Tracing, this field MUST NOT use standard + extension encoding over HTTP(S). `distributedTracing.traceparent` MUST + instead be marshaled as the `traceparent` HTTP header. + +#### tracestate +* Type: `String` +* Description: a comma-delimited list of key-value pairs, defined by + [section 2.3.2](https://w3c.github.io/distributed-tracing/report-trace-context.html#header-value). +* Constraints + * OPTIONAL + * To integrate with Distributed Tracing, this field MUST NOT use standard + extension encoding over HTTP(S). `distributedTracing.tracestate` MUST + instead be marshaled as the `tracestate` HTTP header. \ No newline at end of file From 9dd59e1369ae071a0d111053e2f05dd340507e10 Mon Sep 17 00:00:00 2001 From: Thomas Bouldin Date: Thu, 7 Jun 2018 09:29:14 -0700 Subject: [PATCH 2/2] PR fixups Signed-off-by: Thomas Bouldin --- extensions.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/extensions.md b/extensions.md index d660304fc..c671301a0 100644 --- a/extensions.md +++ b/extensions.md @@ -30,13 +30,14 @@ platforms like Prometheus are built. #### traceparent * Type: `String` -* Description: Contains a a trace ID, span ID, and trace options as defined in +* Description: Contains a trace ID, span ID, and trace options as defined in [section 2.2.2](https://w3c.github.io/distributed-tracing/report-trace-context.html#field-value) * Constraints * REQUIRED - * To integrate with Distributed Tracing, this field MUST NOT use standard - extension encoding over HTTP(S). `distributedTracing.traceparent` MUST - instead be marshaled as the `traceparent` HTTP header. + * To integrate with Distributed Tracing, this field MUST NOT use the normal + [extension encoding over HTTP(S)](http-transport-binding.md). + `distributedTracing.traceparent` MUST instead be marshaled as + the `traceparent` HTTP header. #### tracestate * Type: `String` @@ -44,6 +45,7 @@ platforms like Prometheus are built. [section 2.3.2](https://w3c.github.io/distributed-tracing/report-trace-context.html#header-value). * Constraints * OPTIONAL - * To integrate with Distributed Tracing, this field MUST NOT use standard - extension encoding over HTTP(S). `distributedTracing.tracestate` MUST - instead be marshaled as the `tracestate` HTTP header. \ No newline at end of file + * To integrate with Distributed Tracing, this field MUST NOT use the normal + [extension encoding over HTTP(S)](http-transport-binding.md). + `distributedTracing.tracestate` MUST instead be marshaled as the + `tracestate` HTTP header. \ No newline at end of file