Bird
Raised Fist0

What does the following Elasticsearch aggregation query return when run on APM transaction data?

medium📝 Command Output Q4 of Q15
Elasticsearch - ELK Stack Integration
What does the following Elasticsearch aggregation query return when run on APM transaction data?
GET /apm-*/_search
{
  "size": 0,
  "aggs": {
    "max_duration": {
      "max": { "field": "transaction.duration.us" }
    }
  }
}
AA list of all transaction durations sorted descending
BThe average transaction duration in milliseconds
CThe maximum transaction duration in microseconds across all documents
DThe total count of transactions in the index
Step-by-Step Solution
Solution:
  1. Step 1: Analyze aggregation type

    The query uses a 'max' aggregation on the field 'transaction.duration.us'.
  2. Step 2: Understand field meaning

    'transaction.duration.us' stores transaction durations in microseconds.
  3. Step 3: Interpret output

    The aggregation returns the maximum value of this field across all matching documents.
  4. Final Answer:

    The maximum transaction duration in microseconds across all documents -> Option C
  5. Quick Check:

    Max aggregation returns highest value [OK]
Quick Trick: Max agg returns highest field value [OK]
Common Mistakes:
MISTAKES
  • Confusing max with average aggregation
  • Misinterpreting microseconds as milliseconds
  • Expecting a list instead of a single value

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes