`@Trace` Java annotation needs better docs
walles opened this issue · 3 comments
Documentation Page
Issue Description
Please document what the @Trace
measured
and noParent
options do. What kind of measurements is it that are off by default but can be turned on?
Doc claim that operationName
and resourceName
are the only possible arguments that can be set for the
@Trace
annotation.
But the source code contains measured
and noParent
as well:
/** Set this annotation to a method so the dd-java-agent considers it for tracing. */
@Retention(RUNTIME)
@Target(METHOD)
public @interface Trace {
/** The operation name to set. By default it takes the method's name */
String operationName() default "";
/** The resource name. By default it uses the same value as the operation name */
String resourceName() default "";
/** Set whether to measure a trace. By default traces are not measured. */
boolean measured() default false;
/** Set whether to start a new trace. By default it continues the current trace. */
boolean noParent() default false;
}
@walles - Thanks for the detailed issue! I'll look into getting this updated. 👍
@walles - Thanks again for the feedback. I'm going to update the documentation to include the noParent
argument in the linked PR. As for measured
, that is intentionally undocumented as it must be used carefully, typically with help from our Support team. It allows span metrics to be generated for custom traces.
I want to see in the UI when my span starts and ends.
Do I need measured
for that?