Skip to content

Conversation

@buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Nov 25, 2025

📜 Description

Span First initiative - this PR is needed for Dart/Flutter right now but will be needed in general in the future when Java also implements span first

💡 Motivation and Context

See span protocol https://develop.sentry.dev/sdk/telemetry/spans/span-protocol/

Needed for processing envelope items with type span.

Currently needed in Flutter's span first implementation as we rely on Java's InternalSentrySdk.captureEnvelope. Without this support the envelope item type is set to unknown when you use captureEnvelope and the span won't be ingested

💚 How did you test it?

Unit test and manually tested together with the Sentry Flutter SDK

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the 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.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

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

Generated by 🚫 dangerJS against 8d42537

Comment on lines 23 to 29
CheckIn("check_in"),
Feedback("feedback"),
Log("log"),
Span("span"),
Unknown("__unknown__"); // DataCategory.Unknown

private final String itemType;

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid concern but I am not sure if we need to handle this now since we cannot capture spans directly from the java sdk anyway

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, I think it's still valid even for the hybrid SDKs because client reports are counted from the unsent envelop items? But anyway, it can be done in a follow up PR later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check this

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 307.88 ms 342.40 ms 34.53 ms
Size 1.58 MiB 2.13 MiB 557.54 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
604a261 380.65 ms 451.27 ms 70.62 ms
a416a65 295.53 ms 373.74 ms 78.21 ms
889ecea 367.58 ms 437.52 ms 69.94 ms
a5ab36f 320.47 ms 389.77 ms 69.30 ms
27d7cf8 397.90 ms 498.65 ms 100.75 ms
ee747ae 400.46 ms 423.61 ms 23.15 ms
d217708 375.27 ms 415.68 ms 40.41 ms
fcec2f2 357.47 ms 447.32 ms 89.85 ms
23d6b12 354.10 ms 408.38 ms 54.28 ms
d5a29b6 298.62 ms 391.78 ms 93.16 ms

App size

Revision Plain With Sentry Diff
604a261 1.58 MiB 2.10 MiB 533.42 KiB
a416a65 1.58 MiB 2.12 MiB 555.26 KiB
889ecea 1.58 MiB 2.11 MiB 539.75 KiB
a5ab36f 1.58 MiB 2.12 MiB 555.26 KiB
27d7cf8 1.58 MiB 2.12 MiB 549.42 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
d217708 1.58 MiB 2.10 MiB 532.97 KiB
fcec2f2 1.58 MiB 2.12 MiB 551.50 KiB
23d6b12 1.58 MiB 2.10 MiB 532.31 KiB
d5a29b6 1.58 MiB 2.12 MiB 549.37 KiB

Previous results on branch: feat/support-span-sentry-item-type

Startup times

Revision Plain With Sentry Diff
598bacc 298.68 ms 352.42 ms 53.74 ms
c357e8a 408.90 ms 554.76 ms 145.86 ms
a110e56 297.40 ms 373.86 ms 76.45 ms
d9d541c 329.45 ms 357.49 ms 28.04 ms
e9c7b57 321.04 ms 392.09 ms 71.05 ms

App size

Revision Plain With Sentry Diff
598bacc 1.58 MiB 2.13 MiB 557.33 KiB
c357e8a 1.58 MiB 2.13 MiB 557.38 KiB
a110e56 1.58 MiB 2.13 MiB 557.49 KiB
d9d541c 1.58 MiB 2.13 MiB 557.33 KiB
e9c7b57 1.58 MiB 2.13 MiB 557.34 KiB

Moved 'Support span envelope item type' feature to internal section.
Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe create a followup issue to address the client reports/rate limiter concern?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/RateLimiter.java

@getsentry getsentry deleted a comment from github-actions bot Nov 26, 2025
@github-actions
Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/RateLimiter.java

@github-actions
Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/RateLimiter.java

@buenaflor
Copy link
Contributor Author

buenaflor commented Nov 26, 2025

@romtsn updated the impl to handle span datacategory for client report / rate limiter as well

double checked relay and "span" datacategory is corret here

@github-actions
Copy link
Contributor

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/RateLimiter.java

Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-checked -- looks good!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

🚨 Detected changes in high risk code 🚨

High-risk code has higher potential to break the SDK and may be hard to test. To prevent severe bugs, apply the rollout process for releasing such changes and be extra careful when changing and reviewing these files:

  • sentry/src/main/java/io/sentry/transport/RateLimiter.java

@buenaflor buenaflor enabled auto-merge (squash) November 26, 2025 16:08
@buenaflor buenaflor merged commit fc5ccaf into main Nov 26, 2025
60 of 61 checks passed
@buenaflor buenaflor deleted the feat/support-span-sentry-item-type branch November 26, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants