Reputation: 3265
I'm trying to make myself comfortable in Akka.NET and this is working pretty good. However I'm trying to find a way to track user interaction with the actor-system.
For example, if UserX creates a new user and thus a new account I would like to track the fact that UserX initiated the flow of messages and also include a token (or tracking ID) in the message/event flow that results from the user creation.
Is there a way to accomplish this or do I best create a base class that contains these properties (InitiatorId, TrackingId, ...) for each message/event and fill them each time I Tell, Ask and/or reply?
At the very end I'd like to have all this information arrive in Elastic through Beats.
What's your verdict?
Upvotes: 0
Views: 457
Reputation: 333
There is no baked in way for Akka to track the data you are looking for. In our application, we have base command/event classes from which all of our commands and events in our domain inherit from. These have properties like SourceId
and PerformedBy
. In our environment, Akka is running in an API and we set these properties directly in the API controllers.
FYI, you might want to look into Akka.Monitoring for integrating your actor system with other monitoring tools!
Upvotes: 1