-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add dynamic badge to configuration options #760
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,27 +8,46 @@ endif::[] | |
== Configuration | ||
|
||
There are several ways to configure how Elastic APM behaves. | ||
|
||
The recommended way to configure Elastic APM is to create a file | ||
`config/elastic_apm.yml` and specify options in there: | ||
The recommended way is to specify options in a `config/elastic_apm.yml` file: | ||
|
||
[source,yaml] | ||
---- | ||
server_url: 'http://localhost:8200' | ||
secret_token: <%= ENV["VERY_SECRET_TOKEN"] %> | ||
---- | ||
|
||
Some options can be set with `ENV` variables. | ||
When using this method, strings are split by comma, e.g., | ||
`ELASTIC_APM_SANITIZE_FIELD_NAMES="a,b" # => [/a/, /b/]`. | ||
|
||
[float] | ||
[[configuration-precedence]] | ||
=== Configuration precedence | ||
|
||
Options are applied in the following order (last one wins): | ||
|
||
1. Defaults | ||
2. Arguments to `ElasticAPM.start` / `Config.new` | ||
3. Config file eg. `config/elastic_apm.yml` | ||
3. Config file, e.g., `config/elastic_apm.yml` | ||
4. Environment variables | ||
5. {apm-app-ref}/agent-configuration.html[Central configuration] | ||
(supported options are marked with <<dynamic-configuration, image:./images/dynamic-config.svg[] >>) | ||
|
||
[float] | ||
[[dynamic-configuration]] | ||
=== Dynamic configuration | ||
|
||
Configuration options marked with the image:./images/dynamic-config.svg[] badge can be changed at runtime | ||
when set from a supported source. | ||
|
||
The Agent supports {apm-app-ref}/agent-configuration.html[Central configuration], | ||
which allows you to fine-tune certain configurations via the APM app. | ||
This feature is enabled in the Agent by default, with <<config-central-config>>. | ||
|
||
[float] | ||
=== Ruby on Rails | ||
|
||
When using Rails it's also possible to specify options inside | ||
When using Rails, it's possible to specify options inside | ||
`config/application.rb`: | ||
|
||
[source,ruby] | ||
|
@@ -40,7 +59,7 @@ config.elastic_apm.service_name = 'MyApp' | |
[float] | ||
=== Sinatra and Rack | ||
|
||
When using APM with Sinatra and Rack you can configure it when starting | ||
When using Sinatra and Rack, you can configure when starting | ||
the agent: | ||
|
||
[source,ruby] | ||
|
@@ -52,7 +71,7 @@ ElasticAPM.start( | |
) | ||
---- | ||
|
||
Alternatively, you can use the `ElasticAPM::Sinatra.start` API. | ||
Alternatively, you can use the `ElasticAPM::Sinatra.start` API: | ||
|
||
[source,ruby] | ||
---- | ||
|
@@ -68,7 +87,7 @@ See <<getting-started-rack>>. | |
[float] | ||
=== Grape and Rack | ||
|
||
When using APM with Grape and Rack (without Rails), you can configure it when starting | ||
When using Grape and Rack (without Rails), you can configure when starting | ||
the agent: | ||
|
||
[source,ruby] | ||
|
@@ -85,12 +104,6 @@ See <<getting-started-rack>>. | |
[float] | ||
=== Options | ||
|
||
Some options can be set with `ENV` variables and all of them may be set in | ||
your source code. | ||
|
||
When setting values for lists using `ENV` variables, strings are split by comma | ||
eg `ELASTIC_APM_SANITIZE_FIELD_NAMES="a,b" # => [/a/, /b/]`. | ||
|
||
[float] | ||
[[config-config-file]] | ||
==== `config_file` | ||
|
@@ -192,6 +205,9 @@ went wrong. | |
[float] | ||
[[config-api-request-size]] | ||
==== `api_request_size` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These badges are also links to the <> section |
||
|
||
|============ | ||
| Environment | `Config` key | Default | ||
| `ELASTIC_APM_API_REQUEST_SIZE` | `api_request_size` | `"750kb"` | ||
|
@@ -205,6 +221,9 @@ It has to be provided in *<<config-format-size, size format>>*. | |
[float] | ||
[[config-api-request-time]] | ||
==== `api_request_time` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
|
||
|============ | ||
| Environment | `Config` key | Default | ||
| `ELASTIC_APM_API_REQUEST_TIME` | `api_request_time` | `"10s"` | ||
|
@@ -233,6 +252,9 @@ NOTE: This feature requires APM Server and Kibana >= 7.3. | |
[float] | ||
[[config-capture-body]] | ||
==== `capture_body` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
|
||
|============ | ||
| Environment | `Config` key | Default | Example | | ||
| `ELASTIC_APM_CAPTURE_BODY` | `capture_body` | `"off"` | `"all"` | ||
|
@@ -253,6 +275,9 @@ If your service handles data like this, we advise to only enable this feature wi | |
[float] | ||
[[config-capture-headers]] | ||
==== `capture_headers` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
|
||
|============ | ||
| Environment | `Config` key | Default | ||
| `ELASTIC_APM_CAPTURE_HEADERS` | `capture_headers` | `true` | ||
|
@@ -278,7 +303,7 @@ Whether or not to attach `ENV` from Rack to transactions and errors. | |
| `ELASTIC_APM_CENTRAL_CONFIG` | `central_config` | `true` | ||
|============ | ||
|
||
Enable {apm-app-ref}/agent-configuration.html[APM Agent Configuration via Kibana]. | ||
Enables {apm-app-ref}/agent-configuration.html[APM Agent Configuration via Kibana]. | ||
If set to `true`, the client will poll the APM Server regularly for new agent configuration. | ||
|
||
Usually APM Server determines how often to poll, but if not the default interval is 5 minutes. | ||
|
@@ -514,6 +539,8 @@ Elastic APM can instrument your Rake tasks but given that they are used for a mu | |
[[config-log-level]] | ||
==== `log_level` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
|
||
[options="header"] | ||
|============ | ||
| Environment | `Config` key | Default | ||
|
@@ -694,6 +721,8 @@ storage use in your Elasticsearch cluster. | |
[[config-span-frames-min-duration-ms]] | ||
==== `span_frames_min_duration` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
|
||
|============ | ||
| Environment | `Config` key | Default | ||
| `ELASTIC_APM_SPAN_FRAMES_MIN_DURATION` | `span_frames_min_duration` | `"5ms"` | ||
|
@@ -737,6 +766,8 @@ The maximum number of stack trace lines per span/error. | |
[[config-transaction-max-spans]] | ||
==== `transaction_max_spans` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
|
||
|============ | ||
| Environment | `Config` key | Default | ||
| `ELASTIC_APM_TRANSACTION_MAX_SPANS` | `transaction_max_spans` | `500` | ||
|
@@ -752,6 +783,8 @@ too much work for such edge cases. | |
[[config-transaction-sample-rate]] | ||
==== `transaction_sample_rate` | ||
|
||
<<dynamic-configuration, image:./images/dynamic-config.svg[] >> | ||
|
||
|============ | ||
| Environment | `Config` key | Default | ||
| `ELASTIC_APM_TRANSACTION_SAMPLE_RATE` | `transaction_sample_rate` | `1.0` | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still the recommend way?