From 465182d2b8d1db450b69c60e1a297bf3c9839473 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 23 Jan 2026 11:00:47 +0100 Subject: [PATCH 1/3] React Native: Add sentry-span-attributes prop for custom span attributes --- .../user-interaction-instrumentation.mdx | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/platforms/react-native/tracing/instrumentation/user-interaction-instrumentation.mdx b/docs/platforms/react-native/tracing/instrumentation/user-interaction-instrumentation.mdx index ce25ec1767884..b1ec66dc41747 100644 --- a/docs/platforms/react-native/tracing/instrumentation/user-interaction-instrumentation.mdx +++ b/docs/platforms/react-native/tracing/instrumentation/user-interaction-instrumentation.mdx @@ -45,6 +45,41 @@ export default Sentry.wrap(App, { }); ``` +### Adding Custom Attributes to User Interaction Spans + + + The `sentry-span-attributes` prop is experimental and may change in future releases. + + +You can attach custom attributes to user interaction spans by passing the `sentry-span-attributes` prop to your components. This is useful for adding contextual information like user type, cart value, or feature flags that help you understand user behavior in performance monitoring. + +The `sentry-span-attributes` prop accepts an object with string keys and values that are strings, numbers, booleans, or arrays. These attributes will be attached to the user interaction span created when the component is interacted with. + +```javascript +import { Button } from 'react-native'; + +const CheckoutButton = ({ userType, cartValue }) => { + const handleCheckout = () => { + // Checkout logic + }; + + return ( +