View Source PhoenixEvents (Phoenix events v0.3.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:
:persona | String | required | The event reporting persona should probably be the name of your application |
:log_http | boolean | optional | Defaults to true. Should we track http requests |
:http_prefix | list | optional | Defaults to [:phoenix, :endpoint] . The telemetry prefix used by phoenix endpoint for http requests |
:log_live_view | boolean | optional | Defaults to false. Should we track Phoenix.LiveView websocket requests |
:live_view_prefix | list | optional | Defaults to [:phoenix, :live_view] . The telemetry prefix used by phoenix_live_view |
log_queries | boolean | optional | Defaults to false. Should SQL queries (made via Ecto) be added to events. Requires setting the :queries_prefix option |
:queries_prefix | list | optional | The telemetry prefix for Ecto - Should probably be something in the vein of [:myapp, :repo] |
`:log_oban | boolean | optional | Should we treat Oban Job invocations as events |
:log_events | boolean | optional | Defaults to true. Should we send the event to Logger.info as it is being send |
:send_events | boolean | optional | Defaults to false. Should we send events to an Eventcollector instance |
:eventcollector_host | String | optional | The hostname/ip of the eventcollector instance |
:eventcollector_port | String | optional | The port of the eventcollector instance |
:static_paths | list(String) | optional | Defaults to ["assets", "image"] . Which http path prefixes should be treated as the static action |
:setup_func | function(event, {kind, meta}) | optional | A 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
.
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