Orleans integration package for Datadog.
There are six telemetry consumer interfaces extending the ITelemetryConsumer
interface:
IMetricTelemetryConsumer
IDependencyTelemetryConsumer
IEventTelemetryConsumer
IExceptionTelemetryConsumer
IRequestTelemetryConsumer
ITraceTelemetryConsumer
At the moment, only IMetricTelemetryConsumer
is supported and it's implemented by DatadogMetricTelemetryConsumer
.
Implements IMetricTelemetryConsumer
interface. Provides basic metrics like grain count, information about application requests, messaging, etc.
DatadogMetricTelemetryConsumer
has two constructors:
-
DatadogMetricTelemetryConsumer(string[] namesOfRelevantMetrics, StatsdConfig statsdConfig)
- accepts a collection of metric names to be tracked and datadog statsd configurationsiloBuilder.ConfigureServices(services => { services.AddSingleton(serviceProvider => new DatadogMetricTelemetryConsumer( new[] {"App.Requests.Total.Requests.Current"}, new StatsdConfig { StatsdServerName = "127.0.0.1", StatsdPort = 8125 })); services.Configure<TelemetryOptions>( telemetryOptions => telemetryOptions.AddConsumer<DatadogMetricTelemetryConsumer>()); });
Here, Orleans will detect that
DatadogMetricTelemetryConsumer
is already registered in the collection of silo's services (theAddSingleton
bit) and will not instantiate it again.More on statsd configuration here: https://docs.datadoghq.com/developers/service_checks/dogstatsd_service_checks_submission/
-
DatadogMetricTelemetryConsumer()
- Orleans uses this one by default ifDatadogMetricTelemetryConsumer
instance cannot be found in the collection of silo's services.siloBuilder.ConfigureServices(services => { services.Configure<TelemetryOptions>( telemetryOptions => telemetryOptions.AddConsumer<DatadogMetricTelemetryConsumer>()); });
Here, Orleans will instantiate
DatadogMetricTelemetryConsumer
using the default constructor.
A fleshed out example can be found in e.g. the road to orleans.