The APM server runs on localhost:8200 which is the default port the auto instrumentation is configured. In my case I tested with Ruby instrumentation out of the box and it works without any additional configurations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You must require this file in application.rb, above the Application | |
# definition, for this to work. For example: | |
# | |
# # Syslog-like Rails logs | |
# if Rails.env.production? | |
# require File.expand_path('../../lib/better_logger', __FILE__) | |
# end | |
# | |
# module MyApp | |
# class Application < Rails::Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module B | |
def speak | |
'B' | |
end | |
end | |
module C | |
def speak | |
'C' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Search | |
class NotUrlHelperPresent < Exception; end | |
attr_writer :url_helper | |
def url(params) | |
raise NotUrlHelperPresent unless @url_helper | |
@url_helper.call(params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BACKTRACE=true ruby -Itest test/backend/active_resource/locale_test.rb | |
Loaded suite test/backend/active_resource/locale_test | |
Started | |
EEE | |
Finished in 0.163526 seconds. | |
1) Error: | |
test: find the primary locale should return primary locale. (I18n::Backend::ActiveResource::LocaleTest): | |
Errno::ECONNREFUSED: Connection refused - connect(2) | |
/home/evgenidzhelyov/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/net/http.rb:560:in `initialize' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'test_helper' | |
class AnalyticsTaggingTest < ActionDispatch::IntegrationTest | |
include Capybara::DSL | |
context "The header of the page" do | |
should "include tracking meta tag" do | |
visit('/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe '#greets_maks_for_his_birthday' do | |
context 'on his birthday' do | |
it 'greets him on facebook' do | |
maks_birthday = Date.new(2011, 11, 22) | |
Date.stub(:now).and_return(maks_birthday) | |
greets_maks_for_his_birthday.should post_to_facebook('Хей, ЧРД, мен') | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "thread" | |
$mutex = Mutex.new | |
$total = 0 | |
def incr | |
$mutex.synchronize { $total += 1 } | |
sleep | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** LOCAL GEMS *** | |
abstract (1.0.0) | |
actionmailer (3.0.10) | |
actionpack (3.0.10) | |
activemodel (3.0.10) | |
activerecord (3.0.10) | |
activeresource (3.0.10) | |
activesupport (3.0.10) | |
arel (2.0.10) |
NewerOlder