[New Integration] Add Datadog Audit Logs integration - #20526
[New Integration] Add Datadog Audit Logs integration#20526hnguyen-coreweave wants to merge 5 commits into
Conversation
ReviewersBuildkite won't run for external contributors automatically; you need to add a comment:
NOTE: https://github.com/elastic/integrations/blob/main/.buildkite/pull-requests.json contains all those details. |
|
@efd6 and @andrewkroh, I heard you guys are the go tos for reviewers |
|
/test |
|
@vera-review-bot review |
|
/test |
|
Changelog link mismatch — expected
Tip If expected, add the |
💔 Build Failed
Failed CI StepsHistory |
| type: keyword | ||
| - name: mcp_call | ||
| type: boolean | ||
| - name: metadata |
There was a problem hiding this comment.
Severity: 🟡 Medium confidence: medium path: packages/datadog/data_stream/audit/fields/fields.yml:95
datadog.metadata copies the entire vendor metadata object into a flattened field while ~30 of its leaves are already lifted into typed datadog.* fields, so most metadata content is indexed twice.
Details
default.yml lines 431-585 extract workflow_id, workflow_name, instance_id, step_name, bundle_id, request_id, track, session_id, agent_metadata., host_metadata., oauth_client., api_key.id, application_key.id, client., tool.name, run_as_user.*, usage.duration and more into dedicated fields; line 586-589 then copies the whole _dd.attributes.metadata object into datadog.metadata. Every one of those values is stored and indexed a second time under the flattened field, which is the same storage cost the deprecated preserve_duplicate_custom_fields pattern was removed for. Confirmed in the expected output: usage.duration appears at both line 6792 (inside datadog.metadata) and line 6869 (as datadog.usage.duration).
Recommendation:
Remove the keys that already have typed homes before copying the remainder, so the flattened field only carries genuinely unmodelled metadata:
- remove:
field:
- _dd.attributes.metadata.workflow_id
- _dd.attributes.metadata.workflow_name
- _dd.attributes.metadata.instance_id
- _dd.attributes.metadata.usage
- _dd.attributes.metadata.oauth_client
- _dd.attributes.metadata.run_as_user
ignore_missing: true
tag: remove_promoted_metadata_keys
- set:
field: datadog.metadata
copy_from: _dd.attributes.metadata
ignore_empty_value: true
tag: set_metadata_remainder🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills
⚠️ Automated review — verify suggestions before applying.
There was a problem hiding this comment.
I prefer to the keep the data in the original shape to avoid confusion for the readers in the future
Review summaryIssues found across the latest commits fa5c04a — 7 high, 10 medium, 2 low
🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills
|
|
@qcorporation mind running the /test again? I believe I addressed most/all of the comments from the first review |
Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots