From 379ef19568b81c3fafa15421e9d4a9bbbb75e560 Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Wed, 3 Jan 2018 09:33:55 +0000 Subject: [PATCH 1/9] Add options for dynamic OpenTracing driver. Signed-off-by: Ryan Burn --- api/trace.proto | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/api/trace.proto b/api/trace.proto index ca5a2d3aa..ff8db395c 100644 --- a/api/trace.proto +++ b/api/trace.proto @@ -17,8 +17,8 @@ import "validate/validate.proto"; message Tracing { message Http { // The name of the HTTP trace driver to instantiate. The name must match a - // supported HTTP trace driver. *envoy.lightstep* and *envoy.zipkin* are - // built-in trace drivers. + // supported HTTP trace driver. *envoy.lightstep*, *envoy.zipkin*, and + // *envoy.dynamic* are built-in trace drivers. string name = 1 [(validate.rules).string.min_bytes = 1]; // Trace driver specific configuration which depends on the driver being @@ -52,3 +52,12 @@ message ZipkinConfig { // /api/v1/spans, which is the default value. string collector_endpoint = 2 [(validate.rules).string.min_bytes = 1]; } + +message DynamicConfig { + // Dynamic library implementing the + // `OpenTracing API`. + string library = 1 [(validate.rules).string.min_bytes = 1]; + + // File containing the configuration for the tracing library. + string config_file = 2 [(validate.rules).string.min_bytes = 1]; +} From 6b8c54684656d19d446d0e8d37edf251f921b3d7 Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Wed, 3 Jan 2018 14:07:28 +0000 Subject: [PATCH 2/9] Update tracing config comments. Signed-off-by: Ryan Burn --- api/trace.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/trace.proto b/api/trace.proto index ff8db395c..9039634cc 100644 --- a/api/trace.proto +++ b/api/trace.proto @@ -23,8 +23,9 @@ message Tracing { // Trace driver specific configuration which depends on the driver being // instantiated. See the :ref:`LightstepConfig - // ` and :ref:`ZipkinConfig - // ` trace drivers for examples. + // `, :ref:`ZipkinConfig + // `, and :ref:`DynamicConfig + // ` trace drivers for examples. google.protobuf.Struct config = 2; } // Provides configuration for the HTTP tracer. From d3f97d5f65fb8c7e9d7d55da124b633a31e4bb47 Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Wed, 3 Jan 2018 14:17:06 +0000 Subject: [PATCH 3/9] Add v1 documentation for the dynamic tracing driver. Signed-off-by: Ryan Burn --- docs/root/api-v1/tracing.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/root/api-v1/tracing.rst b/docs/root/api-v1/tracing.rst index 68bc38486..f896a5605 100644 --- a/docs/root/api-v1/tracing.rst +++ b/docs/root/api-v1/tracing.rst @@ -67,3 +67,23 @@ collector_endpoint *(optional, string)* The API endpoint of the Zipkin service where the spans will be sent. When using a standard Zipkin installation, the API endpoint is typically `/api/v1/spans`, which is the default value. + +Dynamic driver +-------------- + +.. code-block:: json + + { + "type": "dynamic", + "config": { + "library": "...", + "config_file": "..." + } + } + +library + *(required, string)* A dynamic library implementing the + [OpenTracing API](https://github.com/opentracing/opentracing-cpp). + +config_file + *(required, string)* The configuration file for the dynamically loaded tracer. From 450af7027d88e0670afc9536a9eff7286029c84d Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Wed, 3 Jan 2018 15:02:11 +0000 Subject: [PATCH 4/9] Fix external links. Signed-off-by: Ryan Burn --- api/trace.proto | 4 ++-- docs/root/api-v1/tracing.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/trace.proto b/api/trace.proto index 9039634cc..88449bf62 100644 --- a/api/trace.proto +++ b/api/trace.proto @@ -55,8 +55,8 @@ message ZipkinConfig { } message DynamicConfig { - // Dynamic library implementing the - // `OpenTracing API`. + // Dynamic library implementing the `OpenTracing API + // `_. string library = 1 [(validate.rules).string.min_bytes = 1]; // File containing the configuration for the tracing library. diff --git a/docs/root/api-v1/tracing.rst b/docs/root/api-v1/tracing.rst index f896a5605..85a7da53d 100644 --- a/docs/root/api-v1/tracing.rst +++ b/docs/root/api-v1/tracing.rst @@ -82,8 +82,8 @@ Dynamic driver } library - *(required, string)* A dynamic library implementing the - [OpenTracing API](https://github.com/opentracing/opentracing-cpp). + *(required, string)* Dynamic library implementing the `OpenTracing API + `_. config_file - *(required, string)* The configuration file for the dynamically loaded tracer. + *(required, string)* File containing the configuration for the tracing library. From bcc995117f90d58e6f1cf4c02b8d4a41dffbe603 Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Tue, 9 Jan 2018 10:56:25 +0000 Subject: [PATCH 5/9] Remove v1 support. Signed-off-by: Ryan Burn --- docs/root/api-v1/tracing.rst | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/docs/root/api-v1/tracing.rst b/docs/root/api-v1/tracing.rst index 85a7da53d..68bc38486 100644 --- a/docs/root/api-v1/tracing.rst +++ b/docs/root/api-v1/tracing.rst @@ -67,23 +67,3 @@ collector_endpoint *(optional, string)* The API endpoint of the Zipkin service where the spans will be sent. When using a standard Zipkin installation, the API endpoint is typically `/api/v1/spans`, which is the default value. - -Dynamic driver --------------- - -.. code-block:: json - - { - "type": "dynamic", - "config": { - "library": "...", - "config_file": "..." - } - } - -library - *(required, string)* Dynamic library implementing the `OpenTracing API - `_. - -config_file - *(required, string)* File containing the configuration for the tracing library. From 0639529dae037cca376bab876464b7553581e6aa Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Thu, 11 Jan 2018 09:46:00 +0000 Subject: [PATCH 6/9] s/DynamicConfig/DynamicOtConfig/ Signed-off-by: Ryan Burn --- api/trace.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/trace.proto b/api/trace.proto index 88449bf62..8d25bf5fb 100644 --- a/api/trace.proto +++ b/api/trace.proto @@ -24,8 +24,8 @@ message Tracing { // Trace driver specific configuration which depends on the driver being // instantiated. See the :ref:`LightstepConfig // `, :ref:`ZipkinConfig - // `, and :ref:`DynamicConfig - // ` trace drivers for examples. + // `, and :ref:`DynamicOtConfig + // ` trace drivers for examples. google.protobuf.Struct config = 2; } // Provides configuration for the HTTP tracer. @@ -54,7 +54,7 @@ message ZipkinConfig { string collector_endpoint = 2 [(validate.rules).string.min_bytes = 1]; } -message DynamicConfig { +message DynamicOtConfig { // Dynamic library implementing the `OpenTracing API // `_. string library = 1 [(validate.rules).string.min_bytes = 1]; From 87b1e88f6e049ad866209b9144193a1945be0603 Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Mon, 22 Jan 2018 12:03:50 +0000 Subject: [PATCH 7/9] Use inline config. Signed-off-by: Ryan Burn --- api/trace.proto | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/trace.proto b/api/trace.proto index 8d25bf5fb..493dbabe9 100644 --- a/api/trace.proto +++ b/api/trace.proto @@ -59,6 +59,7 @@ message DynamicOtConfig { // `_. string library = 1 [(validate.rules).string.min_bytes = 1]; - // File containing the configuration for the tracing library. - string config_file = 2 [(validate.rules).string.min_bytes = 1]; + // The configuration to use when creating a tracer from the given dynamic + // library. + google.protobuf.Struct config = 2; } From 4ce80d6748a5b881d9477c026342b6b68a076ec0 Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Tue, 23 Jan 2018 11:51:24 +0000 Subject: [PATCH 8/9] s/envoy.dynamic/envoy.dynamic.ot/ Signed-off-by: Ryan Burn --- api/trace.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/trace.proto b/api/trace.proto index 493dbabe9..ea3c2f5d8 100644 --- a/api/trace.proto +++ b/api/trace.proto @@ -18,7 +18,7 @@ message Tracing { message Http { // The name of the HTTP trace driver to instantiate. The name must match a // supported HTTP trace driver. *envoy.lightstep*, *envoy.zipkin*, and - // *envoy.dynamic* are built-in trace drivers. + // *envoy.dynamic.ot* are built-in trace drivers. string name = 1 [(validate.rules).string.min_bytes = 1]; // Trace driver specific configuration which depends on the driver being From c59f3a98ab32027337996b14f6e5fb3d6cc153fb Mon Sep 17 00:00:00 2001 From: Ryan Burn Date: Tue, 23 Jan 2018 12:08:43 +0000 Subject: [PATCH 9/9] Document DynamicOtConfig. Signed-off-by: Ryan Burn --- api/trace.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/trace.proto b/api/trace.proto index ea3c2f5d8..35a2241aa 100644 --- a/api/trace.proto +++ b/api/trace.proto @@ -54,6 +54,9 @@ message ZipkinConfig { string collector_endpoint = 2 [(validate.rules).string.min_bytes = 1]; } +// DynamicOtConfig is used to dynamically load a tracer from a shared library +// that implements the OpenTracing dynamic loading API +// `_. message DynamicOtConfig { // Dynamic library implementing the `OpenTracing API // `_.