View Source PhoenixEvents (Phoenix events v0.4.1)

A GenServer that attaches to various :telemetry events and turns them into "event" spans. Ensures that events are always finalized and (optionally) sent.

Configuration options:

:personaStringrequiredThe event reporting persona should probably be the name of your application
:log_httpbooleanoptionalDefaults to true. Should we track http requests
:http_prefixlistoptionalDefaults to [:phoenix, :endpoint]. The telemetry prefix used by phoenix endpoint for http requests
:log_live_viewbooleanoptionalDefaults to false. Should we track Phoenix.LiveView websocket requests
:live_view_prefixlistoptionalDefaults to [:phoenix, :live_view]. The telemetry prefix used by phoenix_live_view
log_queriesbooleanoptionalDefaults to false. Should SQL queries (made via Ecto) be added to events. Requires setting the :queries_prefix option
:queries_prefixlistoptionalThe telemetry prefix for Ecto - Should probably be something in the vein of [:myapp, :repo]
`:log_obanbooleanoptionalShould we treat Oban Job invocations as events
:log_eventsbooleanoptionalDefaults to true. Should we send the event to Logger.info as it is being send
:send_eventsbooleanoptionalDefaults to false. Should we send events to an Eventcollector instance
:eventcollector_hostStringoptionalThe hostname/ip of the eventcollector instance
:eventcollector_portStringoptionalThe port of the eventcollector instance
:static_pathslist(String)optionalDefaults to ["assets", "image"]. Which http path prefixes should be treated as the static action
:setup_funcfunction(event, {kind, meta})optionalA callback function that will be invoked at the start of the event, that allows you to add any additional data to the event data structure. The default funciton is a noop

Summary

Functions

Returns a specification to start this module under a supervisor.

Tries to find an event associated with the given process, returns nil if none are found It does walk up the process tree to see if any of the parents are associated with an event and returns that event if that is the case

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

custom_event(list, measurements, meta, arg)

View Source
Link to this function

handle_query(_, measurements, meta, arg)

View Source
Link to this function

http_event(name, measurements, meta, arg)

View Source
Link to this function

oban_exception(name, measure, meta, arg)

View Source
Link to this function

oban_start(name, m, meta, arg)

View Source
Link to this function

oban_stop(name, m, _, arg)

View Source
@spec pid_to_event(pid()) :: pid() | nil

Tries to find an event associated with the given process, returns nil if none are found It does walk up the process tree to see if any of the parents are associated with an event and returns that event if that is the case

Link to this function

start_link(settings, opts)

View Source
Link to this function

ws_event(name, measurements, meta, arg4)

View Source