AspNetCore.Diagnostics.HealthChecks
AspNetCore.Diagnostics.HealthChecks copied to clipboard
Added overload to for StatsdConfig
Was not possible to customize additional parameters of the Datadog Publisher (eg. the port)
I only added an overload to expose the StatsdConfig, so, the consumers of the package can freely set any parameter supported by Datadog.
@dotnet-policy-service agree
Sorry I'm not sure what you mean by "ensuring this health check is optimal"?
Sorry I'm not sure what you mean by "ensuring this health check is optimal"?
@kevingosse Currently the health check registers a singleton factory which creates a DogStatsdService dedicated to the health check when its invoked for the first time:
https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/f587a637a1dc9850cce87d441ba173d50679aefc/src/HealthChecks.Publisher.Datadog/DependencyInjection/DatadogHealthCheckBuilderExtensions.cs#L28-L38
I am wondering if it should keep doing that, or just resolve DogStatsdService instance from the DI (a lot of similar types are thread safe and recommended to used as a singleton). Just to make sure there is one DogStatsdService instance per app (rather than at least two).
Oh I see. Yes, DogStatsdService is meant to be used as a singleton, so I agree using DI would help reducing the risk of creating multiple instances 👍
I've sent https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/pull/2329 as a follow up