Datadog-APM-and-Distributed-Tracing-Fundamentals practice question 10 of 25
Which of the following is a feature for adding spans when using the Java tracer?
Full set: 180 questionsThe Datadog Java tracer provides multiple ways to create new spans for custom instrumentation. Developers can use the @Trace annotation directly in their code to mark specific methods for tracing. Alternatively, they can configure the tracer to trace specific methods without code changes by using the dd.trace.methods system property or the DDTRACEMETHODS environment variable. Since both methods are valid and supported features, the correct choice encompasses both.
A. This is only partially correct. While tracing methods via configuration is a feature, it omits the equally valid annotation-based approach.
B. This is also only partially correct. Using trace annotations is a key feature, but it ignores the method of instrumenting via configuration.
D. This is incorrect because the Datadog Java tracer explicitly supports both trace annotations and method tracing through configuration for custom instrumentation.
1. Datadog Documentation, "Java Custom Instrumentation". Section: "Trace a method using annotations". This section details the use of the @Trace annotation.
2. Datadog Documentation, "Java Custom Instrumentation". Section: "Trace a method using configuration". This section explains how to use the dd.trace.methods property to instrument methods without code changes.
3. Datadog Documentation, "Configuration". Section: "Java". This page lists DDTRACEMETHODS as an environment variable for "A list of methods that should be traced."
Keep practicing
Take the free Datadog-APM-and-Distributed-Tracing-Fundamentals practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other Datadog-APM-and-Distributed-Tracing-Fundamentals practice questions
- Question 1Which statement is true for trace metrics?
- Question 2Your web service has some 500 Internal Server Error showing up on the trace explorer page…
- Question 3What does the following code snippet do for RUM React Native Monitoring? config.firstPart…
- Question 4Your food ordering portal had an incident last week. You would like to offer a discount t…
- Question 5Which of the following actions require creating facets first?
- Question 6How long are traces retained?
