Skip to content

Commit 678c519

Browse files
committed
feat(errortracking): add core error-tracking package
Introduces pkg/util/log/errortracking/ with: - ErrorLog struct and Submitter function type (types.go) - slog.Handler filtering Error+ records, anchoring stack at r.PC (handler.go) - SyncCapture wrapper for pre-capturing the stack before async boundaries - Bouncer for per-key deduplication within a sliding time window (bouncer.go) - Rollover delivers suppressed-only count (priorTotal-1) to avoid double-counting - Cap enforced after pruneLocked: drops new keys as pass-through when all entries are within window
1 parent b1b11bd commit 678c519

158 files changed

Lines changed: 2236 additions & 2396 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
if: $DEPLOY_AGENT == "true" || $DDR_WORKFLOW_ID != null
2323

2424
# Windows-specific Go source files, pkg/, and cmd/ (27 paths), need to be splitted because Gitlab has a limit to 50 paths in a single rule
25-
.windows_path:
26-
&windows_path # Windows-specific Go source files (by filename convention)
25+
.windows_path: &windows_path
26+
# Windows-specific Go source files (by filename convention)
2727
- "**/*_windows.go"
2828

2929
# Windows-specific packages in pkg/
@@ -62,7 +62,6 @@
6262
- "*.bazel*"
6363
- deps/**/*
6464
- bazel/**/*
65-
- tasks/build_tags.bzl
6665

6766
# Windows-specific comp/, tools, omnibus, containers, tasks, and cross-cutting paths
6867
.windows_path_2: &windows_path_2 # Windows-specific comp/ components
@@ -278,25 +277,25 @@ variables:
278277
# Build images versions
279278
# To use images from datadog-agent-buildimages dev branches, set the corresponding
280279
# SUFFIX variable to
281-
CI_IMAGE_BTF_GEN: v120029388-43933fee
280+
CI_IMAGE_BTF_GEN: v118883148-8fa6a628
282281
CI_IMAGE_BTF_GEN_SUFFIX: ""
283-
CI_IMAGE_DOCKER_X64: v120029388-43933fee
282+
CI_IMAGE_DOCKER_X64: v118883148-8fa6a628
284283
CI_IMAGE_DOCKER_X64_SUFFIX: ""
285-
CI_IMAGE_DOCKER_ARM64: v120029388-43933fee
284+
CI_IMAGE_DOCKER_ARM64: v118883148-8fa6a628
286285
CI_IMAGE_DOCKER_ARM64_SUFFIX: ""
287-
CI_IMAGE_GITLAB_AGENT_DEPLOY: v120029388-43933fee
286+
CI_IMAGE_GITLAB_AGENT_DEPLOY: v118883148-8fa6a628
288287
CI_IMAGE_GITLAB_AGENT_DEPLOY_SUFFIX: ""
289-
CI_IMAGE_LINUX: v120029388-43933fee
288+
CI_IMAGE_LINUX: v118883148-8fa6a628
290289
CI_IMAGE_LINUX_SUFFIX: ""
291-
CI_IMAGE_RPM_X64: v120029388-43933fee
290+
CI_IMAGE_RPM_X64: v118883148-8fa6a628
292291
CI_IMAGE_RPM_X64_SUFFIX: ""
293-
CI_IMAGE_RPM_ARM64: v120029388-43933fee
292+
CI_IMAGE_RPM_ARM64: v118883148-8fa6a628
294293
CI_IMAGE_RPM_ARM64_SUFFIX: ""
295-
CI_IMAGE_RPM_ARMHF: v120029388-43933fee
294+
CI_IMAGE_RPM_ARMHF: v118883148-8fa6a628
296295
CI_IMAGE_RPM_ARMHF_SUFFIX: ""
297-
CI_IMAGE_WIN_LTSC2022_X64: v119961810-e18b0f68
296+
CI_IMAGE_WIN_LTSC2022_X64: v116983866-e2293bec
298297
CI_IMAGE_WIN_LTSC2022_X64_SUFFIX: ""
299-
CI_IMAGE_WIN_LTSC2025_X64: v119961810-e18b0f68
298+
CI_IMAGE_WIN_LTSC2025_X64: v116983866-e2293bec
300299
CI_IMAGE_WIN_LTSC2025_X64_SUFFIX: ""
301300

302301
DATADOG_AGENT_EMBEDDED_PATH: /opt/datadog-agent/embedded

