ServiceInsight unable to visualize saga data

I’m having some trouble getting saga data to appear visually in ServiceInsight. My endpoint us using NServiceBus 7.1.10, AzureServiceBusTransport (1.1.12) and AzureStoragePersistence (2.3.0) with StorageType.Sagas.

Within ServiceInsight, I see messages that my saga is handling and I see visual representations of those messages in the all of the views except for the saga view, which says "“To visualize your saga, please install the appropriate nuget package in your endpoint”. I’ve installed the NServcieBus.SagaAudit (3.0.1) NuGet package, but that didn’t seem to make a difference.

Here are a couple of items that may be related:

  • The following exception occurs regularly in the log:
    2019-07-12 16:45:34.671 -06:00 [Information] HTTP GET http://localhost:33333/api/sagas/54d88f0a-f2ec-4d4d-8926-aa88015d5bab (IfNotModified)2019-07-12 16:45:34.676 -06:00 [Error] Error executing the request: Invalid JSON string, Status code is OKSystem.Runtime.Serialization.SerializationException: Invalid JSON string at RestSharp.SimpleJson.DeserializeObject(String json) at ServiceInsight.Framework.MessageDecoders.JsonMessageDeserializer.FindRoot(String content) in C:\BuildAgent\work\9a5d3620b7071330\src\ServiceInsight\Framework\MessageDecoders\JsonMessageDeserializer.cs:line 66 at ServiceInsight.Framework.MessageDecoders.JsonMessageDeserializer.Deserialize[T](IRestResponse response) in C:\BuildAgent\work\9a5d3620b7071330\src\ServiceInsight\Framework\MessageDecoders\JsonMessageDeserializer.cs:line 53 at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)

  • When I look for persisted messaging data in local tables within Azure Storage Explorer, I don’t see any of the data that I see in ServiceInsight

Question: Can anyone help me troubleshoot this, so I can visualize the saga data? I’m hoping to demo this POC code for my team early this coming week.

Thanks,
David Madrian

Hi David,

You won’t see saga audit data in the Azure tables. The endpoint should forward that information to a ServiceControl instance which stores it in it’s embedded database and serves it up to ServiceInsight.

I suspect you are running into this issue where ServiceControl is returning a 200 OK response with no data. This usually happens if the SagaAudit plugin is not present or is not turned on.

In your endpoint with the saga, you should have some code like the following:

endpointConfiguration.AuditSagaStateChanges(serviceControlQueueAddress);

If that is present and the endpoint is sending saga data info to your ServiceControl instance then we need to figure out why there is no saga audit data in the ServiceControl instance for this saga.

Regards,
Mike Minutillo

Hi Mike,

Adding the code you pointed out to my endpoint (endpointConfiguration.AuditSagaStateChanges(serviceControlQueueAddress):wink: made the saga visualization start working in ServiceInsight.

Thanks for your help!

David

That’s great news David.

Good luck with your demo.

Mike