Skip to content

Commit

Permalink
Merge e959295 into 4f907dc
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng committed Mar 4, 2024
2 parents 4f907dc + e959295 commit a5ce64b
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 51 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ Yanked
- Support for arrays, literal value types and function arguments in sql lexer

## 1.2.2
- Handle out of range numbers in queue lenght and metrics api
- Handle out of range numbers in queue length and metrics api

## 1.2.1
- Use Dir.pwd in CLI install wizard
Expand All @@ -1468,7 +1468,7 @@ Yanked
## 1.1.7
- Make logging resilient for closing FD's (daemons gem does this)
- Add support for using Resque through ActiveJob
- Rescue more expections in json generation
- Rescue more exceptions in json generation

## 1.1.6
- Generic Rack instrumentation middleware
Expand Down Expand Up @@ -1518,7 +1518,7 @@ Yanked
- Improved sql sanitization
- Improved mongoid/mongodb sanitization
- Minor performance improvements
- Better handling for non-utf8 convertable strings
- Better handling for non-utf8 convertible strings
- Make gem installable (but not functional) on JRuby

## 1.0.4
Expand Down Expand Up @@ -1699,7 +1699,7 @@ Yanked
Yanked

## 0.8.8
- Explicitely require securerandom
- Explicitly require securerandom

## 0.8.7
- Dup process action event to avoid threading issue
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ namespace :build do
Gem::PackageTask.new(base_gemspec, &block)
rescue StandardError => e
puts "Warning: An error occurred defining `build:#{task_name}:gem` Rake task."
puts "This task will not be availble."
puts "This task will not be available."
if ENV["DEBUG"]
puts "#{e}: #{e.message}"
puts e.backtrace
Expand Down
2 changes: 1 addition & 1 deletion lib/appsignal/auth_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def perform
# @return [Array<String/nil, String>] response tuple.
# - First value is the response status code.
# - Second value is a description of the response and the exception error
# message if an exception occured.
# message if an exception occurred.
def perform_with_result
status = perform
result =
Expand Down
2 changes: 1 addition & 1 deletion lib/appsignal/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ def load_from_disk
"'APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR=1' in your system " \
"environment."
end
message = "An error occured while loading the AppSignal config file. " \
message = "An error occurred while loading the AppSignal config file. " \
"#{extra_message}\n" \
"File: #{config_file.inspect}\n" \
"#{e.class.name}: #{e}"
Expand Down
2 changes: 1 addition & 1 deletion lib/appsignal/event_formatter/sequel/sql_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Appsignal
class EventFormatter
# @api private
module Sequel
# Compatability with the sequel-rails gem.
# Compatibility with the sequel-rails gem.
# The sequel-rails gem adds its own ActiveSupport::Notifications events
# that conflict with our own sequel instrumentor. Without this event
# formatter the sequel-rails events are recorded without the SQL query
Expand Down
10 changes: 5 additions & 5 deletions lib/appsignal/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def add(severity, message = nil, group = nil)
alias log add

# Log a debug level message
# @param message Mesage to log
# @param message Message to log
# @param attributes Attributes to tag the log with
# @return [void]
def debug(message = nil, attributes = {})
Expand All @@ -77,7 +77,7 @@ def debug(message = nil, attributes = {})
end

# Log an info level message
# @param message Mesage to log
# @param message Message to log
# @param attributes Attributes to tag the log with
# @return [void]
def info(message = nil, attributes = {})
Expand All @@ -90,7 +90,7 @@ def info(message = nil, attributes = {})
end

# Log a warn level message
# @param message Mesage to log
# @param message Message to log
# @param attributes Attributes to tag the log with
# @return [void]
def warn(message = nil, attributes = {})
Expand All @@ -103,7 +103,7 @@ def warn(message = nil, attributes = {})
end

# Log an error level message
# @param message Mesage to log
# @param message Message to log
# @param attributes Attributes to tag the log with
# @return [void]
def error(message = nil, attributes = {})
Expand All @@ -116,7 +116,7 @@ def error(message = nil, attributes = {})
end

