-
Notifications
You must be signed in to change notification settings - Fork 898
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
Producer SpanKind does not always imply a remote call #371
Conversation
It's popular in asynchronous scenarios to send messages in batches. In this case, each message may (and should) carry a unique context to be individually traceable. Arguably it means creating span per message. Sending a batch (which is remote outgoing call) is represented by a different span that is linked to all of the messages span contexts. So async messaging scenarios with batching involve * *message* spans and they map to PRODUCER kind (they are parent of asynchronous request) * *send* span that is CLIENT kind (which is remote outgoing call). But it is not a parent of any asynchronous request In some cases (not involving batching) it is possible that dedicated *message* span is not needed and *send* may represent both: context in the message and remote outgoing call. In this case, such span should have PRODUCER kind
Could you update the spec language to explain why PRODUCER may or may not be remote? Also I suspect that if PRODUCER has this property, so does CONSUMER. Should they both be marked maybes? |
…rios also could be local
@jmacd sure, done. I wish we had a spec for async messaging documented, but it should not block v1. I will try to come up with one |
Not sure "may be" is clear enough, but otherwise it looks good to me. |
Active for more than 3 days and have enough sign offs. Merging |
…#371) * Producer SpanKind is not always a remote call It's popular in asynchronous scenarios to send messages in batches. In this case, each message may (and should) carry a unique context to be individually traceable. Arguably it means creating span per message. Sending a batch (which is remote outgoing call) is represented by a different span that is linked to all of the messages span contexts. So async messaging scenarios with batching involve * *message* spans and they map to PRODUCER kind (they are parent of asynchronous request) * *send* span that is CLIENT kind (which is remote outgoing call). But it is not a parent of any asynchronous request In some cases (not involving batching) it is possible that dedicated *message* span is not needed and *send* may represent both: context in the message and remote outgoing call. In this case, such span should have PRODUCER kind * Explain why producer spans are not necessarily remote and async scenarios also could be local * review comments * lint
…#371) * Producer SpanKind is not always a remote call It's popular in asynchronous scenarios to send messages in batches. In this case, each message may (and should) carry a unique context to be individually traceable. Arguably it means creating span per message. Sending a batch (which is remote outgoing call) is represented by a different span that is linked to all of the messages span contexts. So async messaging scenarios with batching involve * *message* spans and they map to PRODUCER kind (they are parent of asynchronous request) * *send* span that is CLIENT kind (which is remote outgoing call). But it is not a parent of any asynchronous request In some cases (not involving batching) it is possible that dedicated *message* span is not needed and *send* may represent both: context in the message and remote outgoing call. In this case, such span should have PRODUCER kind * Explain why producer spans are not necessarily remote and async scenarios also could be local * review comments * lint
It's popular in asynchronous scenarios to send messages in batches.
In this case, each message should carry a unique context to be individually traceable. Arguably it means creating span per message. Such spans do not represent remote calls.
Sending a batch (which is remote outgoing call) is represented by a different span that is linked to all of the messages span contexts.
So async messaging scenarios with batching involve
In some cases (not involving batching) it is possible that dedicated message span is not needed and send may represent both: context in the message and remote outgoing call. In this case, such span should have PRODUCER kind