Skip to content

Commit

Permalink
fix: use proper telemetry name for actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Dec 12, 2024
1 parent f06b62d commit eb1f52f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions documentation/topics/advanced/monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Note the mention of `:start` and `:stop` suffixes. The event below `[:ash, (doma
- `[:ash, (domain_short_name), :update]` - The execution of a update action. Use `resource_short_name` and `action` metadata to break down measurements.
- `[:ash, (domain_short_name), :read]` - The execution of a read action. Use `resource_short_name` and `action` metadata to break down measurements.
- `[:ash, (domain_short_name), :destroy]` - The execution of a destroy action. Use `resource_short_name` and `action` metadata to break down measurements.
- `[:ash, (domain_short_name), :action]` - The execution of a generic 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, :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.
Expand Down
2 changes: 1 addition & 1 deletion lib/ash/actions/action.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule Ash.Actions.Action do

Ash.Tracer.set_metadata(opts[:tracer], :action, metadata)

Ash.Tracer.telemetry_span [:ash, Ash.Domain.Info.short_name(domain), :create],
Ash.Tracer.telemetry_span [:ash, Ash.Domain.Info.short_name(domain), :action],
metadata do
if input.action.transaction? do
resources =
Expand Down

0 comments on commit eb1f52f

Please sign in to comment.