Repository navigation
[postgresql] Apply condition setting to the statement data stream - #22295
Conversation
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the PostgreSQL statement stream condition fix.
No open issues 🎉
What changed in this PR
This PR makes the PostgreSQL statement data stream honor the configured input-level condition, matching the other PostgreSQL metric streams.
Changes:
- Render
conditionin the statement stream when configured. - Bump the package to
1.32.2and add a bugfix changelog entry.
| File | Description |
|---|---|
packages/postgresql/manifest.yml |
Bumps the package version to 1.32.2. |
packages/postgresql/data_stream/statement/agent/stream/stream.yml.hbs |
Adds conditional rendering of the condition setting. |
packages/postgresql/changelog.yml |
Records the statement stream condition fix. |
Review effort: Balanced
|
/test |
🚀 Benchmarks reportTo see the full report comment with |
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
|
Package postgresql - 1.32.2 containing this change is available at https://epr.elastic.co/package/postgresql/1.32.2/ |
Proposed commit message
[postgresql] Apply condition setting to the statement data stream
The
conditionvar is declared on thepostgresql/metricsinput and is rendered by theactivity,bgwriter,databaseandlogstream templates, but thestatementtemplate did not render it. As a result, thestatementmetricset ignored the configured condition (for example${host.name} == 'node-a') and kept running on hosts where the condition evaluated to false, while the other data streams were correctly skipped.This adds the same
{{#if condition}}block todata_stream/statement/agent/stream/stream.yml.hbs, matching the other streams, and bumps the package to 1.32.2.Checklist
changelog.ymlfile.Author's Checklist
statementstream containscondition: ...when the input-level condition is set.How to test this PR locally
Add a PostgreSQL integration policy with the
conditionvar set (e.g.${host.name} == 'node-a') and the statement data stream enabled. The generated agent policy should now include theconditionon the statement stream, as it already does for activity, bgwriter and database.Related issues
None.
Generated by Claude Code