Skip to content

Add error-tracking monitor option to DatadogMonitor CRD. #2775#2778

Open
AkselAllas wants to merge 1 commit intoDataDog:mainfrom
AkselAllas:add-error-tracking-monitor
Open

Add error-tracking monitor option to DatadogMonitor CRD. #2775#2778
AkselAllas wants to merge 1 commit intoDataDog:mainfrom
AkselAllas:add-error-tracking-monitor

Conversation

@AkselAllas
Copy link

@AkselAllas AkselAllas commented Mar 19, 2026

What does this PR do?

Close #2775
Since the go api already supports error-tracking via datadogV1.MONITORTYPE_ERROR_TRACKING_ALERT, then it's super easy to expose this via the CRD.

Motivation

Get error-tracking monitors working via k8s yml.
#2775

Additional Notes

Need help with labels and commit signing. I signed it but it's not working 🤔

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

Probably.

Describe your test plan

My fork successfully created the monitor in my k8s cluster.
I overwrote the DatadogMonitor CRD with the following file (Taken from my PR fork):

datadoghq.com_datadogmonitors.yaml

And by using the following image & conf for the operator:

datadog-operator:
  image:
    repository: ghcr.io/akselallas/datadog-operator
    tag: 1.24.0-error-tracking-monitor-correct
  datadogCRDs: # disable monitor CRD to avoid conflicts with the overwritten CRD from the wrapper
    crds:
      datadogMonitors: false
  datadogMonitor:
    enabled: true

And this is the monitor yml diff:

  query: >-
    error-tracking("service:test-service
    env:staging").source("all").new().rollup("count").by("issue.id").last("1d")
    > 0
  type: error-tracking alert

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

@AkselAllas AkselAllas requested a review from a team March 19, 2026 09:03
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c7e25f1612

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@AkselAllas AkselAllas force-pushed the add-error-tracking-monitor branch 4 times, most recently from c627456 to 64f680b Compare March 19, 2026 09:23
@AkselAllas AkselAllas force-pushed the add-error-tracking-monitor branch from 64f680b to 5fc510b Compare March 19, 2026 09:26
@AkselAllas
Copy link
Author

AkselAllas commented Mar 19, 2026

I overwrote the DatadogMonitor CRD with the following file (Taken from my PR fork):

datadoghq.com_datadogmonitors.yaml

And by using the following image & conf for the operator:

datadog-operator:
  image:
    repository: ghcr.io/akselallas/datadog-operator
    tag: 1.24.0-error-tracking-monitor-correct
  datadogCRDs: # disable monitor CRD to avoid conflicts with the overwritten CRD from the wrapper
    crds:
      datadogMonitors: false
  datadogMonitor:
    enabled: true

And this is the monitor yml diff:

  query: >-
    error-tracking("service:test-service
    env:staging").source("all").new().rollup("count").by("issue.id").last("1d")
    > 0
  type: error-tracking alert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: error-tracking alert

1 participant