# Log a fatal level message
# @param message Mesage to log
# @param message Message to log
# @param attributes Attributes to tag the log with
# @return [void]
def fatal(message = nil, attributes = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/appsignal/rack/body_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def call(stream)
# "Middleware may call to_ary directly on the Body and return a new Body in its place"
# One could "fold" both the to_ary API and the each() API into one Body object, but
# to_ary must also call "close" after it executes - and in the Rails implementation
# this pecularity was not handled properly.
# this peculiarity was not handled properly.
#
# @api private
class ArrayableBodyWrapper < EnumerableBodyWrapper
Expand Down
2 changes: 1 addition & 1 deletion lib/puma/plugin/appsignal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def start(launcher)

loop do
# Implement similar behavior to minutely probes.
# Initial sleep to wait until the app is fully initalized.
# Initial sleep to wait until the app is fully initialized.
# Then loop every 60 seconds and collect the Puma stats as AppSignal
# metrics.
sleep sleep_time
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/appsignal/capistrano2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def stub_marker_request(data = {})
run
end

it "transmits the overriden revision" do
it "transmits the overridden revision" do
expect(output).to include \
"Notifying AppSignal of deploy with: revision: abc123, user: batman",
"AppSignal has been notified of this deploy!"
Expand All @@ -174,7 +174,7 @@ def stub_marker_request(data = {})
run
end

it "transmits the overriden deploy user" do
it "transmits the overridden deploy user" do
expect(output).to include \
"Notifying AppSignal of deploy with: revision: 503ce0923ed177a3ce000005," \
" user: robin",
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/appsignal/capistrano3_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def run
run
end

it "transmits the overriden revision" do
it "transmits the overridden revision" do
expect(output).to include \
"Notifying AppSignal of deploy with: revision: abc123, user: batman",
"AppSignal has been notified of this deploy!"
Expand All @@ -186,7 +186,7 @@ def run
run
end

it "transmits the overriden deploy user" do
it "transmits the overridden deploy user" do
expect(output).to include \
"Notifying AppSignal of deploy with: revision: 503ce0923ed177a3ce000005, " \
"user: robin",
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/appsignal/cli/diagnose_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def dont_accept_prompt_to_send_diagnostics_report
end
end

context "when the extention returns invalid JSON" do
context "when the extension returns invalid JSON" do
before do
expect(Appsignal::Extension).to receive(:diagnose).and_return("invalid agent\njson")
run
Expand Down
8 changes: 4 additions & 4 deletions spec/lib/appsignal/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
end
end

context "with an overriden config file" do
context "with an overridden config file" do
let(:config) do
project_fixture_config("production", {}, Appsignal.internal_logger,
File.join(project_fixture_path, "config", "appsignal.yml"))
Expand All @@ -274,7 +274,7 @@
expect(config.active?).to be_truthy
end

context "with an invalid overriden config file" do
context "with an invalid overridden config file" do
let(:config) do
project_fixture_config("production", {}, Appsignal.internal_logger,
File.join(project_fixture_path, "config", "missing.yml"))
Expand All @@ -299,7 +299,7 @@
stdout = std_stream
stderr = std_stream
log = capture_logs { capture_std_streams(stdout, stderr) { config } }
message = "An error occured while loading the AppSignal config file. " \
message = "An error occurred while loading the AppSignal config file. " \
"Skipping file config. " \
"In future versions AppSignal will not start on a config file " \
"error. To opt-in to this new behavior set " \
Expand All @@ -325,7 +325,7 @@
ENV["APPSIGNAL_PUSH_API_KEY"] = "something valid"
ENV["APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR"] = "1"
log = capture_logs { capture_std_streams(stdout, stderr) { config } }
message = "An error occured while loading the AppSignal config file. " \
message = "An error occurred while loading the AppSignal config file. " \
"Not starting AppSignal because APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR is set.\n" \
"File: #{File.join(config_path, "config", "appsignal.yml").inspect}\n" \
"KeyError: key not found"
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/appsignal/environment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def report(key, &value_block)
end
end

context "when something unforseen errors" do
context "when something unforeseen errors" do
it "does not re-raise the error and writes it to the log" do
klass = Class.new do
def inspect
Expand Down Expand Up @@ -127,7 +127,7 @@ def inspect
expect(rake_spec.version.to_s).to_not be_empty
end

context "when something unforseen errors" do
context "when something unforeseen errors" do
it "does not re-raise the error and writes it to the log" do
expect(Bundler).to receive(:rubygems).and_raise(RuntimeError, "bundler error")

Expand All @@ -148,7 +148,7 @@ def inspect
expect_environment_metadata("ruby_a_test_enabled", "true")
end

context "when something unforseen errors" do
context "when something unforeseen errors" do
it "does not re-raise the error and writes it to the log" do
klass = Class.new do
def to_s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
formatter.format(strategy, command)
end

context "when strategy is unkown" do
context "when strategy is unknown" do
let(:strategy) { :bananas }

it "should return an empty hash" do
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/appsignal/hooks/resque_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def perform(job_data)
end
after { Object.send(:remove_const, :ActiveJobMock) }

it "does not set arguments but lets the ActiveJob intergration handle it" do
it "does not set arguments but lets the ActiveJob integration handle it" do
perform_job(
ResqueTestJob,
"class" => "ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper",
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/appsignal/hooks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def install
Appsignal::Hooks.hooks.delete(:mock_present_hook)
end

it "should not install if depencies are not present" do
it "should not install if dependencies are not present" do
Appsignal::Hooks::Hook.register(:mock_not_present_hook, MockNotPresentHook)

expect(Appsignal::Hooks.hooks[:mock_not_present_hook]).to be_instance_of(MockNotPresentHook)
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/appsignal/integrations/sidekiq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
end
around { |example| keep_transactions { example.run } }

context "without a current transction" do
context "without a current transaction" do
let(:exception) do
raise ExampleStandardError, "uh oh"
rescue => error
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/appsignal/transaction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def current_transaction
context "with overridden options" do
let(:options) { { :params_method => :filtered_params } }

it "sets the overriden :params_method" do
it "sets the overridden :params_method" do
expect(subject[:params_method]).to eq :filtered_params
end
end
Expand Down Expand Up @@ -751,7 +751,7 @@ def to_s
e
end

it "should also respond to add_exception for backwords compatibility" do
it "should also respond to add_exception for backwards compatibility" do
expect(transaction).to respond_to(:add_exception)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/appsignal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@
end

describe ".listen_for_error" do
it "does not record anyhing" do
it "does not record anything" do
error = RuntimeError.new("specific error")
expect do
Appsignal.listen_for_error do
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/puma/appsignal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def expect_gauge(metric_name, metric_value, tags_hash = {})
}
end

it "collects puma stats as guage metrics with the (summed) worker metrics" do
it "collects puma stats as gauge metrics with the (summed) worker metrics" do
run_plugin(stats_data, appsignal_plugin) do
expect(logs).to_not include([:error, kind_of(String)])
expect_gauge(:workers, 2, "type" => "count")
Expand Down
16 changes: 0 additions & 16 deletions spec/support/helpers/environment_metdata_helper.rb

This file was deleted.

0 comments on commit a5ce64b

Please sign in to comment.