-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
Description
require 'elastic_apm'
require 'pry'
require 'pry-nav'
app = lambda do |env|
[200, {'Content-Type' => 'text/plain'}, ['ok']]
end
# Wraps all requests in transactions and reports exceptions
use ElasticAPM::Middleware
# Start an instance of the Agent
ElasticAPM.start(service_name: 'NothingButRack')
ElasticAPM.with_transaction do |tra|
p tra.trace_id
end
run app
# Gracefully stop the agent when process exits.
# Makes sure any pending transactions are sent.
at_exit { ElasticAPM.stop }
ElasticAPM.running? returns true. But for some reason current_transaction always returns nil even if I call start_transaction explicitly.