feat(audit-logs): updates opensearchexporter to use a logs_index_on_error flag for backup error records - #1982
feat(audit-logs): updates opensearchexporter to use a logs_index_on_error flag for backup error records#1982olandr wants to merge 2 commits into
Conversation
3576cc2 to
4ff6927
Compare
4ff6927 to
55b8487
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The logs_index_on_error templating is incorrect in logs/charts/templates/ingester-collector.yaml (likely invalid YAML output) and ${index} is used inconsistently in logs/charts/templates/_external-audit-exporter.tpl, likely producing an unresolved error index name.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the OpenSearch exporter configuration across the logs and audit-logs Helm charts to support routing failed export attempts into a dedicated “error/deadletter” index via a new logs_index_on_error setting, and bumps the audit-logs chart/plugin versions accordingly.
Changes:
- Add
logs_index_on_errorto multiple OpenSearch exporter stanzas (failover, external, syslog, ingester, and collector templates). - Switch the OTEL collector build to a forked
opensearchexportermodule/version that presumably supportslogs_index_on_error. - Bump
audit-logschart and plugin definition versions from0.2.18→0.2.19.
File summaries
| File | Description |
|---|---|
| logs/charts/templates/logs-collector.yaml | Adds logs_index_on_error for OpenSearch exporters (standard + cronus failover pairs). |
| logs/charts/templates/ingester-collector.yaml | Adds logs_index_on_error for ingester OpenSearch exporters (needs template fix). |
| logs/charts/templates/_syslog-audit-filter-config.tpl | Adds logs_index_on_error for syslog non-audit OpenSearch exporters. |
| logs/charts/templates/_external-config.tpl | Adds logs_index_on_error for external OpenSearch exporters. |
| logs/charts/templates/_external-audit-exporter.tpl | Adds logs_index_on_error for external syslog audit OpenSearch exporters (needs index placeholder fix). |
| logs/build/otel-collector-builder-config.yaml | Updates OpenSearch exporter module to github.com/cloudoperators/.../opensearchexporter v0.152.6. |
| audit-logs/plugindefinition.yaml | Bumps plugin definition version and referenced chart version to 0.2.19. |
| audit-logs/charts/templates/ingester-collector.yaml | Adds logs_index_on_error pointing to a *-deadletter index for ingesters. |
| audit-logs/charts/templates/audit-logs-collector.yaml | Adds logs_index_on_error for the audit logs collector OpenSearch exporter. |
| audit-logs/charts/templates/_failover-config.tpl | Adds logs_index_on_error for the audit logs failover OpenSearch exporter config. |
| audit-logs/charts/Chart.yaml | Bumps chart version to 0.2.19. |
Review details
Suppressed comments (2)
logs/charts/templates/ingester-collector.yaml:168
- Same issue as above:
{{ $name | quote }}-errorwill render invalid YAML. Useprintfto append the suffix before quoting.
logs_index: {{ $name | quote }}
logs_index_on_error: {{ $name | quote }}-error
logs/charts/templates/_external-audit-exporter.tpl:85
- Same mismatch for failover B:
logs_indexisaudit-datastreambutlogs_index_on_erroruses${index}-..., which is likely unresolved here. Useaudit-datastream-errorinstead.
endpoint: {{ required "openTelemetry.externalCollector.syslogConfig.openSearchLogs.auditEndpoint is required when audit kafka is disabled" .Values.openTelemetry.externalCollector.syslogConfig.openSearchLogs.auditEndpoint }}
logs_index: audit-datastream
logs_index_on_error: ${index}-datastream-error
- Files reviewed: 12/12 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
55b8487 to
bae5eb9
Compare
bae5eb9 to
aeacb6f
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The Logs chart default image tag was updated but the Logs README still documents the old default tag, which is user-facing drift that should be corrected before merge.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 17/17 changed files
- Comments generated: 1
- Review effort level: Lite
| collectorImage: | ||
| # -- Image repository for OpenTelemetry Collector | ||
| repository: ghcr.io/cloudoperators/opentelemetry-collector-contrib | ||
| # -- Image tag for OpenTelemetry Collector | ||
| tag: "a62a383" | ||
| tag: "c97076f" |
…rror flag for backup error records --------- Signed-off-by: Simon Olander <simon.olander@sap.com>
…rror for backup error records --------- Signed-off-by: Simon Olander <simon.olander@sap.com>
aeacb6f to
7caacc9
Compare
No description provided.