Class: Garage::Tracer::NullTracer

Inherits:
Object
  • Object
show all
Defined in:
lib/garage/tracer.rb

Overview

Any tracers must have ‘.start` to start tracing context and:

- `#inject_trace_context` to add tracing context to the given request header.
- `#record_http_request` to record http request in tracer.
- `#record_http_response` to record http response in tracer.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.start {|new| ... } ⇒ Object

Yields:

  • (new)


21
22
23
# File 'lib/garage/tracer.rb', line 21

def self.start(&block)
  yield new
end

Instance Method Details

#inject_trace_context(header) ⇒ Hash

Parameters:

  • header (Hash)

Returns:

  • (Hash)


27
28
29
# File 'lib/garage/tracer.rb', line 27

def inject_trace_context(header)
  header
end

#record_http_request(method, url, user_agent) ⇒ nil

Parameters:

  • method (String)
  • url (String)
  • user_agent (String)

Returns:

  • (nil)


35
36
# File 'lib/garage/tracer.rb', line 35

def record_http_request(method, url, user_agent)
end

#record_http_response(status, content_length) ⇒ Object

Parameters:

  • status (Integer)
  • content_length (Integer)


40
41
# File 'lib/garage/tracer.rb', line 40

def record_http_response(status, content_length)
end