Orleans integration package for Datadog.
There are six telemetry consumer interfaces extending the ITelemetryConsumer interface:
IMetricTelemetryConsumerIDependencyTelemetryConsumerIEventTelemetryConsumerIExceptionTelemetryConsumerIRequestTelemetryConsumerITraceTelemetryConsumer
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
DatadogMetricTelemetryConsumeris already registered in the collection of silo's services (theAddSingletonbit) 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 ifDatadogMetricTelemetryConsumerinstance cannot be found in the collection of silo's services.siloBuilder.ConfigureServices(services => { services.Configure<TelemetryOptions>( telemetryOptions => telemetryOptions.AddConsumer<DatadogMetricTelemetryConsumer>()); });
Here, Orleans will instantiate
DatadogMetricTelemetryConsumerusing the default constructor.
A fleshed out example can be found in e.g. the road to orleans.