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
Copy file name to clipboardExpand all lines: docs/platforms/python/tracing/instrumentation/custom-instrumentation/index.mdx
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,3 +235,35 @@ def eat_slice(slice):
235
235
if span isnotNone:
236
236
span.set_tag("slice_id", slice.id)
237
237
```
238
+
239
+
## Improving Data on Transactions and Spans
240
+
241
+
### Adding Data Attributes to Transactions
242
+
243
+
You can add data attributes to your transactions. This data is visible in the trace explorer in Sentry. Data attributes can be of type `string`, `number` or `boolean`, as well as (non-mixed) arrays of these types:
244
+
245
+
```python
246
+
with sentry_sdk.start_transaction(name="my-transaction") as transaction:
You can add data attributes to your spans. This data is visible in the trace explorer in Sentry. Data attributes can be of type `string`, `number` or `boolean`, as well as (non-mixed) arrays of these types:
259
+
260
+
```python
261
+
with sentry_sdk.start_span(name="my-span") as span:
0 commit comments