Skip to content

Conversation

@antonis
Copy link
Contributor

@antonis antonis commented Jan 23, 2026

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Implements support for adding custom attributes to user interaction spans via the sentry-span-attributes prop. This allows users to add contextual metadata to touch events without manually implementing onPress handlers.

Docs PR: getsentry/sentry-docs#16134

💡 Motivation and Context

Fixes #5511

💚 How did you test it?

Manual with the sample app, Unit tests

Screenshot 2026-01-23 at 10 30 08

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@antonis
Copy link
Contributor Author

antonis commented Jan 23, 2026

@sentry review

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(tracing): Add sentry-span-attributes prop for custom span attributes by antonis in #5569
  • ci(release): Fix changelog-preview permissions by BYK in #5571

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 7abc411

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Jan 23, 2026
@antonis antonis marked this pull request as ready for review January 23, 2026 10:02
@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 461.10 ms 484.22 ms 23.12 ms
Size 43.75 MiB 48.40 MiB 4.64 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
818a608 495.84 ms 498.08 ms 2.25 ms
a06e222+dirty 434.00 ms 439.35 ms 5.35 ms
180638b+dirty 408.87 ms 432.04 ms 23.17 ms
d916aa3 425.37 ms 427.02 ms 1.65 ms
5ee3314+dirty 415.80 ms 426.14 ms 10.34 ms
f234eb4+dirty 407.62 ms 429.64 ms 22.02 ms
a2bb688+dirty 409.65 ms 410.45 ms 0.80 ms
a206511+dirty 424.28 ms 474.82 ms 50.54 ms
46bd012 387.09 ms 404.47 ms 17.38 ms
083f560+dirty 358.21 ms 382.00 ms 23.79 ms

App size

Revision Plain With Sentry Diff
818a608 17.75 MiB 19.68 MiB 1.94 MiB
a06e222+dirty 43.75 MiB 48.55 MiB 4.80 MiB
180638b+dirty 43.75 MiB 48.08 MiB 4.33 MiB
d916aa3 17.75 MiB 20.15 MiB 2.41 MiB
5ee3314+dirty 17.75 MiB 19.70 MiB 1.95 MiB
f234eb4+dirty 17.75 MiB 19.74 MiB 1.99 MiB
a2bb688+dirty 17.75 MiB 19.70 MiB 1.95 MiB
a206511+dirty 43.75 MiB 48.07 MiB 4.32 MiB
46bd012 17.75 MiB 20.15 MiB 2.41 MiB
083f560+dirty 17.75 MiB 19.70 MiB 1.96 MiB

Previous results on branch: antonis/sentry-span-attributes

Startup times

Revision Plain With Sentry Diff
dbd5e5b+dirty 413.64 ms 435.06 ms 21.42 ms

App size

Revision Plain With Sentry Diff
dbd5e5b+dirty 43.75 MiB 48.40 MiB 4.64 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 412.37 ms 438.23 ms 25.87 ms
Size 43.94 MiB 49.22 MiB 5.29 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a06e222+dirty 377.17 ms 401.40 ms 24.23 ms
180638b+dirty 434.46 ms 470.90 ms 36.44 ms
64cd15c+dirty 488.79 ms 483.54 ms -5.24 ms
c08359e+dirty 406.04 ms 428.87 ms 22.83 ms
1226664+dirty 377.65 ms 453.94 ms 76.29 ms
46da307+dirty 356.62 ms 415.02 ms 58.40 ms
7480abe+dirty 363.80 ms 431.34 ms 67.54 ms
a206511+dirty 331.54 ms 356.98 ms 25.44 ms
7be1f99+dirty 369.02 ms 399.60 ms 30.58 ms
f234eb4+dirty 313.23 ms 333.31 ms 20.08 ms

App size

Revision Plain With Sentry Diff
a06e222+dirty 43.94 MiB 49.38 MiB 5.44 MiB
180638b+dirty 43.94 MiB 48.91 MiB 4.97 MiB
64cd15c+dirty 7.15 MiB 8.42 MiB 1.27 MiB
c08359e+dirty 7.15 MiB 8.42 MiB 1.27 MiB
1226664+dirty 7.15 MiB 8.46 MiB 1.30 MiB
46da307+dirty 7.15 MiB 8.41 MiB 1.26 MiB
7480abe+dirty 7.15 MiB 8.41 MiB 1.26 MiB
a206511+dirty 43.94 MiB 48.90 MiB 4.96 MiB
7be1f99+dirty 7.15 MiB 8.42 MiB 1.27 MiB
f234eb4+dirty 7.15 MiB 8.46 MiB 1.30 MiB

Previous results on branch: antonis/sentry-span-attributes

Startup times

