scout_apm v0.2.10 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

Summary

Functions

change_collector_fn(f)
change_collector_fn(tr, f)
new(custom_collector \\ nil)
record_context(context)
record_context(tr, context)
start_layer(type, name \\ nil)
start_layer(tr, type, name)
stop_layer()
stop_layer(callback)
stop_layer(tr, callback)
track_layer(type, name, duration, fields, callback \\ fn x -> x end)
track_layer(tr, type, name, duration, fields, callback)
update_current_layer(fun)
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”