Skip to content
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

Specify tracing span kind on creation #3039

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

AlexanderYastrebov
Copy link
Member

OpenTelemetry-OpenTracing bridge span kind can not be changed after creation, see open-telemetry/opentelemetry-go#3953

The workaround is to specify span kind on creation which works for both Open Tracing and Open Telemetry bridge spans.

For #2104

@AlexanderYastrebov AlexanderYastrebov added the minor no risk changes, for example new filters label Apr 24, 2024
@@ -456,7 +456,6 @@ func (ac *admissionControl) startSpan(ctx context.Context) (span opentracing.Spa
if parent != nil {
span = ac.tracer.StartSpan(admissionControlSpanName, opentracing.ChildOf(parent.Context()))
ext.Component.Set(span, "skipper")
ext.SpanKind.Set(span, "shedder")
Copy link
Member Author

@AlexanderYastrebov AlexanderYastrebov Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we really need non-standard kind here so decided to drop it.

And this would break in OpenTelemetry, see
https://github.com/open-telemetry/opentelemetry-go/blob/9656d0afa72646101e859bf8a1c6d05b73ee094d/trace/trace.go#L460-L474

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if we have streams that might select it and propose a change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one that also uses operation IN ("admission_control") which should be enough.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reached out to the owner and this was fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this to the release notes, too?
I don't know who will hit by that but that we do tell about.

proxy/proxy.go Outdated Show resolved Hide resolved
@AlexanderYastrebov AlexanderYastrebov force-pushed the specify-span-kind-on-creation branch from 99fea88 to e05c8b8 Compare April 24, 2024 17:12
@AlexanderYastrebov AlexanderYastrebov marked this pull request as draft April 24, 2024 17:18
@szuecs
Copy link
Member

szuecs commented Apr 25, 2024

let's land it, no?

@RomanZavodskikh
Copy link
Member

👍

@AlexanderYastrebov AlexanderYastrebov force-pushed the specify-span-kind-on-creation branch from e05c8b8 to c3d7298 Compare April 26, 2024 08:12
@AlexanderYastrebov AlexanderYastrebov marked this pull request as ready for review April 26, 2024 08:13
@AlexanderYastrebov
Copy link
Member Author

Rebased and fixed span creation added by #3034

OpenTelemetry-OpenTracing bridge span kind can not be changed after creation,
see open-telemetry/opentelemetry-go#3953

The workaround is to specify span kind on creation which works for
both Open Tracing and Open Telemetry bridge spans.

For #2104

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
@AlexanderYastrebov AlexanderYastrebov force-pushed the specify-span-kind-on-creation branch from c3d7298 to 406a3ff Compare April 26, 2024 09:35
@szuecs
Copy link
Member

szuecs commented Apr 26, 2024

👍

1 similar comment
@AlexanderYastrebov
Copy link
Member Author

👍

@AlexanderYastrebov AlexanderYastrebov merged commit b02d681 into master Apr 26, 2024
14 checks passed
@AlexanderYastrebov AlexanderYastrebov deleted the specify-span-kind-on-creation branch April 26, 2024 10:37
AlexanderYastrebov added a commit that referenced this pull request Apr 26, 2024
Use setTag helper to enable tag exclusion

This is follow up fix for #3039

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
AlexanderYastrebov added a commit that referenced this pull request Apr 26, 2024
Use setTag helper to enable tag exclusion

This is follow up fix for #3039

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
JanardhanSharma pushed a commit to JanardhanSharma/skipper that referenced this pull request Apr 26, 2024
OpenTelemetry-OpenTracing bridge span kind can not be changed after creation,
see open-telemetry/opentelemetry-go#3953

The workaround is to specify span kind on creation which works for
both Open Tracing and Open Telemetry bridge spans.

Note that this change removes non-standard "shedder" kind from spans created by `admissionControl` filter.
Use operation name "admission_control" to query its spans instead if needed.

For zalando#2104

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
Signed-off-by: Janardhan Sharma <janardhan.sharma@zalando.de>
JanardhanSharma pushed a commit to JanardhanSharma/skipper that referenced this pull request Jul 19, 2024
Use setTag helper to enable tag exclusion

This is follow up fix for zalando#3039

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor no risk changes, for example new filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants