Hey @JohnnyMax
The ideal approach would be to instrument both the events ( SPA and API ) and have an event property (e.g source = ‘SPA’ vs source = ‘API’ ) to identify your system usage better.
Assuming the SPA can be instrumented using JS SDK and the API events using the HTTP API.
Let me know if I have interpreted your use case correctly. Hope this helps.
Hi Johnny,
I always think it's best to keep a log of as much as possible so I would log both operations, their payload and any relevant data for future reference, if needs be. Unless I am misinterpreting too, I agree with Saish here! I would have an EP that would state whether it is from the SPA or the APIs. I would also instrument the JS SDK on the SPA (or any relevant SDK such as Java, perhaps!). You can then determine from which "side" the events come from, API or SPA.
I hope this helps! If you need more help or I misunderstood, do let me know and I will be here to help!