-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Describe the bug
Your sample code for both Asp.Net and Asp.Net MVC you register the analytics client as scoped which effectively makes them per request but from what I am gathering it seems like it should be registered as a singleton, why are they registered as scoped?
Can you update somewhere in your documentation explicitly stating that the analytics client is thread safe and can be registered as a singleton (if that is the case) and then change your sample code to register them as singletons?
To Reproduce
Steps to reproduce the behavior:
This sample code:
https://github.com/segmentio/Analytics-CSharp/blob/main/Samples/AspNetMvcSample/Startup.cs
https://github.com/segmentio/Analytics-CSharp/blob/main/Samples/AspNetSample/Startup.cs
Expected behavior
They should be registering the analytics client as a singleton.