Send Operator events through the v2 Events API #3872
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 353 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.351
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3872"
general
weight: 0.35
levan-m
What does this PR do?
Sends the metrics forwarder's custom resource events (
Detect Custom Resource …/Delete Custom Resource …) through the v2 Events API instead of v1.POST https://event-management-intake.<site>/api/v2/events(v2 intake is on its own host). An explicitspec.global.endpoint.url/DD_URL/DD_DD_URLis used as-is.changecategory event withchanged_resource: {type: configuration, name: <Kind/namespace/name>}; title and tags are unchangedintegration_id: system, so events keep the Datadog source andsource:datadogtag that v1 events had (without it, v2 attributes them to "My Apps"). The value isn't in the API client's enum but is accepted by the intake.Motivation
CONS-12113: orgs not enabled for v1 event ingestion get
403 Forbidden(This organization is not enabled for the v1 events API. Submit events with POST /api/v2/events instead.) whenever a forwarder starts.Additional Notes
Proxies or URL overrides set through
spec.global.endpoint.url/DD_URLmust route/api/v2/eventstoevent-management-intake.<site>.Minimum Agent Versions
N/A (Operator only).
Describe your test plan
Unit tests cover the events URL per site and the request URL, API key header and payload shape.
<details>
<summary>QA steps</summary>
1. Deploy this Operator build and apply a
DatadogAgentwith a unique cluster name and valid credentials:2. In Event Management, search
kube_cluster_name:<unique-name>. ExpectDetect Custom Resource DatadogAgent/datadog/datadogandDetect Custom Resource DatadogAgentInternal/datadog/datadog, both with Source Datadog.3. Delete the
DatadogAgentand expect the matchingDelete Custom Resource …events.4. The Operator logs should contain no
an error occurred while sending event.</details>
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel[1]: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
🤖 Generated with Claude Code
[CONS-12113]: https://datadoghq.atlassian.net/browse/CONS-12113?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