[aws_otel] Improve ESQL queries - #19799
Conversation
TL;DRBuildkite never reached package tests: the repository post-checkout hook failed while merging PR Remediation
Investigation detailsRoot CauseThis is a merge conflict, not a test failure. The PR changes package versions from older base values (
Evidence
Verification
What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
✅ 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.
Pull request overview
This PR updates AWS OpenTelemetry integration assets by refining several Kibana dashboard ESQL queries (primarily for SQS and RDS) and bumping package versions with corresponding changelog entries.
Changes:
- Updated SQS and RDS dashboard panels to use revised ESQL patterns (e.g.,
TSpipelines,*_over_timefunctions, and explicit freshness filtering for “latest” state). - Bumped package versions for
aws_sqs_otel(0.6.0 → 0.6.1),aws_rds_otel(0.6.0 → 0.6.1), andaws_ecs_otel(0.5.0 → 0.5.1). - Added changelog entries describing the dashboard query improvements.
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/aws_sqs_otel/manifest.yml | Bumps SQS OTEL package version to 0.6.1. |
| packages/aws_sqs_otel/kibana/dashboard/aws_sqs_otel-b1c3d401-841f-43f1-9421-4afc51a2ec87.json | Updates multiple SQS dashboard panels’ ESQL queries and embedded Vega spec query logic. |
| packages/aws_sqs_otel/changelog.yml | Adds 0.6.1 changelog entry for the SQS dashboard query changes. |
| packages/aws_rds_otel/manifest.yml | Bumps RDS OTEL package version to 0.6.1. |
| packages/aws_rds_otel/kibana/dashboard/aws_rds_otel-c92e1216-83f6-4de7-9d7f-1bcb42d5988a.json | Updates multiple RDS dashboard panels’ ESQL queries and embedded Vega spec query logic (including “freshness” filtering). |
| packages/aws_rds_otel/changelog.yml | Adds 0.6.1 changelog entry for the RDS dashboard query changes. |
| packages/aws_ecs_otel/manifest.yml | Bumps ECS OTEL package version to 0.5.1. |
| packages/aws_ecs_otel/changelog.yml | Adds 0.5.1 changelog entry (currently inconsistent with the actual changes in this PR for ECS). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The RDS/SQS/ECS status hexmaps classified resource status using a different aggregation than the "by status" donut and KPI panels, so the hexmap and overview counts could disagree: - RDS: hexmap classified low-storage from the Maximum FreeStorageSpace statistic (and last sample) while the overview used the Minimum statistic over the window. Switched the hexmap to a window-MIN of the Minimum statistic, aligned CPU/connections to window-MAX of Maximum, and matched the 5-minute staleness window. - SQS: hexmap classified stale from the Average AgeOfOldestMessage statistic; switched to Maximum to match the overview. - ECS: hexmap, worst-first table and status-over-time classified from window-max while the overview used the last sample. Switched these to last-of-Maximum and unified the idle/healthy thresholds with the donut. Verified: all dashboard ES|QL queries execute against a live cluster and hexmap status counts now match the donut/KPI counts per package. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The SQS and ECS status hexmap Vega-embedded ESQL queries started with FROM ... but, unlike every other ESQL panel in those dashboards (and the RDS hexmap), did not set `unmapped_fields = "nullify"`. On partially mapped index patterns this can fail at runtime with unmapped-field errors. Prefixed both raw_all queries to match the existing convention; the ts_probe ROW queries reference no fields and are left untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mykola-elastic
left a comment
There was a problem hiding this comment.
LGTM, review comments resolved + manually tested in stack with data
💚 Build Succeeded
History
|
The EC2 and ELB status hexmaps disagreed with their "by status" donut and
KPI panels:
- Both hexmaps lacked the recently-active staleness filter the overview
panels apply (DATE_DIFF("minutes", last_seen, latest_global) <= 5), so
the hexmaps counted entities that had stopped reporting earlier in the
range. Added the same filter to both hexmap raw_all queries.
- EC2: the overview panels classify an instance with no StatusCheckFailed
data as "healthy", while the hexmap classified it as "no data". Aligned
the hexmap to the overview (NULL StatusCheckFailed -> healthy).
aws_lambda_otel was reviewed too and is already consistent (no change).
Verified: hexmap status counts now match the donut/KPI counts per package
against a live cluster (EC2 41=41, ELB 2=2); elastic-package lint passes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Convert the status-hexmap raw_all ESQL from FROM to the TS time-series command across all six AWS OTel packages (rds, sqs, ecs, ec2, elb, lambda), consistent with the dashboards' other time-series panels. Each aggregation is expressed in its *_over_time form (MAX->MAX(MAX_OVER_TIME(...)), LAST(x,@timestamp)->MAX(LAST_OVER_TIME(x)), etc.); the redundant per-aggregation WHERE ... IS NOT NULL guards are dropped (CASE already nullifies non-matching stats). Besides the idiom alignment, TS corrects the per-series "last value" computation: FROM's LAST(CASE(...), @timestamp) could pick the wrong value when an entity has multiple stat series. This notably fixes the SQS hexmap, which previously disagreed with its donut (a stale queue was mis-classified idle); the TS hexmap now matches the donut exactly. Verified against a live cluster: all dashboard ES|QL queries execute (138/138), and hexmap status counts match the donut/KPI counts per package. Only aws_lambda_otel needed a version bump + changelog entry (newly joining the PR); the other five already carry their elastic#19799 entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Lambda status hexmap grouped only BY FunctionName, while its "by status" donut/KPI panels (and every other package's hexmap) group BY FunctionName, cloud.region. With a function reporting from more than one region the donut would count it per-region but the hexmap would collapse it to one hexagon. Added cloud.region to the hexmap grouping so the two stay consistent. Verified against a live cluster: all dashboard queries execute and the hexmap status counts match the donut counts over the same time window.
|
✅ All changelog entries have the correct PR link. |
💚 Build Succeeded
History
|
|
Tick the box to add this pull request to the merge queue (same as
|
|
Package aws_ec2_otel - 0.7.0 containing this change is available at https://epr.elastic.co/package/aws_ec2_otel/0.7.0/ |
|
Package aws_ecs_otel - 0.6.0 containing this change is available at https://epr.elastic.co/package/aws_ecs_otel/0.6.0/ |
|
Package aws_elb_metrics_otel - 0.7.0 containing this change is available at https://epr.elastic.co/package/aws_elb_metrics_otel/0.7.0/ |
|
Package aws_lambda_otel - 0.7.0 containing this change is available at https://epr.elastic.co/package/aws_lambda_otel/0.7.0/ |
|
Package aws_rds_otel - 0.7.0 containing this change is available at https://epr.elastic.co/package/aws_rds_otel/0.7.0/ |
|
Package aws_sqs_otel - 0.7.0 containing this change is available at https://epr.elastic.co/package/aws_sqs_otel/0.7.0/ |
Proposed commit message
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots