api: Adding Zipkin Tracing support#3630
Conversation
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
0c55a37 to
77f0415
Compare
|
please revert changes under |
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
@zirain I have done so - shall I update the site docs? (site/content/en/latest/api/extension_types.md) |
api/v1alpha1/tracing_types.go
Outdated
|
|
||
| // ZipkinConfiguration defines optional configuration for the Zipkin tracing provider. | ||
| type ZipkinConfiguration struct { | ||
| // TraceId_128Bit determines whether a 128bit trace id will be used |
There was a problem hiding this comment.
| // TraceId_128Bit determines whether a 128bit trace id will be used | |
| // TraceId128Bit determines whether a 128bit trace id will be used |
@basvanbeek is it recommended to use 128bit by default?
There was a problem hiding this comment.
The default value is false, which will result in a 64 bit trace id being used.
There was a problem hiding this comment.
Most libraries do 64bit as default allowing to be switched to 128 bit for those worried about trace collisions in very high request rate systems, or where retention is set to high.
Co-authored-by: zirain <zirain2009@gmail.com> Signed-off-by: Alex Marston <alexander.marston@gmail.com>
api/v1alpha1/tracing_types.go
Outdated
| // share the same span context. Defaults to true. | ||
| // +kubebuilder:default=true | ||
| // +optional | ||
| SharedSpanContext bool `json:"sharedSpanContext,omitempty"` |
There was a problem hiding this comment.
should we rename this to DisableSharedSpanContext and make the default value to false?
There was a problem hiding this comment.
Seeing as SharedSpanContext defaults to true in the backend anyway, I think it makes sense to keep the naming of this field consistent.
There was a problem hiding this comment.
An API should imporve the UX of most of the end users, envoy may use specific values due to backward compatibility.
run |
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3630 +/- ##
==========================================
- Coverage 68.29% 68.29% -0.01%
==========================================
Files 170 170
Lines 20760 20760
==========================================
- Hits 14179 14178 -1
+ Misses 5563 5562 -1
- Partials 1018 1020 +2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
api/v1alpha1/tracing_types.go
Outdated
| // CollectorHostname defines the hostname to use when sending spans | ||
| // to the Zipkin collector endpoint. | ||
| // +optional | ||
| CollectorHostname *string `json:"collectorHostname,omitempty"` |
There was a problem hiding this comment.
Is this necessary for first iterate? There's a discussion about where's the right place for authoriy, here or under BackendRef
There was a problem hiding this comment.
It's not necessary but I lacked the context on the other discussion. Happy to pull this out and wait for the outcome of that discussion
There was a problem hiding this comment.
The standard Zipkin ecosystem does nothing with this.
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
zirain
left a comment
There was a problem hiding this comment.
LGTM, @basvanbeek can you take a look?
api/v1alpha1/tracing_types.go
Outdated
| // when creating a new trace instance. If set to false, a 64bit trace | ||
| // id will be used. | ||
| // +optional | ||
| TraceID128Bit *bool `json:"traceId128Bit,omitempty"` |
There was a problem hiding this comment.
I understand this is creating a 1:1 mapping with envoy https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/zipkin.proto#extension-envoy-tracers-zipkin but this name is confusing
prefer if this was TraceIDSize/TraceIDLength *TraceIDType which could default to 64
There was a problem hiding this comment.
Would EnableTraceID128Bit or Enable128BitTraceID be a better name?
There was a problem hiding this comment.
yeah I'm a +1 for Enable128BitTraceID wdyt @envoyproxy/gateway-maintainers @basvanbeek
There was a problem hiding this comment.
Enable128BitTraceID has my preference too.
There was a problem hiding this comment.
Thank you for input. Field name updated
Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com>
|
/retest |
* api: Adding Zipkin Tracing support Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * rollback /internal changes Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * nest zipkin configuration under TracingProvider struct Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * rollback internal testdata changes Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * rollback site changes Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * Change ZipkinConfiguration to a pointer. Co-authored-by: zirain <zirain2009@gmail.com> Signed-off-by: Alex Marston <alexander.marston@gmail.com> * update deepcopy Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * update description for TraceId128Bit field Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * update site docs Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * rename Zipkin config struct Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * update api Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * pointers for optional fields Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * remove CollectorHostname Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> * TraceID128Bit -> Enable128BitTraceID Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> --------- Signed-off-by: Alex Marston <alexander.marston@imaginecurve.com> Signed-off-by: Alex Marston <alexander.marston@gmail.com> Co-authored-by: zirain <zirain2009@gmail.com> Signed-off-by: bjlhlin <lihonglin1@jd.com>
What type of PR is this?
API to support Zipkin provider for Tracing telemetry.
What this PR does / why we need it:
At present, Envoy Gateway only supports the OpenTelemetry tracing provider.
This PR updates the underlying APIs to also support the Zipkin provider.
In addition, it also exposes a new option to specify provider specific configuration such as TraceId128Bit and SharedSpanContext for Zipkin.
Which issue(s) this PR fixes:
Related to #1827
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/trace/v3/zipkin.proto