ExAzureCore. Telemetry
(ex_azure_core v0.2.0)
Copy Markdown
Telemetry events for ExAzureCore operations.
Events
ExAzureCore emits the following telemetry events:
[:ex_azure_core, :request, :start]
Emitted when a request starts.
Measurements:
:system_time- System time at start (fromSystem.system_time())
Metadata:
:service- Service atom (e.g.,:storage,:keyvault):method- HTTP method:path- Request path
[:ex_azure_core, :request, :stop]
Emitted when a request completes (success or error).
Measurements:
:duration- Request duration in native time units
Metadata:
:service- Service atom:method- HTTP method:path- Request path:result-:okor:error
[:ex_azure_core, :request, :exception]
Emitted when a request raises an exception.
Measurements:
:duration- Time until exception in native time units
Metadata:
:service- Service atom:kind- Exception kind (:error,:exit,:throw):reason- Exception reason:stacktrace- Exception stacktrace
Usage
Attach handlers in your application startup:
:telemetry.attach_many(
"my-app-azure-handler",
[
[:ex_azure_core, :request, :start],
[:ex_azure_core, :request, :stop],
[:ex_azure_core, :request, :exception]
],
&MyApp.AzureTelemetry.handle_event/4,
nil
)
Summary
Functions
Emits an exception event.
Emits a start event.
Emits a stop event.
Executes a function with telemetry span events.
Functions
Emits an exception event.
@spec emit_start(map()) :: :ok
Emits a start event.
Emits a stop event.
Executes a function with telemetry span events.
Emits :start before execution, :stop after successful completion,
and :exception if the function raises.
Parameters
operation- The operation being executed (for metadata)config- The resolved configurationfun- The function to execute (should return{:ok, _}or{:error, _})