Runs a function with custom profiling labels attached to all wall profiler
samples taken during its execution. Labels are key-value pairs that appear
in the pprof output and can be used to filter flame graphs in the Datadog UI.
Requires AsyncContextFrame (ACF) to be enabled. Supports nesting: inner
calls merge labels with outer calls, with inner values taking precedence.
When profiling is not enabled or ACF is not active, the function is still
called but labels are silently dropped.
Declares the set of custom label keys that will be used with
runWithLabels. This is used for profile upload metadata
(so the Datadog UI knows which keys to index for filtering) and
for pprof serialization optimization.
Runs a function with custom profiling labels attached to all wall profiler samples taken during its execution. Labels are key-value pairs that appear in the pprof output and can be used to filter flame graphs in the Datadog UI.
Requires AsyncContextFrame (ACF) to be enabled. Supports nesting: inner calls merge labels with outer calls, with inner values taking precedence.
When profiling is not enabled or ACF is not active, the function is still called but labels are silently dropped.