Skip to content

Commit c8ac8d8

Browse files
committed
feat(python): Add strict_trace_continuation and org_id
1 parent 460e620 commit c8ac8d8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/platforms/python/configuration/options.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,29 @@ If `trace_propagation_targets` is not provided, trace data is attached to every
378378

379379
</SdkOption>
380380

381+
<SdkOption name="strict_trace_continuation" type='boolean' defaultValue='False'>
382+
383+
If set to `True`, the SDK will only continue a trace if the organization ID of the incoming trace found in the
384+
`baggage` header matches the organization ID of the current Sentry client.
385+
386+
The client's organization ID is extracted from the DSN or can be set with the <PlatformLink to={'/configuration/options#org_id'}>`org_id` option</PlatformLink>.
387+
388+
If the organization IDs do not match, the SDK will start a new trace instead of continuing the incoming one.
389+
This is useful to prevent traces of unknown third-party services from being continued in your application.
390+
391+
</SdkOption>
392+
393+
<SdkOption name="org_id" type='str'>
394+
395+
An optional organization ID for your Sentry project.
396+
397+
The SDK will try to extract the organization ID from the DSN. If it cannot be found, or if you need to override it (if you use Relay or self-hosted),
398+
you can provide the ID with this option.
399+
400+
The organization ID is used for features like <PlatformLink to="/configuration/options#strictTraceContinuation">strict trace continuation</PlatformLink>.
401+
402+
</SdkOption>
403+
381404
<SdkOption name="functions_to_trace" type='list[str]' defaultValue='[]'>
382405

383406
An optional list of functions that should be set up for tracing. For each function in the list, a span will be created when the function is executed.

0 commit comments

Comments
 (0)