module ElasticAPM
def self.span(name, type = nil, context: nil, include_stacktrace: true,
-
(Span)- Unless block given
Other tags:
- Yield: - Optional block encapsulating span
Parameters:
-
context(Span::Context) -- Context information about the span -
type(String) -- The kind of span, eq `db.mysql2.query` -
name(String) -- A description of the span, eq `SELECT FROM "users"`
def self.span(name, type = nil, context: nil, include_stacktrace: true, &block) return (block_given? ? yield : nil) unless agent agent.span( name, type, context: context, backtrace: include_stacktrace ? caller : nil, &block ) end