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
Copy file name to clipboardExpand all lines: docs/reference/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,7 +189,7 @@ For base `logging` from the standard library, the agent will get the root logger
189
189
190
190
If `structlog` is installed, the agent will override any configured processors with `ecs_logging.StructlogFormatter()`.
191
191
192
-
Note that this is a very blunt instrument that could have unintended side effects. If problems arise, please apply these formatters manually and leave this setting as `"off"`. See the [`ecs_logging` docs](ecs-logging-python://docs/reference/installation.md) for more information about using these formatters.
192
+
Note that this is a very blunt instrument that could have unintended side effects. If problems arise, please apply these formatters manually and leave this setting as `"off"`. See the [`ecs_logging` docs](ecs-logging-python://reference/installation.md) for more information about using these formatters.
193
193
194
194
Also note that this setting does not facilitate shipping logs to Elasticsearch. We recommend [Filebeat](https://www.elastic.co/beats/filebeat) for that purpose.
Copy file name to clipboardExpand all lines: docs/reference/django-support.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ elasticApm.init({
149
149
})
150
150
```
151
151
152
-
See the [JavaScript RUM agent documentation](apm-agent-rum-js://docs/reference/index.md) for more information.
152
+
See the [JavaScript RUM agent documentation](apm-agent-rum-js://reference/index.md) for more information.
153
153
154
154
155
155
## Enabling and disabling the agent [django-enabling-and-disabling-the-agent]
@@ -171,7 +171,7 @@ ELASTIC_APM = {
171
171
To easily send Python `logging` messages as "error" objects to Elasticsearch, we provide a `LoggingHandler` which you can use in your logging setup. The log messages will be enriched with a stack trace, data from the request, and more.
172
172
173
173
::::{note}
174
-
the intended use case for this handler is to send high priority log messages (e.g. log messages with level `ERROR`) to Elasticsearch. For normal log shipping, we recommend using [filebeat](beats://docs/reference/filebeat/filebeat-overview.md).
174
+
the intended use case for this handler is to send high priority log messages (e.g. log messages with level `ERROR`) to Elasticsearch. For normal log shipping, we recommend using [filebeat](beats://reference/filebeat/filebeat-overview.md).
Both the [{{apm-lambda-ext}}](apm-aws-lambda://docs/reference/index.md) and the Python APM Agent are added to your Lambda function as [AWS Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.md). Therefore, you need to add the corresponding Layer ARNs (identifiers) to your Lambda function.
218
+
Both the [{{apm-lambda-ext}}](apm-aws-lambda://reference/index.md) and the Python APM Agent are added to your Lambda function as [AWS Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.md). Therefore, you need to add the corresponding Layer ARNs (identifiers) to your Lambda function.
219
219
220
220
:::::::{tab-set}
221
221
@@ -308,7 +308,7 @@ The {{apm-lambda-ext}} and the APM Python agent are configured through environme
308
308
309
309
For the minimal configuration, you will need the *APM Server URL* to set the destination for APM data and an *{{apm-guide-ref}}/secret-token.html[APM Secret Token]*. If you prefer to use an [APM API key](docs-content://solutions/observability/apps/api-keys.md) instead of the APM secret token, use the `ELASTIC_APM_API_KEY` environment variable instead of `ELASTIC_APM_SECRET_TOKEN` in the following configuration.
310
310
311
-
For production environments, we recommend [using the AWS Secrets Manager to store your APM authentication key](apm-aws-lambda://docs/reference/aws-lambda-secrets-manager.md) instead of providing the secret value as plaintext in the environment variables.
311
+
For production environments, we recommend [using the AWS Secrets Manager to store your APM authentication key](apm-aws-lambda://reference/aws-lambda-secrets-manager.md) instead of providing the secret value as plaintext in the environment variables.
4. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://docs/reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
333
+
4. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
334
334
335
335

336
336
::::::
@@ -363,7 +363,7 @@ Resources:
363
363
...
364
364
```
365
365
366
-
1. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://docs/reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
366
+
1. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
367
367
368
368
::::::
369
369
@@ -383,7 +383,7 @@ functions:
383
383
...
384
384
```
385
385
386
-
1. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://docs/reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
386
+
1. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
1. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://docs/reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
409
+
1. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
4. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://docs/reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
426
+
4. The [ELASTIC_APM_SEND_STRATEGY](apm-aws-lambda://reference/aws-lambda-config-options.md#_elastic_apm_send_strategy) defines when APM data is sent to your Elastic APM backend. To reduce the execution time of your lambda functions, we recommend to use the background strategy in production environments with steady load scenarios.
427
427
428
428
::::::
429
429
430
430
:::::::
431
431
432
-
You can optionally [fine-tune the Python agent](/reference/configuration.md) or the [configuration of the {{apm-lambda-ext}}](apm-aws-lambda://docs/reference/aws-lambda-config-options.md).
432
+
You can optionally [fine-tune the Python agent](/reference/configuration.md) or the [configuration of the {{apm-lambda-ext}}](apm-aws-lambda://reference/aws-lambda-config-options.md).
433
433
434
434
That’s it. After following the steps above, you’re ready to go! Your Lambda function invocations should be traced from now on. Spans will be captured for [supported technologies](/reference/supported-technologies.md). You can also use [`capture_span`](/reference/api-reference.md#api-capture-span) to capture custom spans, and you can retrieve the `Client` object for capturing exceptions/messages using [`get_client`](/reference/api-reference.md#api-get-client).
Elastic Python APM Agent does not send the logs to Elasticsearch. It only injects correlation IDs and reformats the logs. You must use another ingestion strategy. We recommend [Filebeat](https://www.elastic.co/beats/filebeat) for that purpose.
@@ -17,7 +17,7 @@ Elastic Python APM Agent does not send the logs to Elasticsearch. It only inject
17
17
18
18
Those features are part of [Application log ingestion strategies](docs-content://solutions/observability/logs/stream-application-logs.md).
19
19
20
-
The [`ecs-logging-python`](ecs-logging-python://docs/reference/index.md) library can also be used to use the [ECS logging](ecs-logging://docs/reference/intro.md) format without an APM agent. When deployed with the Python APM agent, the agent will provide [log correlation](#log-correlation-ids) IDs.
20
+
The [`ecs-logging-python`](ecs-logging-python://reference/index.md) library can also be used to use the [ECS logging](ecs-logging://reference/intro.md) format without an APM agent. When deployed with the Python APM agent, the agent will provide [log correlation](#log-correlation-ids) IDs.
21
21
22
22
23
23
## Log correlation [log-correlation-ids]
@@ -41,7 +41,7 @@ We use [`logging.setLogRecordFactory()`](https://docs.python.org/3/library/loggi
41
41
*`elasticapm_trace_id`
42
42
*`elasticapm_span_id`
43
43
44
-
This factory also adds these fields to a dictionary attribute, `elasticapm_labels`, using the official ECS [tracing fields](ecs://docs/reference/ecs-tracing.md).
44
+
This factory also adds these fields to a dictionary attribute, `elasticapm_labels`, using the official ECS [tracing fields](ecs://reference/ecs-tracing.md).
45
45
46
46
You can disable this automatic behavior by using the [`disable_log_record_factory`](/reference/configuration.md#config-generic-disable-log-record-factory) setting in your configuration.
47
47
@@ -81,7 +81,7 @@ In order to correlate logs from your app with transactions captured by the Elast
81
81
82
82
If you’re using structured logging, either [with a custom solution](https://docs.python.org/3/howto/logging-cookbook.md#implementing-structured-logging) or with [structlog](http://www.structlog.org/en/stable/) (recommended), then this is fairly easy. Throw the [JSONRenderer](http://www.structlog.org/en/stable/api.md#structlog.processors.JSONRenderer) in, and use [Filebeat](https://www.elastic.co/blog/structured-logging-filebeat) to pull these logs into Elasticsearch.
83
83
84
-
Without structured logging the task gets a little trickier. Here we recommend first making sure your LogRecord objects have the elasticapm attributes (see [`logging`](#logging)), and then you’ll want to combine some specific formatting with a Grok pattern, either in Elasticsearch using [the grok processor](elasticsearch://docs/reference/ingestion-tools/enrich-processor/grok-processor.md), or in [logstash with a plugin](logstash://docs/reference/plugins-filters-grok.md).
84
+
Without structured logging the task gets a little trickier. Here we recommend first making sure your LogRecord objects have the elasticapm attributes (see [`logging`](#logging)), and then you’ll want to combine some specific formatting with a Grok pattern, either in Elasticsearch using [the grok processor](elasticsearch://reference/ingestion-tools/enrich-processor/grok-processor.md), or in [logstash with a plugin](logstash://reference/plugins-filters-grok.md).
85
85
86
86
Say you have a [Formatter](https://docs.python.org/3/library/logging.md#logging.Formatter) that looks like this:
Then, you could use a grok pattern like this (for the [Elasticsearch Grok Processor](elasticsearch://docs/reference/ingestion-tools/enrich-processor/grok-processor.md)):
117
+
Then, you could use a grok pattern like this (for the [Elasticsearch Grok Processor](elasticsearch://reference/ingestion-tools/enrich-processor/grok-processor.md)):
Copy file name to clipboardExpand all lines: docs/reference/upgrading-5.x.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ APM Server and Kibana 7.3 introduced support for collecting breakdown metrics, a
12
12
13
13
## Tags renamed to Labels [_tags_renamed_to_labels]
14
14
15
-
To better align with other parts of the Elastic Stack and the [Elastic Common Schema](ecs://docs/reference/index.md), we renamed "tags" to "labels", and introduced limited support for typed labels. While tag values were only allowed to be strings, label values can be strings, booleans, or numerical.
15
+
To better align with other parts of the Elastic Stack and the [Elastic Common Schema](ecs://reference/index.md), we renamed "tags" to "labels", and introduced limited support for typed labels. While tag values were only allowed to be strings, label values can be strings, booleans, or numerical.
16
16
17
17
To benefit from this change, ensure that you run at least **APM Server 6.7**, and use `elasticapm.label()` instead of `elasticapm.tag()`. The `tag()` API will continue to work as before, but emit a `DeprecationWarning`. It will be removed in 6.0 of the agent.
0 commit comments