Class: Minato::Trace::Middleware::DistributedTraceContext

Inherits:
Object
  • Object
show all
Defined in:
lib/minato/trace/middleware/distributed_trace_context.rb

Constant Summary collapse

TRACE_HEADER_KEY =
"X-Cloud-Trace-Context"

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ DistributedTraceContext

Returns a new instance of DistributedTraceContext.



9
10
11
# File 'lib/minato/trace/middleware/distributed_trace_context.rb', line 9

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
16
17
# File 'lib/minato/trace/middleware/distributed_trace_context.rb', line 13

def call(env)
  add_trace_context_header(env)

  @app.call(env)
end