Datadog Metrics
CritterWatch can pull throughput, failure-rate, baseline, and dead-letter rate from Datadog's metrics API instead of Prometheus or VictoriaMetrics. The 0.5+ alert evaluator, the per-service summary, and the various trend visualizations all work transparently against whichever metrics backend the operator has configured.
What CritterWatch needs from Datadog
- A Datadog API Key and a Datadog Application Key
- The site your account is hosted on (
us1/us3/us5/eu1/ap1/ap2/us1-fed; see the host each maps to) - Your Wolverine services already shipping OTel metrics to Datadog. Datadog accepts OTLP natively or via the Datadog Agent — either path is fine.
The same keys you use for Datadog Tracing work here. The app key only needs read access to the Metrics Read scope.
How to wire it up
In your CritterWatch host startup:
services.AddCritterWatchMetricsDataSource<DataDogMetricsDataSource, DataDogMetricsDataSourceOptions>(
"datadog",
opts =>
{
opts.ApiKey = builder.Configuration["Datadog:ApiKey"]!;
opts.AppKey = builder.Configuration["Datadog:AppKey"]!;
opts.Site = builder.Configuration["Datadog:Site"] ?? "us1";
});Use your existing secret store — env vars, Azure Key Vault, AWS Secrets Manager, etc. CritterWatch reads from IConfiguration and never persists the keys.
Per-service routing
// In the monitored service's UseWolverine — point it at the named source the console registered.
opts.AddCritterWatchMonitoring(critterWatchUri, systemControlUri)
.MetricsDataSource("datadog");Same name you used in the host registration. The operator can override per-service via Settings → Metrics Data Sources.
CritterWatch filters on Datadog's service tag using the CritterWatch service name. If your services report under a different service value, map them with opts.ServiceLabelMapping["ServiceName"] = "datadog-service-name" in the registration above.
Which metrics CritterWatch reads
Not yet verified against a real Datadog org
Since CritterWatch 1.5 the Datadog source queries the instruments Wolverine actually emits, in the form Datadog's metric-name rules give them. Earlier releases queried wolverine.message.executions and similar names that Wolverine never emitted, so a Datadog-backed widget or alert read empty. The new names have not yet been confirmed against a live Datadog account, so check them in your account (see below) before relying on Datadog-backed widgets or alerts. That check is tracked as #1696.
Wolverine 6.x names its instruments with dashes (wolverine-execution-time). Datadog doesn't allow a dash in a metric name, so the instrument arrives with underscores:
| What | Metric queried | Datadog query |
|---|---|---|
| Executions | wolverine_execution_time | count:wolverine_execution_time{service:X} |
| Mean execution time | wolverine_execution_time | sum:wolverine_execution_time{service:X} divided by the count |
| Mean effective time | wolverine_effective_time | sum: / count: as above |
| Failures | wolverine_execution_failure | sum:wolverine_execution_failure{service:X}.as_count() |
| Dead letters | wolverine_dead_letter_queue | sum:wolverine_dead_letter_queue{service:X}.as_count() |
| Sent / received | wolverine_messages_sent / wolverine_messages_received | sum:<name>{service:X}.as_count() |
The two time instruments are histograms, which Datadog stores as distributions by default. That's why they're read with sum: and count:.
If the names in your account differ, for example because your Datadog org renames metrics, CritterWatch won't find them. Use the Datadog Metrics Explorer to confirm the names you're actually emitting.
Per-message-type breakdown
Some CritterWatch features (dead-letter breakdown table, message-type alert thresholds) need the metrics broken down by message type. CritterWatch groups by Wolverine's own measurement tags, which Datadog keeps as they are: message.type, message.destination and exception.type (and tenant.id on the Tenants tab). So the dead-letter breakdown query is:
sum:wolverine_dead_letter_queue{service:X} by {message.type,exception.type}.as_count()If Datadog isn't surfacing that grouping, your OTel exporter is probably stripping metric attributes before they reach Datadog. The fix is usually to set OTEL_RESOURCE_ATTRIBUTES_AS_LABELS=true on the Datadog Agent (or the equivalent on the Otel-collector-to-Datadog exporter).
Per-tenant alerting
Per-tenant metrics alerts are not evaluated on a Datadog source. The Datadog source has no per-tenant reads, so the evaluator skips the per-tenant pass for a service bound to it and evaluates the service as a whole, rather than raising one alert per tenant from service-wide numbers. Per-tenant alerting works on the built-in store, Prometheus, VictoriaMetrics and Application Insights.
When a metric isn't available
CritterWatch's IMetricsDataSource contract returns empty snapshots (zero counts, null timestamps) when a metric isn't found — same shape as Prometheus / VictoriaMetrics impls. The operator sees blank cells in the affected widgets, not error messages. The Settings page Test button validates the API key + Site but not the per-metric availability; verify metric names by clicking through a Service detail page after wiring up and confirming the throughput cards populate.
Multi-region
Register multiple instances if you split metrics across Datadog regions:
services.AddCritterWatchMetricsDataSource<DataDogMetricsDataSource, DataDogMetricsDataSourceOptions>(
"datadog-us",
opts => { opts.ApiKey = ...; opts.Site = "us1"; });
services.AddCritterWatchMetricsDataSource<DataDogMetricsDataSource, DataDogMetricsDataSourceOptions>(
"datadog-eu",
opts => { opts.ApiKey = ...; opts.Site = "eu1"; });Each monitored service picks one via opts.MetricsDataSource("datadog-us") or "datadog-eu". Operators can override per-service in Settings.
