Datadog-APM-and-Distributed-Tracing-Fundamentals practice question 25 of 25

You are the owner of the Payment API service. The frontend team gave the feedback that the Payment API takes 5 seconds to

Full set: 180 questions
Answer options
A: reply for some of their calls. How do you query for this on the trace explorer?
B: service:payment-api @duration:>=5s Correct answer
C: service:payment-api @duration:5s
D: service:payment-api @duration:high
E: service:payment-api @duration:p95
Correct Answer:
B. service:payment-api @duration:>=5s
Explanation

The Datadog trace search syntax allows for filtering on attributes using key-value pairs. To find traces for a specific service, you use service:. To filter by duration, you use the measured attribute @duration with numerical operators. The query @duration:>=5s correctly filters for all traces where the duration is greater than or equal to 5 seconds, matching the requirement to find calls that take "5 seconds to reply".

Why Incorrect

A. @duration:5s is too specific; it would only find traces that took exactly 5 seconds, not those that took longer, which is implied by the user's feedback.
C. @duration:high is not a valid search syntax. Durations must be queried with numerical values and operators, not qualitative terms.
D. @duration:p95 is invalid syntax. p95 is a statistical aggregation and cannot be used as a search value for an individual trace's duration.

References

1. Datadog Documentation, "Search and Filter". This page details the search syntax for traces. It explicitly states that for measures like duration, you can use comparison operators such as >, =, and Traces > Search and Filter)

2. Datadog Documentation, "Trace Search Syntax". Provides a comprehensive guide to constructing search queries, including examples for filtering on tags (like service) and measures (like @duration). (Datadog APM > Traces > Search and Filter > Search Syntax)

Scroll to Top