lightbend/kalix-jvm-sdk

Tracing: consider not producing span for ignored events

Opened this issue · 0 comments

When we have an Action subscribing to an ESE but which only handles 1 event and ignores the rest. The generated trace for an event that is ignored still includes a span for the Action. Additionally, the span is wrongly marked as belonging to the existing handler.

Example:

  • GetRandomPhotoActionAsync handles only UserAdded events so HandleAdd is the only declared handler there
  • however, when a UserNameChanged is produced, we get a span Action : GetRandomPhotoActionAsync HandleAddas shown below.
Screenshot 2024-02-08 at 16 31 32

Ideally, I think we should not produce a span for ignored events. But if we must, then would be better to have it named correctly.