Skip to content

Commit 1534ed1

Browse files
docs: Document arguments for Span (#2919)
ref getsentry/sentry-docs#5082
1 parent bd49dcd commit 1534ed1

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

sentry_sdk/tracing.py

+23-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,29 @@ def add(self, span):
107107

108108
class Span:
109109
"""A span holds timing information of a block of code.
110-
Spans can have multiple child spans thus forming a span tree."""
110+
Spans can have multiple child spans thus forming a span tree.
111+
112+
:param trace_id: The trace ID of the root span. If this new span is to be the root span,
113+
omit this parameter, and a new trace ID will be generated.
114+
:param span_id: The span ID of this span. If omitted, a new span ID will be generated.
115+
:param parent_span_id: The span ID of the parent span, if applicable.
116+
:param same_process_as_parent: Whether this span is in the same process as the parent span.
117+
:param sampled: Whether the span should be sampled. Overrides the default sampling decision
118+
for this span when provided.
119+
:param op: The span's operation. A list of recommended values is available here:
120+
https://develop.sentry.dev/sdk/performance/span-operations/
121+
:param description: A description of what operation is being performed within the span.
122+
:param hub: The hub to use for this span.
123+
124+
.. deprecated:: 2.0.0
125+
Please use the `scope` parameter, instead.
126+
:param status: The span's status. Possible values are listed at
127+
https://develop.sentry.dev/sdk/event-payloads/span/
128+
:param containing_transaction: The transaction that this span belongs to.
129+
:param start_timestamp: The timestamp when the span started. If omitted, the current time
130+
will be used.
131+
:param scope: The scope to use for this span. If not provided, we use the current scope.
132+
"""
111133

112134
__slots__ = (
113135
"trace_id",

0 commit comments

Comments
 (0)