|
17 | 17 | trace_app(app, tracer, service='async-api') |
18 | 18 | web.run_app(app, port=8000) |
19 | 19 |
|
20 | | -Tracer settings are available under the `datadog_trace` namespace: |
21 | | -
|
22 | | -* `tracer` (default: `ddtrace.tracer`): set the default tracer instance that is used to |
23 | | -trace `aiohttp` internals. By default the `ddtrace` tracer is used. |
24 | | -* `service` (default: `aiohttp-web`): set the service name used by the tracer. Usually |
25 | | -this configuration must be updated with a meaningful name. |
26 | | -* `distributed_tracing_enabled` (default: `False): enable distributed tracing during |
27 | | -the middleware execution, so that a new span is created with the given `trace_id` and |
28 | | -`parent_id` passed via request headers. |
29 | | -
|
30 | | -To update your settings, just: |
| 20 | +Integration settings are attached to your application under the ``datadog_trace`` |
| 21 | +namespace. You can read or update them as follows:: |
31 | 22 |
|
32 | 23 | # activates distributed tracing for all received requests |
33 | 24 | app['datadog_trace']['distributed_tracing_enabled'] = True |
34 | 25 |
|
| 26 | +Available settings are: |
| 27 | +
|
| 28 | +* ``tracer`` (default: ``ddtrace.tracer``): set the default tracer instance that is used to |
| 29 | + trace `aiohttp` internals. By default the `ddtrace` tracer is used. |
| 30 | +* ``service`` (default: ``aiohttp-web``): set the service name used by the tracer. Usually |
| 31 | + this configuration must be updated with a meaningful name. |
| 32 | +* ``distributed_tracing_enabled`` (default: ``False``): enable distributed tracing during |
| 33 | + the middleware execution, so that a new span is created with the given ``trace_id`` and |
| 34 | + ``parent_id`` injected via request headers. |
| 35 | +
|
35 | 36 | Third-party modules that are currently supported by the ``patch()`` method are: |
36 | 37 |
|
37 | 38 | * ``aiohttp_jinja2`` |
38 | 39 |
|
39 | | -When a request span is automatically created, the ``Context`` for this logical execution |
40 | | -is attached to the ``request`` object, so that it can be used in the application code:: |
| 40 | +When a request span is created, a new ``Context`` for this logical execution is attached |
| 41 | +to the ``request`` object, so that it can be used in the application code:: |
41 | 42 |
|
42 | 43 | async def home_handler(request): |
43 | 44 | ctx = request['datadog_context'] |
|
0 commit comments