Skip to content

feat(span-first): add span v2 support for frames tracking#3447

Open
buenaflor wants to merge 40 commits intofeat/span-firstfrom
feat/span/frames-tracking-support
Open

feat(span-first): add span v2 support for frames tracking#3447
buenaflor wants to merge 40 commits intofeat/span-firstfrom
feat/span/frames-tracking-support

Conversation

@buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Jan 14, 2026

📜 Description

Part of span-first

💡 Motivation and Context

Part of #3334

💚 How did you test it?

Manual, unit/widget test

📝 Checklist

  • I reviewed submitted code
  • 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
  • All tests passing
  • No breaking changes

🔮 Next steps

#skip-changelog

@buenaflor buenaflor changed the title [DRAFT] feat(span-first): add span v2 support for frames tracking feat(span-first): add span v2 support for frames tracking Feb 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

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

Generated by 🚫 dangerJS against a0fcebc

@buenaflor buenaflor marked this pull request as ready for review February 3, 2026 12:10
@buenaflor buenaflor requested a review from denrase as a code owner February 3, 2026 12:10
final collector = SpanFrameMetricsCollectorV2(framesTracker,
resumeFrameTracking: () => widgetsBinding.resumeTrackingFrames(),
pauseFrameTracking: () => widgetsBinding.pauseTrackingFrames());
_collector = collector;
Copy link
Collaborator

Choose a reason for hiding this comment

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

We did implement a V2 perfomrce collector, but are not adding it to options, is this correct?

Copy link
Contributor Author

@buenaflor buenaflor Feb 3, 2026

Choose a reason for hiding this comment

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

it's a behaviour difference.

for transactions we add it to the options so we can manually trigger onSpanFinish and onSpanEnded via options.collector.onSpanFinished() but now that we use lifecycle callbacks we dont need to do that anymroe for spanv2 so we dont need to add it to the options

I'll refactor the static version to use lifeecycle callbacks as well

@buenaflor
Copy link
Contributor Author

Would it make sense to use the abstraction InstrumentationSpan instead, or did the logic also change for v2?

I checked and probably not, this specific integration requires lots of concrete specific usages, the abstraction wouldn't help here

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@buenaflor buenaflor requested a review from denrase February 6, 2026 10:31
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.

2 participants