Package com.azure.core.util.tracing
Class TracerProxy
java.lang.Object
com.azure.core.util.tracing.TracerProxy
Deprecated.
This class provides a means for all client libraries to augment the context information they have received from an
end user with additional distributed tracing information, that may then be passed on to a backend for analysis.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated.For the plugged intracer, its current tracing span is marked as completed.static booleanDeprecated.Returns true if tracing is enabled.static voidsetAttribute(String key, String value, Context context) Deprecated.For the plugged intracer, the key-value pair metadata is added to its current span.static ContextsetSpanName(String spanName, Context context) Deprecated.Sets the span name for eachtracerplugged into the SDK.static ContextDeprecated.A new tracing span with INTERNAL kind is created for eachtracerplugged into the SDK.static Contextstart(String methodName, StartSpanOptions spanOptions, Context context) Deprecated.A new tracing span is created for eachtracerplugged into the SDK.
-
Method Details
-
start
Deprecated.A new tracing span with INTERNAL kind is created for eachtracerplugged into the SDK.The
contextwill be checked for information about a parent span. If a parent span is found, the new span will be added as a child. Otherwise, the parent span will be created and added to thecontextand any downstreamstart()calls will use the created span as the parent.- Parameters:
methodName- Name of the method triggering the span creation.context- Additional metadata that is passed through the call stack.- Returns:
- An updated
Contextobject.
-
start
Deprecated.A new tracing span is created for eachtracerplugged into the SDK.The
contextwill be checked for information about a parent span. If a parent span is found, the new span will be added as a child. Otherwise, the parent span will be created and added to thecontextand any downstreamstart()calls will use the created span as the parent.- Parameters:
methodName- Name of the method triggering the span creation.spanOptions- span creation options.context- Additional metadata that is passed through the call stack.- Returns:
- An updated
Contextobject.
-
setAttribute
Deprecated.For the plugged intracer, the key-value pair metadata is added to its current span. If thecontextdoes not contain a span, then no metadata is added.- Parameters:
key- Name of the metadata.value- Value of the metadata.context- Additional metadata that is passed through the call stack.
-
end
Deprecated.For the plugged intracer, its current tracing span is marked as completed.- Parameters:
responseCode- Response status code if the span is in an HTTP call context.error-Throwablethat happened during the span ornullif no exception occurred.context- Additional metadata that is passed through the call stack.
-
setSpanName
Deprecated.Sets the span name for eachtracerplugged into the SDK.- Parameters:
spanName- Name of the span.context- Additional metadata that is passed through the call stack.- Returns:
- An updated
Contextobject.
-
isTracingEnabled
public static boolean isTracingEnabled()Deprecated.Returns true if tracing is enabled.- Returns:
- true if tracing is enabled.
-
TracerProvider