scout_apm v0.4.4 ScoutApm.TrackedRequest

Stores information about a single request, as the request is happening. Attempts to do minimal processing. Its job is only to collect up information. Once the request is finished, the last layer will be stopped - and we can send this whole data structure off to be processed.

A quick visual of how this looks:

START Controller (this is scope.) TRACK Ecto

START View

TRACK Ecto

START Partial View
STOP Partial View

STOP View STOP Controller

Link to this section Summary

Link to this section Functions

Link to this function change_collector_fn(f)
Link to this function change_collector_fn(tr, f)
Link to this function mark_error(request)
Link to this function new(custom_collector \\ nil)
Link to this function record_context(context)
Link to this function record_context(tr, context)
Link to this function start_layer(type, name, opts \\ [])
Link to this function start_layer(tr, type, name, opts)
Link to this function stop_layer(callback)
Link to this function stop_layer(tracked_request, callback)
Link to this function track_layer(type, name, duration, fields, callback \\ fn x -> x end)
Link to this function track_layer(tr, type, name, duration, fields, callback)
Link to this function update_current_layer(fun)
Link to this function update_current_layer(tr, fun)

Not intended for public use. Applies a function that takes an Layer, and returns a Layer to the currently tracked layer. Building block for things like: “update_desc”