class Pantomath::Instrumentation::Grape::Tracer

Private Instance Methods

span_name() click to toggle source
# File lib/pantomath/instrumentation/grape/tracer.rb, line 22
def span_name
  "#{context.request.env['REQUEST_METHOD']} #{context.request.path}"
end
tags() click to toggle source
# File lib/pantomath/instrumentation/grape/tracer.rb, line 10
def tags
  {
    "span.kind" => "web",
    "span.tracer" => "Pantomath::Tracer::Grape",
    "http.request.method" => context.route.route_method,
    "http.request.url" => context.request.url,
    "http.request.path" => context.request.path,
    "grape.route.version" => context.route.route_version,
    "grape.route.path" => context.route.route_path
  }
end
tracer_context() click to toggle source
# File lib/pantomath/instrumentation/grape/tracer.rb, line 26
def tracer_context
  Pantomath.extract(OpenTracing::FORMAT_RACK, context.request.env)
end