Sha256: cd6fac56598b4587e452c2c748cd6ecb01d35c39f1c47e932e27187f795f06c9
Contents?: true
Size: 1.45 KB
Versions: 11
Compression:
Stored size: 1.45 KB
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. require './app' require 'multiverse_helpers' require File.join(File.dirname(__FILE__), '..', '..', '..', 'agent_helper') require 'transaction_ignoring_test_cases' class TransactionIgnorerController < ApplicationController def run_transaction state = NewRelic::Agent::TransactionState.tl_get NewRelic::Agent.set_transaction_name(params[:txn_name]) NewRelic::Agent.notice_error(params[:error_msg]) if params[:error_msg] NewRelic::Agent.instance.sql_sampler.notice_sql("select * from test", "Database/test/select", nil, 1.5, state) if params[:slow_sql] render :text => 'some stuff' end end class TransactionIgnoringTest < RailsMultiverseTest include MultiverseHelpers include TransactionIgnoringTestCases def trigger_transaction(txn_name) get '/transaction_ignorer/run_transaction', :txn_name => txn_name end def trigger_transaction_with_error(txn_name, error_msg) get '/transaction_ignorer/run_transaction', :txn_name => txn_name, :error_msg => error_msg end def trigger_transaction_with_slow_sql(txn_name) get '/transaction_ignorer/run_transaction', :txn_name => txn_name, :slow_sql => 'true' end end
Version data entries
11 entries across 11 versions & 1 rubygems