opencensus_ecto v0.1.0 OpencensusEcto View Source
Telemetry handler for creating OpenCensus spans from Ecto query events.
Link to this section Summary
Functions
Attaches the OpencensusEcto handler to your repo events. This should be called from your application behaviour on startup.
Link to this section Functions
Attaches the OpencensusEcto handler to your repo events. This should be called from your application behaviour on startup.
Example:
OpencensusEcto.setup([:blog, :repo, :query])
You may also supply the following options in the second argument:
:time_unit
- a time unit used to convert the values of query phase timings, defaults to:microsecond
. SeeSystem.convert_time_unit/3
:span_prefix
- the first part of the span name, as aString.t
, defaults to the concatenation of the event name with periods, e.g."blog.repo.query"
. This will always be followed with a colon and the source (the table name for SQL adapters).