Skip to content

Add flightrecorder feature to the operator#2785

Draft
misteriaud wants to merge 4 commits intomainfrom
misteriaud/flightrecorder-feature
Draft

Add flightrecorder feature to the operator#2785
misteriaud wants to merge 4 commits intomainfrom
misteriaud/flightrecorder-feature

Conversation

@misteriaud
Copy link
Member

Summary

  • Adds spec.features.flightRecorder.enabled to the DatadogAgent CRD
  • Creates a flightrecorder sidecar container in the agent pod when enabled
  • Sets up shared Unix socket volume (/var/run/flightrecorder) for agent-to-flightrecorder IPC
  • Sets up data volume (/data/signals) for Vortex columnar output files
  • Configures DD_FLIGHTRECORDER_ENABLED and DD_FLIGHTRECORDER_SOCKET_PATH env vars on the core agent

Test plan

  • Unit tests for feature enable/disable and volume/env var configuration
  • go build ./... passes
  • go test ./internal/controller/datadogagent/feature/... passes
  • Verified in local kind cluster: flightrecorder container starts, listens on socket, volumes mounted correctly

🤖 Generated with Claude Code

misteriaud and others added 3 commits March 20, 2026 09:53
Flight Recorder is a Rust sidecar that records agent pipeline signals
(metrics, logs) to Vortex columnar files. This adds operator support so
users can enable it via `spec.features.flightRecorder.enabled` in the
DatadogAgent CRD.

The operator creates a flightrecorder container in the agent pod with:
- Shared emptyDir volume at /var/run/flightrecorder for Unix socket IPC
- Data volume at /data/signals for Vortex output files
- DD_FLIGHTRECORDER_ENABLED and DD_FLIGHTRECORDER_SOCKET_PATH env vars
  on the core agent container

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 54.54545% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.04%. Comparing base (40e907c) to head (561f8b5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...controller/datadogagent/component/agent/default.go 0.00% 29 Missing ⚠️
...ler/datadogagent/feature/flightrecorder/feature.go 83.09% 10 Missing and 2 partials ⚠️
pkg/testutils/builder.go 0.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2785      +/-   ##
==========================================
+ Coverage   38.78%   39.04%   +0.26%     
==========================================
  Files         309      310       +1     
  Lines       26839    27080     +241     
==========================================
+ Hits        10409    10573     +164     
- Misses      15650    15719      +69     
- Partials      780      788       +8     
Flag Coverage Δ
unittests 39.04% <54.54%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/controller/datadogagent/controller.go 92.85% <ø> (ø)
...ontroller/datadogagent/override/podtemplatespec.go 77.70% <100.00%> (+0.15%) ⬆️
pkg/testutils/builder.go 0.00% <0.00%> (ø)
...ler/datadogagent/feature/flightrecorder/feature.go 83.09% <83.09%> (ø)
...controller/datadogagent/component/agent/default.go 42.89% <0.00%> (-1.79%) ⬇️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40e907c...561f8b5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Request 50Mi, limit 200Mi — based on DESIGN.md benchmarks showing
33-61MB RSS for the recorder sidecar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants