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

How do you create span-based metrics?

Full set: 180 questions
Answer options
A: Specify a query and dimensions on the Datadog UI. Correct answer
B: Write custom instrumentation with tracing SDK.
C: Configure the Datadog Agent to collect custom metrics.
Correct Answer:
A. Specify a query and dimensions on the Datadog UI.
Explanation

Span-based metrics are created directly within the Datadog web UI. The process involves using the Trace Explorer to build a query that filters for specific spans of interest. From this query, you can generate a new metric, specifying what to aggregate (e.g., count of spans, duration) and which span tags to use as dimensions for the new metric.

Why Incorrect

B. Writing custom instrumentation is for creating new spans or adding tags, not for generating metrics from existing spans within the Datadog platform.
C. The Datadog Agent collects and forwards traces, but the logic and configuration for generating metrics from those spans reside in the Datadog backend, configured via the UI.

References

1. Datadog Documentation, "Generate Metrics from Spans". This document provides a step-by-step guide, stating: "To create a span-based metric, navigate to APM > Generate Metrics and click New Metric+. Alternatively, find a query in the Trace Explorer that you would like to monitor, and select Export > Generate new metric."

Scroll to Top