[ServiceInsights] Saga view is getting slower and slower

The Saga view in ServiceInsights is getting slower and slower for me, depending on how many history there is.

I have a saga that is being started by ContactId (ConfigureHowToFindSaga) and completes. This saga can run multiple times (sequential), every time with a different ConversationId.

The problem is that the Saga view shows every historic run of this Saga, which is getting longer and longer. Therefor it becomes slower and slower (even hanging the UI).

One benefit of thit behavior is that shows a complete ‘timeline’ of what happens around the specific ContactId, but most/all of the time I’m only interested in the current conversation of the message that I selected.

The Sequence Diagram view shows just the current conversation and not previous ones. This is the behavior is also expect from the Saga view.

I don’t see a setting to change this behavior. Is this behavior un purpose like this?

@remyvd Something feels wrong. You’re saying “I have a saga that is being started by ContactId (ConfigureHowToFindSaga) and completes. This saga can run multiple times (sequential), every time with a different ConversationId.” which implies a new saga instance.

It feels that these should not be bundled. Which persister are you using? Are manually assigning the saga storage identifier? Can you share more details on this?

Yes, it’s every time a new saga instance. Thats way I have this critic that the Saga view is showing all the saga instances like it is one instance (like a timeline :slight_smile: ).

The only thing that relates the saga instances is the Id that started the saga instance. For example, a ContactId, or in the saga example below the ListId.

I am not doing anything special, not setting my own saga identifier, nothing. See the saga finder method below:

    protected override void ConfigureHowToFindSaga(SagaPropertyMapper<SagaSyncListToAudienceWorkflow> mapper) =>
        mapper.MapSaga(sagaData => sagaData.ListId)
              .ToMessage<SyncListToAudience>(msg => msg.ListId);

This is how the Saga view looks like. You see its being initiated (new instance), will the previous instance have been completed correctly (using MarkAsComplete())

I use Azure table storage for storing the sagas.

@remyvd The saga audit plugin was not designed with the intent to be used in a production environment but to aid developers:

https://docs.particular.net/nservicebus/sagas/saga-audit

It is built specifically to help developers verify saga logic during development.

I was able to repro this and created an issue for it:

1 Like