Package datadog.trace.api.profiling
Interface Profiling
- All Known Implementing Classes:
Profiling.NoOp
public interface Profiling
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault ProfilingContextAttributecreateContextAttribute(String attribute) Creates a decorator for the attribute, which can be used to set and clear contexts slightly more efficiently than with string attributes.static Profilingget()default ProfilingScopenewScope()Stateful API which restores the previous context when closed.
-
Method Details
-
get
-
newScope
Stateful API which restores the previous context when closed. This requires more memory so has higher overhead than the stateless API.- Returns:
- a profiling scope which can be closed to restore the current state.
-
createContextAttribute
Creates a decorator for the attribute, which can be used to set and clear contexts slightly more efficiently than with string attributes.- Parameters:
attribute- the name of the attribute- Returns:
- a setter which can be used to set and clear profiling context
-