Describe the bug
The Datadog plugin can no longer retrieve any costs: every window fails with
error getting dd pricing: error getting usage billable usage summary: 400 Bad Request
The root cause is that GetDDUnitPrices calls GET /api/v1/usage/billable-summary via datadog-api-client-go, which serializes the month query parameter as a full RFC3339 timestamp (e.g. month=2026-07-01T00:00:00Z). The Datadog API now enforces a stricter format and rejects the request:
{"errors":[{"status":"400","title":"Bad Request","detail":"month must be in the format YYYY-MM"}]}
Calling the same endpoint with month=2026-07 (same credentials) succeeds. The API key/app key are valid (/api/v1/validate returns 200), so this is not an auth issue. The current master of datadog-api-client-go still serializes time.Time params as RFC3339, so bumping the client dependency does not help.
Since GetDDUnitPrices has no fallback pricing path, this makes the plugin return zero costs for every window — the plugin is currently unusable.
To Reproduce
- Configure the datadog plugin with valid credentials (observed on site
us5.datadoghq.com, 2026-07-31)
- Trigger any custom-cost ingestion window
- Every window logs
error getting usage billable usage summary: 400 Bad Request
- Reproduce outside the plugin:
curl "https://api.us5.datadoghq.com/api/v1/usage/billable-summary?month=2026-07-01T00%3A00%3A00Z" -H "DD-API-KEY: ..." -H "DD-APPLICATION-KEY: ..." → 400 with the error above; change to month=2026-07 → succeeds
Expected behavior
The billable-summary request uses a month format the API accepts, and unit pricing loads.
Which version of OpenCost Plugins are you using?
v0.0.16 (latest; also affects main, which is identical to v0.0.16 for the datadog plugin)
Additional context
Describe the bug
The Datadog plugin can no longer retrieve any costs: every window fails with
The root cause is that
GetDDUnitPricescallsGET /api/v1/usage/billable-summaryvia datadog-api-client-go, which serializes themonthquery parameter as a full RFC3339 timestamp (e.g.month=2026-07-01T00:00:00Z). The Datadog API now enforces a stricter format and rejects the request:{"errors":[{"status":"400","title":"Bad Request","detail":"month must be in the format YYYY-MM"}]}Calling the same endpoint with
month=2026-07(same credentials) succeeds. The API key/app key are valid (/api/v1/validatereturns 200), so this is not an auth issue. The current master of datadog-api-client-go still serializestime.Timeparams as RFC3339, so bumping the client dependency does not help.Since
GetDDUnitPriceshas no fallback pricing path, this makes the plugin return zero costs for every window — the plugin is currently unusable.To Reproduce
us5.datadoghq.com, 2026-07-31)error getting usage billable usage summary: 400 Bad Requestcurl "https://api.us5.datadoghq.com/api/v1/usage/billable-summary?month=2026-07-01T00%3A00%3A00Z" -H "DD-API-KEY: ..." -H "DD-APPLICATION-KEY: ..."→ 400 with the error above; change tomonth=2026-07→ succeedsExpected behavior
The billable-summary request uses a month format the API accepts, and unit pricing loads.
Which version of OpenCost Plugins are you using?
v0.0.16 (latest; also affects main, which is identical to v0.0.16 for the datadog plugin)
Additional context
getDDCostsForWindowimmediately hits the known SIGSEGV from [BUG] Datadog plugin crashes with SIGSEGV in getDDCostsForWindow - nil pointer dereference #68 (NextRecordId.IsSet()is true for an explicit JSON null, soGet()returns nil and the deref panics) — so fixing only the month format still yields a crashing plugin. A fix for both is in the linked PR.http.RoundTripperrewrite (robust against client-library versions) plus the [BUG] Datadog plugin crashes with SIGSEGV in getDDCostsForWindow - nil pointer dereference #68 nil guard, verified end-to-end against a live Datadog org (real billable-summary + hourly-usage calls returning real costs).