-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tracing: Support dynamically loading tracing libraries. #386
Changes from 4 commits
379ef19
6b8c546
d3f97d5
450af70
bcc9951
0639529
87b1e88
4ce80d6
c59f3a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,14 +17,15 @@ 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 | ||
// instantiated. See the :ref:`LightstepConfig | ||
// <envoy_api_msg_LightstepConfig>` and :ref:`ZipkinConfig | ||
// <envoy_api_msg_ZipkinConfig>` trace drivers for examples. | ||
// <envoy_api_msg_LightstepConfig>`, :ref:`ZipkinConfig | ||
// <envoy_api_msg_ZipkinConfig>`, and :ref:`DynamicConfig | ||
// <envoy_api_msg_DynamicConfig>` trace drivers for examples. | ||
google.protobuf.Struct config = 2; | ||
} | ||
// Provides configuration for the HTTP tracer. | ||
|
@@ -52,3 +53,12 @@ message ZipkinConfig { | |
// /api/v1/spans, which is the default value. | ||
string collector_endpoint = 2 [(validate.rules).string.min_bytes = 1]; | ||
} | ||
|
||
message DynamicConfig { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we call this |
||
// Dynamic library implementing the `OpenTracing API | ||
// <https://github.com/opentracing/opentracing-cpp>`_. | ||
string library = 1 [(validate.rules).string.min_bytes = 1]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be |
||
|
||
// File containing the configuration for the tracing library. | ||
string config_file = 2 [(validate.rules).string.min_bytes = 1]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might this be more useful operationally if it was closer to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 we should allow inline config. Can we just use Struct here and use JSON, etc. for this? Or is that too restrictive. At minimum agreed we should use Datasource to allow inline configuration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Switched to use an inline configuration. (Looks like we'll be ok with having tracers use JSON for dynamic configurations.) |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need v1 support? Unless there is a strong need for this at your end or by folks in the community, we're trying to feature freeze v1 and encourage new features to be v2 first. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 if possible can we drop this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the v1 support. |
||
"config": { | ||
"library": "...", | ||
"config_file": "..." | ||
} | ||
} | ||
|
||
library | ||
*(required, string)* Dynamic library implementing the `OpenTracing API | ||
<https://github.com/opentracing/opentracing-cpp>`_. | ||
|
||
config_file | ||
*(required, string)* File containing the configuration for the tracing library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
envoy.dynamic.ot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.