Class: Maze::Servlets::TraceServlet

Inherits:
Servlet
  • Object
show all
Defined in:
lib/maze/servlets/trace_servlet.rb

Instance Method Summary collapse

Methods inherited from Servlet

#do_GET, #do_OPTIONS, #do_POST, #initialize, #post_status_code

Methods inherited from BaseServlet

#do_OPTIONS

Constructor Details

This class inherits a constructor from Maze::Servlets::Servlet

Instance Method Details

#set_response_header(header) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/maze/servlets/trace_servlet.rb', line 6

def set_response_header(header)
  super

  value = Maze::Server.sampling_probability
  header['Bugsnag-Sampling-Probability'] = value unless value == 'null'

  header['Access-Control-Expose-Headers'] = 'Bugsnag-Sampling-Probability'
end