-
Notifications
You must be signed in to change notification settings - Fork 363
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
api: Adding Zipkin Tracing support #3630
api: Adding Zipkin Tracing support #3630
Conversation
Signed-off-by: Alex Marston <[email protected]>
0c55a37
to
77f0415
Compare
please revert changes under |
Signed-off-by: Alex Marston <[email protected]>
Signed-off-by: Alex Marston <[email protected]>
Signed-off-by: Alex Marston <[email protected]>
Signed-off-by: Alex Marston <[email protected]>
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value is false, which will result in a 64 bit trace id being used.
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.
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 <[email protected]> Signed-off-by: Alex Marston <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we rename this to DisableSharedSpanContext and make the default value to false?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An API should imporve the UX of most of the end users, envoy may use specific values due to backward compatibility.
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.
Updated
run |
Signed-off-by: Alex Marston <[email protected]>
Signed-off-by: Alex Marston <[email protected]>
Signed-off-by: Alex Marston <[email protected]>
Signed-off-by: Alex Marston <[email protected]>
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 <[email protected]>
Signed-off-by: Alex Marston <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standard Zipkin ecosystem does nothing with this.
Signed-off-by: Alex Marston <[email protected]>
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.
LGTM, @basvanbeek can you take a look?
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.
LGTM
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would EnableTraceID128Bit
or Enable128BitTraceID
be a better name?
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.
yeah I'm a +1 for Enable128BitTraceID
wdyt @envoyproxy/gateway-maintainers @basvanbeek
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.
Enable128BitTraceID
has my preference too.
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.
Thank you for input. Field name updated
Signed-off-by: Alex Marston <[email protected]>
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.
LGTM thanks !
/retest |
* api: Adding Zipkin Tracing support Signed-off-by: Alex Marston <[email protected]> * rollback /internal changes Signed-off-by: Alex Marston <[email protected]> * nest zipkin configuration under TracingProvider struct Signed-off-by: Alex Marston <[email protected]> * rollback internal testdata changes Signed-off-by: Alex Marston <[email protected]> * rollback site changes Signed-off-by: Alex Marston <[email protected]> * Change ZipkinConfiguration to a pointer. Co-authored-by: zirain <[email protected]> Signed-off-by: Alex Marston <[email protected]> * update deepcopy Signed-off-by: Alex Marston <[email protected]> * update description for TraceId128Bit field Signed-off-by: Alex Marston <[email protected]> * update site docs Signed-off-by: Alex Marston <[email protected]> * rename Zipkin config struct Signed-off-by: Alex Marston <[email protected]> * update api Signed-off-by: Alex Marston <[email protected]> * pointers for optional fields Signed-off-by: Alex Marston <[email protected]> * remove CollectorHostname Signed-off-by: Alex Marston <[email protected]> * TraceID128Bit -> Enable128BitTraceID Signed-off-by: Alex Marston <[email protected]> --------- Signed-off-by: Alex Marston <[email protected]> Signed-off-by: Alex Marston <[email protected]> Co-authored-by: zirain <[email protected]> Signed-off-by: bjlhlin <[email protected]>
* api: Adding Zipkin Tracing support Signed-off-by: Alex Marston <[email protected]> * rollback /internal changes Signed-off-by: Alex Marston <[email protected]> * nest zipkin configuration under TracingProvider struct Signed-off-by: Alex Marston <[email protected]> * rollback internal testdata changes Signed-off-by: Alex Marston <[email protected]> * rollback site changes Signed-off-by: Alex Marston <[email protected]> * Change ZipkinConfiguration to a pointer. Co-authored-by: zirain <[email protected]> Signed-off-by: Alex Marston <[email protected]> * update deepcopy Signed-off-by: Alex Marston <[email protected]> * update description for TraceId128Bit field Signed-off-by: Alex Marston <[email protected]> * update site docs Signed-off-by: Alex Marston <[email protected]> * rename Zipkin config struct Signed-off-by: Alex Marston <[email protected]> * update api Signed-off-by: Alex Marston <[email protected]> * pointers for optional fields Signed-off-by: Alex Marston <[email protected]> * remove CollectorHostname Signed-off-by: Alex Marston <[email protected]> * TraceID128Bit -> Enable128BitTraceID Signed-off-by: Alex Marston <[email protected]> --------- Signed-off-by: Alex Marston <[email protected]> Signed-off-by: Alex Marston <[email protected]> Co-authored-by: zirain <[email protected]> Signed-off-by: bjlhlin <[email protected]>
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