BUILD.bazel

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,26 @@ exports_files(["go.mod"])
5151
# gazelle:exclude cmd/agent/subcommands/config
5252
# gazelle:exclude cmd/agent/subcommands/configcheck
5353
# gazelle:exclude cmd/agent/subcommands/controlsvc
54+
# gazelle:exclude cmd/agent/subcommands/coverage
5455
# gazelle:exclude cmd/agent/subcommands/diagnose
56+
# gazelle:exclude cmd/agent/subcommands/dogstatsdreplay
5557
# gazelle:exclude cmd/agent/subcommands/flare
5658
# gazelle:exclude cmd/agent/subcommands/import
59+
# gazelle:exclude cmd/agent/subcommands/integrations
5760
# gazelle:exclude cmd/agent/subcommands/jmx
61+
# gazelle:exclude cmd/agent/subcommands/launchgui
5862
# gazelle:exclude cmd/agent/subcommands/processchecks
5963
# gazelle:exclude cmd/agent/subcommands/run
6064
# gazelle:exclude cmd/agent/subcommands/snmp
65+
# gazelle:exclude cmd/agent/subcommands/validatepodannotation
6166
# gazelle:exclude cmd/agent/windows
6267
# gazelle:exclude cmd/cluster-agent
6368
# gazelle:exclude cmd/cluster-agent-cloudfoundry
6469
# gazelle:exclude cmd/dogstatsd
6570
# gazelle:exclude cmd/host-profiler/*.go
6671
# gazelle:exclude cmd/host-profiler/command
6772
# gazelle:exclude cmd/host-profiler/subcommands
73+
# gazelle:exclude cmd/installer/subcommands
6874
# gazelle:exclude cmd/iot-agent
6975
# gazelle:exclude cmd/otel-agent/command
7076
# gazelle:exclude cmd/otel-agent/subcommands/flare
@@ -74,6 +80,8 @@ exports_files(["go.mod"])
7480
# gazelle:exclude cmd/process-agent/api
7581
# gazelle:exclude cmd/process-agent/command
7682
# gazelle:exclude cmd/process-agent/subcommands
83+
# gazelle:exclude cmd/sbomgen
84+
# gazelle:exclude cmd/secret-generic-connector/main.go
7785
# gazelle:exclude cmd/security-agent/*.go
7886
# gazelle:exclude cmd/security-agent/api
7987
# gazelle:exclude cmd/security-agent/subcommands
@@ -83,12 +91,25 @@ exports_files(["go.mod"])
8391
# gazelle:exclude cmd/serverless-init/mode
8492
# gazelle:exclude cmd/system-probe/modules
8593
# gazelle:exclude cmd/system-probe/subcommands/compliance
94+
# gazelle:exclude cmd/system-probe/subcommands/ebpf
8695
# gazelle:exclude cmd/system-probe/subcommands/run
8796
# gazelle:exclude cmd/system-probe/subcommands/runtime
8897
# gazelle:exclude cmd/system-probe/subcommands/usm
8998
# gazelle:exclude cmd/system-probe/windows
9099
# gazelle:exclude cmd/systray
100+
# gazelle:exclude comp/agent/bundle.go
101+
# gazelle:exclude comp/agent/bundle_test.go
102+
# gazelle:exclude comp/agent/cloudfoundrycontainer/fx
103+
# gazelle:exclude comp/agent/cloudfoundrycontainer/impl
104+
# gazelle:exclude comp/api/api/apiimpl/api.go
105+
# gazelle:exclude comp/api/api/apiimpl/api_mock.go
106+
# gazelle:exclude comp/api/api/apiimpl/api_test.go
107+
# gazelle:exclude comp/api/api/apiimpl/server.go
108+
# gazelle:exclude comp/api/api/apiimpl/server_cmd.go
109+
# gazelle:exclude comp/api/api/apiimpl/server_ipc.go
110+
# gazelle:exclude comp/api/api/apiimpl/server_test.go
91111
# gazelle:exclude comp/api/authtoken
112+
# gazelle:exclude comp/api/commonendpoints
92113
# gazelle:exclude comp/checks/windowseventlog/fx
93114
# gazelle:exclude comp/checks/windowseventlog/impl/*.go
94115
# gazelle:exclude comp/checks/windowseventlog/impl/check/*.go
@@ -97,19 +118,32 @@ exports_files(["go.mod"])
97118
# gazelle:exclude comp/collector/bundle.go
98119
# gazelle:exclude comp/collector/collector/fx
99120
# gazelle:exclude comp/collector/collector/impl/*.go
121+
# gazelle:exclude comp/connectivitychecker/fx
122+
# gazelle:exclude comp/connectivitychecker/impl
100123
# gazelle:exclude comp/core/autodiscovery/autodiscoveryimpl
101124
# gazelle:exclude comp/core/flare/flareimpl
102125
# gazelle:exclude comp/core/gui/fx
103126
# gazelle:exclude comp/core/gui/impl
104127
# gazelle:exclude comp/core/sysprobeconfig/sysprobeconfigimpl
105128
# gazelle:exclude comp/core/diagnose/local
129+
# gazelle:exclude comp/core/tagger/fx-dual
106130
# gazelle:exclude comp/core/workloadmeta/collectors/catalog
131+
# gazelle:exclude comp/core/workloadmeta/collectors/catalog-clusteragent
107132
# gazelle:exclude comp/core/workloadmeta/collectors/catalog-core
133+
# gazelle:exclude comp/core/workloadmeta/collectors/catalog-dogstatsd
134+
# gazelle:exclude comp/core/workloadmeta/collectors/catalog-otel
135+
# gazelle:exclude comp/core/workloadmeta/collectors/catalog-remote
136+
# gazelle:exclude comp/core/workloadmeta/collectors/internal/kubeapiserver
137+
# gazelle:exclude comp/core/workloadmeta/collectors/internal/kubemetadata
108138
# gazelle:exclude comp/core/workloadmeta/collectors/internal/process
139+
# gazelle:exclude comp/core/workloadmeta/defaults
140+
# gazelle:exclude comp/core/workloadmeta/init
109141
# gazelle:exclude comp/dogstatsd/http/fx
110142
# gazelle:exclude comp/dogstatsd/http/impl/*.go
111143
# gazelle:exclude comp/forwarder/orchestrator/orchestratorimpl
112144
# gazelle:exclude comp/host-profiler/collector/fx
145+
# gazelle:exclude comp/host-profiler/flare
146+
# gazelle:exclude comp/logonduration/fx
113147
# gazelle:exclude comp/anomalydetection/logssource/impl
114148
# gazelle:exclude comp/logs/adscheduler/fx
115149
# gazelle:exclude comp/logs/adscheduler/impl

0 commit comments

Comments
 (0)