Skip to content

Commit dcaafb7

Browse files
committed
Correct documentation of config options order
1 parent 885c143 commit dcaafb7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/configuration.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ secret_token: <%= ENV["VERY_SECRET_TOKEN"] %>
2121

2222
Options are applied in the following order (last one wins):
2323

24+
1. Arguments to `ElasticAPM::<framework>.start`
2425
1. Defaults
25-
2. Arguments to `ElasticAPM.start` / `ElasticAPM::Grape.start` / `ElasticAPM::Rails.start` / `Config.new`
26+
2. Arguments to `ElasticAPM.start` / `Config.new`
2627
3. Config file eg. `config/elastic_apm.yml`
2728
4. Environment variables
2829

lib/elastic_apm/grape.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module Grape
1313
# @param app [Grape::API] A Grape app.
1414
# @param config [Config, Hash] An instance of Config or a Hash config.
1515
# @return [true, nil] true if the agent was started, nil otherwise.
16-
def start(app, config)
16+
def start(app, config = {})
1717
config = Config.new(config) unless config.is_a?(Config)
1818
configure_app(app, config)
1919

0 commit comments

Comments
 (0)