[go: up one dir, main page]

function

Attribute Macro function 

Source
#[function]
Expand description

Attribute client public APIs to enable distributed tracing.

To declare a public API function that will be traced, you should use the #[tracing::function] attribute exported from azure_core.

This macro will automatically instrument the public API function with tracing information. It will also ensure that the function is executed with the necessary tracing context.

The function attribute takes one required argument, which is a string representing the name of the operation being traced. This name will be used in the tracing spans to identify the operation being performed. The name should be unique and match the typespec name for the operation being traced if possible.