Hosting and startup abstractions for DogStatsd. When using NuGet 3.x this package requires at least version 3.4....
To see the full documentation for StatsdConfig please refer to the documentation
await Host.CreateDefaultBuilder()
.UseDogStatsd(new StatsdConfig
{
StatsdServerName = "127.0.0.1",
Prefix = "prefix",
})
.Build()
.RunAsync();
await Host.CreateDefaultBuilder()
.UseDogStatsd((context) => new StatsdConfig
{
StatsdServerName = context.HostingEnvironment.IsProduction() ? "127.0.0.1" : "127.0.0.2",
Prefix = "prefix"
})
.Build()
.RunAsync();