class

Tracing::FlameLayer

Inherits Tracing::Layer < Reference < Object

A Layer that generates flamegraph data from span timings.

Records span enter/exit events with microsecond precision and writes folded stack format output consumable by inferno.

Ported from upstream tracing_flame::FlameLayer.

Constructors

new(io : IO)
Source

Class methods

with_file(path : String) : Tuple(FlameLayer, FlameGuard)
Source

Instance methods

close
Source
on_enter(id : Core::Span::Id, ctx : LayerContext) : Nil

Called when a span is entered.

Source
on_exit(id : Core::Span::Id, ctx : LayerContext) : Nil

Called when a span is exited.

Source
on_new_span(attrs : Core::Span::Attributes, id : Core::Span::Id, ctx : LayerContext) : Nil

Called when a new span is created.

Source

Nested types