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

Provision to add current span as links to kafka consumer span #1756

Closed
RashmiRam opened this issue Nov 24, 2020 · 5 comments
Closed

Provision to add current span as links to kafka consumer span #1756

RashmiRam opened this issue Nov 24, 2020 · 5 comments

Comments

@RashmiRam
Copy link
Contributor

I am not entirely sure if this issue should be raised here or in Opentelemetry spec project.

Current Kafka consumer instrumentation creates consumer spans from the context extracted from the record headers if this otel.kafka.client.propagation.enabled setting is enabled. If this setting is not enabled, consumer spans will take the current span as parent. Ref: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/master/instrumentation/kafka-clients-0.11/src/main/java/io/opentelemetry/javaagent/instrumentation/kafkaclients/KafkaConsumerTracer.java#L49-L55

Looking at the code, I suppose this is the case for other messaging instrumentations like rabbitmq, jms also(except for that setting).

But, I think it will be really useful if the consumer spans have links to current span(if any) through addLink API even when propagation is enabled.

Do you folks think this is a valid ask?

@iNikem
Copy link
Contributor

iNikem commented Nov 25, 2020

It is certainly a valid ask, but it should be started in the spec first. Take a look at open-telemetry/opentelemetry-specification#1085 as well

@trask
Copy link
Member

trask commented Jun 26, 2022

hi @RashmiRam! there's been a lot of changes/improvements/fixes to the messaging spans since this issue was opened, i'm curious what your experience is with the latest javaagent version?

@RashmiRam
Copy link
Contributor Author

Hi @trask The main ask from me is that the configurable option to have the choice of adding current span as links and producer span as parent to the consumer span and vice versa.

@trask
Copy link
Member

trask commented Jun 27, 2022

is this for "receive" consumer spans or "process" consumer spans?

I believe "receive" consumer spans already parent the current span (and link to the message spans, since there can be multiple)

and "process" consumer spans typically don't have a current span (sort of like SERVER spans), though I guess they could, if this is what you are interested in could you explain your setup a bit more about what the current span is in your scenario? thx!

@trask
Copy link
Member

trask commented Aug 8, 2022

Closing, let us know if you are still interested in this and we will re-open, thx!

@trask trask closed this as completed Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants