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
@@ -303,7 +303,7 @@ Elastic APM will automatically log errors from your celery tasks, and record per
303
303
304
304
[float]
305
305
[[django-logging-http-404-not-found-errors]]
306
-
=== Logging "HTTP 404 Not Found" Errors
306
+
==== Logging "HTTP 404 Not Found" errors
307
307
308
308
By default, Elastic APM does not log HTTP 404 errors. If you wish to log
309
309
these errors, add
@@ -325,7 +325,7 @@ setting.
325
325
326
326
[float]
327
327
[[django-disable-agent-during-tests]]
328
-
=== Disable the agent during tests
328
+
==== Disable the agent during tests
329
329
330
330
To prevent the agent from sending any data to the APM Server during tests, set the `ELASTIC_APM_DISABLE_SEND` environment variable to `true`, e.g.:
331
331
@@ -336,7 +336,7 @@ ELASTIC_APM_DISABLE_SEND=true python manage.py test
336
336
337
337
[float]
338
338
[[django-troubleshooting]]
339
-
=== Troubleshooting
339
+
==== Troubleshooting
340
340
341
341
Elastic APM comes with a Django command that helps troubleshooting your setup. To check your configuration, run
342
342
@@ -369,6 +369,6 @@ Success! We tracked the error successfully! You should be able to see it in a fe
369
369
370
370
[float]
371
371
[[supported-django-and-python-versions]]
372
-
=== Supported Django and Python versions
372
+
==== Supported Django and Python versions
373
373
374
374
A list of supported <<supported-django,Django>> and <<supported-python,Python>> versions can be found on our <<supported-technologies,Supported Technologies>> page.
Passing `logging=LEVEL` to the ElasticAPM constructor will make the agent automatically log all log messages from Python's built-in `logging` module,
138
138
with the given level or higher.
@@ -198,7 +198,7 @@ Without it, only the message is sent.
198
198
199
199
[float]
200
200
[[flask-extra-data]]
201
-
==== Extra data
201
+
===== Extra data
202
202
203
203
In addition to what the agents log by default, you can send extra information:
204
204
@@ -220,20 +220,20 @@ def bar():
220
220
221
221
[float]
222
222
[[flask-celery-tasks]]
223
-
==== Celery tasks
223
+
===== Celery tasks
224
224
225
225
The Elastic APM agent will automatically send errors and performance data from your Celery tasks to the APM Server.
226
226
227
227
[float]
228
228
[[flask-performance-metrics]]
229
-
=== Performance Metrics
229
+
==== Performance metrics
230
230
231
231
If you've followed the instructions above, the agent has already hooked
232
232
into the right signals and should be reporting performance metrics.
233
233
234
234
[float]
235
235
[[flask-ignoring-specific-views]]
236
-
==== Ignoring specific routes
236
+
===== Ignoring specific routes
237
237
238
238
You can use the `TRANSACTIONS_IGNORE_PATTERNS` configuration option to ignore specific routes.
239
239
The list given should be a list of regular expressions which are matched against the transaction name:
@@ -253,7 +253,7 @@ and any requests containing `/api/`.
253
253
254
254
[float]
255
255
[[flask-integrating-with-the-rum-agent]]
256
-
==== Integrating with the RUM agent
256
+
===== Integrating with the RUM Agent
257
257
258
258
To correlate performance measurement in the browser with measurements in your Flask app,
259
259
you can help the RUM (Real User Monitoring) agent by configuring it with the Trace ID and Span ID of the backend request.
@@ -277,6 +277,6 @@ See the {apm-rum-ref}[JavaScript RUM agent documentation] for more information.
277
277
278
278
[float]
279
279
[[supported-flask-and-python-versions]]
280
-
=== Supported Flask and Python versions
280
+
==== Supported Flask and Python versions
281
281
282
282
A list of supported <<supported-flask,Flask>> and <<supported-python,Python>> versions can be found on our <<supported-technologies,Supported Technologies>> page.
Copy file name to clipboardExpand all lines: docs/getting-started.asciidoc
+20-19Lines changed: 20 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,31 @@
1
1
[[getting-started]]
2
+
== Introduction
2
3
3
-
ifdef::env-github[]
4
-
NOTE: For the best reading experience,
5
-
please view this documentation at https://www.elastic.co/guide/en/apm/agent/python/current/getting-started.html[elastic.co]
6
-
endif::[]
4
+
The Elastic APM Python agent sends performance metrics and error logs to the APM Server.
5
+
It has built-in support for Django and Flask performance metrics and error logging, as well as generic support of other WSGI frameworks for error logging.
6
+
7
+
[float]
8
+
[[how-it-works]]
9
+
=== How does the Agent work?
7
10
8
-
== Getting started
11
+
The Python Agent instruments your application to collect APM events in a few different ways:
9
12
10
-
Welcome to the APM Python agent docs.
13
+
To collect data about incoming requests and background tasks, the Agent integrates with <<supported-technologies,supported technologies>> to make use of hooks and signals provided by the framework.
14
+
These framework integrations require limited code changes in your application.
11
15
12
-
The Elastic APM Python agent sends performance metrics and error logs to the APM Server.
13
-
It has built-in support for Django and Flask performance metrics and error logging, as well as generic support of other WSGI frameworks for error logging.
16
+
To collect data from database drivers, HTTP libraries etc.,
17
+
we instrument certain functions and methods in these libraries.
18
+
Instrumentations are set up automatically and do not require any code changes.
19
+
20
+
In addition to APM and error data,
21
+
the Python agent also collects system and application metrics in regular intervals.
22
+
This collection happens in a background thread that is started by the agent.
23
+
24
+
More detailed information on how the Agent works can be found in the <<how-the-agent-works,advanced topics>>.
14
25
15
26
[float]
16
27
[[additional-components]]
17
-
=== Additional Components
28
+
=== Additional components
18
29
19
30
APM Agents work in conjunction with the {apm-server-ref-v}/index.html[APM Server], {ref}/index.html[Elasticsearch], and {kibana-ref}/index.html[Kibana].
20
31
Please view the {apm-overview-ref-v}/index.html[APM Overview] for details on how these components work together.
21
-
22
-
[[framework-support]]
23
-
The Elastic APM Python Agent comes with support for the following frameworks:
24
-
25
-
* <<django-support,Django>> 1.8 - 2.1
26
-
* <<flask-support,Flask>> 0.10+
27
-
28
-
For other frameworks and custom Python code, the agent exposes a set of <<api,APIs>> for integration.
29
-
30
-
NOTE: The Elastic APM Python agent does currently not support asynchronous frameworks like Twisted or Tornado.
0 commit comments