Skip to content

Commit e1bb09f

Browse files
author
Emanuele Palazzetti
authored
Merge pull request #412 from palazzem/update-docs
[docs] update docs syntax
2 parents c0854c7 + 937644d commit e1bb09f

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

ddtrace/contrib/pyramid/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
1818
Available settings are:
1919
20-
* `datadog_trace_service`: change the `pyramid` service name
21-
* `datadog_trace_enabled`: sets if the Tracer is enabled or not
22-
* `datadog_distributed_tracing`: set it to `True` to enable Distributed Tracing
20+
* ``datadog_trace_service``: change the `pyramid` service name
21+
* ``datadog_trace_enabled``: sets if the Tracer is enabled or not
22+
* ``datadog_distributed_tracing``: set it to ``True`` to enable Distributed Tracing
2323
2424
If you use the 'pyramid.tweens' settings value to set the tweens for your
2525
application, you need to add 'ddtrace.contrib.pyramid:trace_tween_factory'
2626
explicitly to the list. For example::
2727
2828
settings = {
2929
'datadog_trace_service' : 'my-web-app-name',
30-
'pyramid.tweens', 'your_tween_no_1\nyour_tween_no_2\nddtrace.contrib.pyramid:trace_tween_factory',
30+
'pyramid.tweens', 'your_tween_no_1\\nyour_tween_no_2\\nddtrace.contrib.pyramid:trace_tween_factory',
3131
}
3232
3333
config = Configurator(settings=settings)

docs/index.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -358,23 +358,23 @@ Priority sampling
358358
Priority sampling consists in deciding if a trace will be kept by using a `priority` attribute that will be propagated
359359
for distributed traces. Its value gives indication to the Agent and to the backend on how important the trace is.
360360

361-
The sampler can set the priority to the following values::
361+
The sampler can set the priority to the following values:
362362

363-
- `AUTO_REJECT`: the sampler automatically decided to reject the trace
364-
- `AUTO_KEEP`: the sampler automatically decided to keep the trace
363+
- ``AUTO_REJECT``: the sampler automatically decided to reject the trace
364+
- ``AUTO_KEEP``: the sampler automatically decided to keep the trace
365365

366366
For now, priority sampling is disabled by default. Enabling it ensures that your sampled distributed traces will be complete.
367367
To enable the priority sampling::
368368

369369
tracer.configure(priority_sampling=True)
370370

371-
Once enabled, the sampler will automatically assign a priority of 0 or 1 to traces, depending on their service and volume.
371+
Once enabled, the sampler will automatically assign a priority to your traces, depending on their service and volume.
372372

373373
You can also set this priority manually to either drop a non-interesting trace or to keep an important one.
374-
For that, set the `context.sampling_priority` to -1 or 2.
374+
For that, set the ``context.sampling_priority`` to one of the following:
375375

376-
- `USER_REJECT`: the user asked to reject the trace
377-
- `USER_KEEP`: the user asked to keep the trace
376+
- ``USER_REJECT``: the user asked to reject the trace
377+
- ``USER_KEEP``: the user asked to keep the trace
378378

379379
When not using distributed tracing, you may change the priority at any time,
380380
as long as the trace is not finished yet.
@@ -383,16 +383,16 @@ Changing the priority after context has been propagated causes different parts o
383383
to use different priorities. Some parts might be kept, some parts might be rejected,
384384
and this can cause the trace to be partially stored and remain incomplete.
385385

386-
If you change the priority, we recommend you do it as soon as possible, when the root span has just been created.
387-
386+
If you change the priority, we recommend you do it as soon as possible, when the root span has just been created::
388387

389388
from ddtrace.ext.priority import USER_REJECT, USER_KEEP
390389

391390
context = tracer.context_provider.active()
392-
# Indicate to not keep the trace
391+
392+
# indicate to not keep the trace
393393
context.sampling_priority = USER_REJECT
394394

395-
# Indicate to keep the trace
395+
# indicate to keep the trace
396396
span.context.sampling_priority = USER_KEEP
397397

398398

0 commit comments

Comments
 (0)