-
Notifications
You must be signed in to change notification settings - Fork 600
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
We patch OpenCensus to add SetSpanID method #2052
Comments
We know this is ugly, but there is currently no other way see knative/eventing#2052
Have we asked them? Have we opened a PR to add this functionality upstream? This was a bit of a shock for me because generally when we do this we reference the version we're backporting it from (e.g. higher kube version) or the PR where we're adding it upstream, but there are no discernable attempts to do so here. |
I believe there was certainty that this change would not be allowed, but I don't remember the details and haven't been able to find them after some digging. It might be worth contacting OpenCensus again to get some fresh eyes. |
I asked around and it seems this change was never floated to the OpenCensus community. So
No, and no, but should and should :) |
@grantr thanks and thanks :) |
It appears that this patch is needed to adopt the parent span without creating a new child span. Have we considered whether the correct behavior is actually to create a new child span in the channel dispatcher? I can see this span being potentially useful. |
#1972 added a patch to the vendored opencensus library that adds the
SetSpanID
method.@Harwayne calls this a viral patch: any project importing eventing will also need to patch their opencensus.
This was used only as a last resort because OpenCensus doesn't provide the functionality we need to set the parent span id (see pkg/tracing/traceparent.go). We don't expect OpenCensus to fix this issue, but eventually we'll switch to OpenTelemetry which will hopefully make the patch unnecessary.
Everywhere this patch is used, we should add a comment that links to this bug.
Expected behavior
We never patch vendored code.
To Reproduce
knative.dev/eventing/pkg/tracing
, orknative.dev/eventing
and one of the eventing commands that supports tracing.vendor/knative.dev/eventing/pkg/tracing/traceparent.go:83:6: span.SetSpanID undefined (type *trace.Span has no field or method SetSpanID)
Knative release version
0.10.0
The text was updated successfully, but these errors were encountered: