mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 13:33:20 +12:00
docs: Render api_short_name
visibly in the Monitoring guide (#500)
This commit is contained in:
parent
6ba7a03f62
commit
e8563a03eb
2 changed files with 11 additions and 9 deletions
|
@ -8,14 +8,16 @@ Ash emits the following telemetry events, suffixed with `:start` and `:stop`. St
|
||||||
|
|
||||||
### Important
|
### 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]`.
|
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]`.
|
||||||
|
|
||||||
|
_Replace `(api_short_name)` with your API short name, from `d:Ash.Api.Info.short_name`._
|
||||||
|
|
||||||
### Events
|
### 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), :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), :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.
|
- `[:ash, (api_short_name), :read]` - The execution of a read action. Use `resource_short_name` and `action` metadata to break down measurements.
|
||||||
- `[:ash, <api_short_name>, :destroy]` - The execution of a destroy action. Use `resource_short_name` and `action` metadata to break down measurements.
|
- `[:ash, (api_short_name), :destroy]` - The execution of a destroy action. Use `resource_short_name` and `action` metadata to break down measurements.
|
||||||
- `[:ash, :changeset]` - A changeset being processed for a given action, i.e with `Ash.Changeset.for_create`. Use `resource_short_name` metadata to break down measurements.
|
- `[:ash, :changeset]` - A changeset being processed for a given action, i.e with `Ash.Changeset.for_create`. Use `resource_short_name` metadata to break down measurements.
|
||||||
- `[:ash, :query]` - A query being processed for an action, with `Ash.Query.for_read`. Use `resource_short_name` metadata to break down measurements.
|
- `[:ash, :query]` - A query being processed for an action, with `Ash.Query.for_read`. Use `resource_short_name` metadata to break down measurements.
|
||||||
- `[:ash, :validation]` - A validation being run on a changeset. Use `resource_short_name` and `validation` metadata to break down measurements.
|
- `[:ash, :validation]` - A validation being run on a changeset. Use `resource_short_name` and `validation` metadata to break down measurements.
|
||||||
|
|
|
@ -119,7 +119,7 @@ defmodule Ash.Api.Info do
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc "The short name for an api"
|
@doc "The short name for an api"
|
||||||
@spec short_name(Ash.Api.t()) :: nil | :infinity | integer()
|
@spec short_name(Ash.Api.t()) :: atom
|
||||||
def short_name(api) do
|
def short_name(api) do
|
||||||
Extension.get_opt(api, [:execution], :short_name, nil) || api.default_short_name()
|
Extension.get_opt(api, [:execution], :short_name, nil) || api.default_short_name()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue