Merged
Conversation
* Added StreamReadPosition.End
Deploying eventuous-main with
|
| Latest commit: |
95c55b7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6b3ddcf7.eventuous-main.pages.dev |
| Branch Preview URL: | https://remove-message-type-from-pro.eventuous-main.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ProducedMessagestruct contains theMessageTypeproperty that is used for setting the message type tag in the trace, as well as for additional logging (verbose level). Both those usages required the default type mapper. However, the actual message type is provided by the serialiser, and that value wasn't used in tracing. So, it might occur that when using a custom serialiser that doesn't use the type mapper, a producer would fail because the type isn't registered in the type map although it should work.This PR adds a
SetActivityMessageTypeprotected method to theBaseProducerclass. Producer implementations could (not required) use it to set the message type on the trace.As a side effect it became obvious that setting the message type on the produce activity doesn't work properly when messages are produced in batches. It happens even with implementations that produce messages individually. Therefore, it seems that, although it's still useful, a producer that starts one span for the whole batch isn't the best implementation.
It might be relevant to set the message type tag only if one message is produced.
Producing batches with appropriate traces could potentially be solved by span links. However, there are not many examples of batched produce instrumented with linked spans. The only example I found does the opposite - links one span downstream to multiple spans upstream (batch consume).
In any case, span linking isn't widely supported at the moment, so it might be worth revisiting this later.