Revision Plain With Sentry Diff
dbd5e5b+dirty 378.70 ms 407.72 ms 29.02 ms

App size

Revision Plain With Sentry Diff
dbd5e5b+dirty 43.94 MiB 49.22 MiB 5.29 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1201.81 ms 1200.67 ms -1.15 ms
Size 3.38 MiB 4.60 MiB 1.22 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
9bf5446+dirty 1218.60 ms 1210.45 ms -8.15 ms
d751a5d+dirty 1212.22 ms 1217.94 ms 5.71 ms
88890fe+dirty 1219.00 ms 1222.08 ms 3.08 ms
f081f58+dirty 1208.37 ms 1215.56 ms 7.19 ms
0dff710+dirty 1194.90 ms 1196.15 ms 1.25 ms
5c16cdc+dirty 1235.67 ms 1241.18 ms 5.51 ms
5602cc4+dirty 1204.83 ms 1212.47 ms 7.64 ms
c08359e+dirty 1200.59 ms 1211.81 ms 11.22 ms
000da7a+dirty 1204.50 ms 1218.94 ms 14.44 ms
c1573b3+dirty 1245.69 ms 1245.48 ms -0.21 ms

App size

Revision Plain With Sentry Diff
9bf5446+dirty 3.41 MiB 4.59 MiB 1.18 MiB
d751a5d+dirty 3.19 MiB 4.54 MiB 1.36 MiB
88890fe+dirty 3.19 MiB 4.57 MiB 1.38 MiB
f081f58+dirty 3.41 MiB 4.58 MiB 1.17 MiB
0dff710+dirty 3.44 MiB 4.59 MiB 1.15 MiB
5c16cdc+dirty 3.19 MiB 4.53 MiB 1.34 MiB
5602cc4+dirty 3.41 MiB 4.67 MiB 1.25 MiB
c08359e+dirty 3.19 MiB 4.38 MiB 1.19 MiB
000da7a+dirty 3.19 MiB 4.48 MiB 1.29 MiB
c1573b3+dirty 3.19 MiB 4.38 MiB 1.19 MiB

Previous results on branch: antonis/sentry-span-attributes

Startup times

Revision Plain With Sentry Diff
dbd5e5b+dirty 1214.06 ms 1210.98 ms -3.08 ms

App size

Revision Plain With Sentry Diff
dbd5e5b+dirty 3.38 MiB 4.60 MiB 1.22 MiB

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1207.78 ms 1216.73 ms 8.95 ms
Size 3.38 MiB 4.60 MiB 1.22 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
9bf5446+dirty 1206.20 ms 1206.69 ms 0.48 ms
d751a5d+dirty 1215.57 ms 1220.56 ms 4.99 ms
88890fe+dirty 1219.20 ms 1231.00 ms 11.80 ms
f081f58+dirty 1219.10 ms 1217.57 ms -1.53 ms
0dff710+dirty 1207.23 ms 1203.26 ms -3.97 ms
5c16cdc+dirty 1209.32 ms 1210.67 ms 1.35 ms
5602cc4+dirty 1216.49 ms 1211.58 ms -4.91 ms
c08359e+dirty 1235.25 ms 1233.96 ms -1.29 ms
000da7a+dirty 1214.31 ms 1221.91 ms 7.61 ms
c1573b3+dirty 1203.33 ms 1202.47 ms -0.86 ms

App size

Revision Plain With Sentry Diff
9bf5446+dirty 3.41 MiB 4.59 MiB 1.18 MiB
d751a5d+dirty 2.63 MiB 3.98 MiB 1.34 MiB
88890fe+dirty 2.63 MiB 4.00 MiB 1.37 MiB
f081f58+dirty 3.41 MiB 4.58 MiB 1.17 MiB
0dff710+dirty 3.44 MiB 4.59 MiB 1.15 MiB
5c16cdc+dirty 2.63 MiB 3.96 MiB 1.33 MiB
5602cc4+dirty 3.41 MiB 4.67 MiB 1.25 MiB
c08359e+dirty 2.63 MiB 3.81 MiB 1.18 MiB
000da7a+dirty 2.63 MiB 3.91 MiB 1.28 MiB
c1573b3+dirty 2.63 MiB 3.81 MiB 1.18 MiB

Previous results on branch: antonis/sentry-span-attributes

Startup times

Revision Plain With Sentry Diff
dbd5e5b+dirty 1207.29 ms 1206.31 ms -0.97 ms

App size

Revision Plain With Sentry Diff
dbd5e5b+dirty 3.38 MiB 4.60 MiB 1.22 MiB

@TLenahan
Copy link

This is amazing! Thank you @antonis!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pass span attributes as props to interaction elements

4 participants