You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add spec for `span_stack_trace_min_duration` config
* Update `duration` spec to allow for non-ms suffixes
* Required unit suffixes for durations
* Review suggestions
* Add configuration scope and invalid configuration guidance
* Use "precedence" instead of "scope"
* Make span_stack_trace_min_duration case-sensitive
* Add size as a config type
* Add validating regex for size/duration
* Clarify config precedence with requirement level keywords
* Add case-sensitivity requirements for duration/size
* Use `MAY` for config precedence (+typo)
Copy file name to clipboardExpand all lines: specs/agents/configuration.md
+47Lines changed: 47 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,53 @@ Here's a list of the config options across all agents, their types, default valu
10
10
11
11
They are provided as environment variables but depending on the language there might be several feasible ways to let the user tweak them. For example besides the environment variable `ELASTIC_APM_SERVER_URL`, the Node.js Agent might also allow the user to configure the server URL via a config option named `serverUrl`, while the Python Agent might also allow the user to configure it via a config option named `server_url`.
12
12
13
+
### Configuration Source Precedence
14
+
15
+
Configuration can be provided via a number of sources. Values from central
16
+
configuration MUST have the highest precedence, and default values MUST have
17
+
the lowest precedence. Otherwise, agents MAY adopt the following config
18
+
source precedence. Sources higher on this list will override values provided
19
+
by sources lower on this list:
20
+
21
+
- Central configuration
22
+
- Environment variables
23
+
- Inline configuration in code
24
+
- Config files
25
+
- Default value
26
+
27
+
### Invalid Configuration Values
28
+
29
+
If an invalid value for a configuration option is provided (for example:
30
+
`breakdown_metrics="yes"` or `apiRequestTime="1h"`) then the agent MUST ignore
31
+
the value (falling back to a config source with lower precedence) and SHOULD
32
+
emit a log warning about the ignored value.
33
+
34
+
### Configuration Value Types
35
+
36
+
The following table enumerates the available configuration types across the
37
+
agents:
38
+
39
+
40
+
| Type | Description (if needed) |
41
+
|------|-------------------------|
42
+
| String ||
43
+
| Integer ||
44
+
| Float ||
45
+
| Boolean | Encoded as a lower-case boolean string: `"false"`, `"true"`|
46
+
| List | Encoded as a comma-separated string (whitespace surrounding items should be stripped): `"foo,bar,baz"`|
47
+
| Mapping | Encoded as a string, with `"key=value"` pairs separated by commas (whitespace surrounding items should be stripped): `"foo=bar,baz=foo"`|
48
+
| Duration | Case-sensitive string with duration encoded using unit suffixes (`ms` for millisecond, `s` for second, `m` for minute). Validating regex: `^(-)?(\d+)(ms|s|m)$` |
49
+
| Size | Case-insensitive string with a positive size encoded using unit suffixes (`b` for bytes, `kb` for kilobytes, `mb` for megabytes, `gb` for gigabytes, with a 1024 multiplier between each unit). Validating regex: `^(\d+)(b|kb|mb|gb)$` |
50
+
51
+
#### Duration/Size Config Legacy Considerations
52
+
53
+
For duration/size-formatted config options, some agents allow users to omit the unit
54
+
suffix for backwards compatibility reasons. Going forward, all
55
+
duration/size-formatted config options should require the unit suffix, falling back
56
+
to the default value if an invalid value is provided. Existing
57
+
duration/size-formatted config options should be changed to require the unit suffix
58
+
at the next major version.
59
+
13
60
### APM Agent Configuration via Kibana
14
61
15
62
Also known as "central configuration". Agents can query the APM Server for configuration updates; the server proxies and caches requests to Kibana.
Copy file name to clipboardExpand all lines: specs/agents/tracing-spans.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,36 @@ The documentation should clarify that spans with `unknown` outcomes are ignored
54
54
55
55
### Span stack traces
56
56
57
-
Spans may have an associated stack trace, in order to locate the associated source code that caused the span to occur. If there are many spans being collected this can cause a significant amount of overhead in the application, due to the capture, rendering, and transmission of potentially large stack traces. It is possible to limit the recording of span stack traces to only spans that are slower than a specified duration, using the config variable `ELASTIC_APM_SPAN_FRAMES_MIN_DURATION`.
57
+
Spans may have an associated stack trace, in order to locate the associated
58
+
source code that caused the span to occur. If there are many spans being
59
+
collected this can cause a significant amount of overhead in the application,
60
+
due to the capture, rendering, and transmission of potentially large stack
61
+
traces. It is possible to limit the recording of span stack traces to only
62
+
spans that are slower than a specified duration, using the config variable
0 commit comments