mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
fix: fix typespec for Api.Info.trace_name/3
docs: add context to monitoring guide
This commit is contained in:
parent
59ddb5f5af
commit
3e5b0a8096
2 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,12 @@ Instrumentation Ash has two primary components, {{link:ash:module:Ash.Tracer}} a
|
|||
|
||||
Ash emits the following telemetry events, suffixed with `:start` and `:stop`. Start events have `system_time` measurements, and stop events have `system_time` and `duration` measurements. All times will be in the native time unit.
|
||||
|
||||
### Important
|
||||
|
||||
Note the mention of `:start` and `:stop` suffixes. The event below `[:ash, <api_short_name>, :create]`, is actually referring to two events, `[:ash, <api_short_name>, :create, :start]` and `[:ash, <api_short_name>, :create, :stop]`.
|
||||
|
||||
### Events
|
||||
|
||||
- `[:ash, <api_short_name>, :create]` - The execution of a create action. Use `resource_short_name` and `action` metadata to break down measurements.
|
||||
- `[:ash, <api_short_name>, :update]` - The execution of a update action. Use `resource_short_name` and `action` metadata to break down measurements.
|
||||
- `[:ash, <api_short_name>, :read]` - The execution of a read action. Use `resource_short_name` and `action` metadata to break down measurements.
|
||||
|
|
|
@ -71,7 +71,7 @@ defmodule Ash.Api.Info do
|
|||
end
|
||||
|
||||
@doc "The span_name for an api and resource combination"
|
||||
@spec span_name(Ash.Api.t(), Ash.Resource.t(), action :: atom) :: String.t()
|
||||
@spec span_name(Ash.Api.t(), Ash.Resource.t(), action :: atom | binary()) :: String.t()
|
||||
def span_name(api, resource, action) do
|
||||
"#{trace_name(api)}:#{Ash.Resource.Info.trace_name(resource)}.#{action}"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue