Skip to content

Conversation

bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Aug 28, 2025

Resolves #2235

Note: The flow differs from Editor vs actual build since not all RuntimeInitialization attributes get triggered.

In an actual build this is now the flow:

  1. Init gets triggered by RuntimeInitialization SubsystemRegistration
  2. The SentryUnitySdk initializes the .NET SDK
    unitySdk._dotnetSdk = Sentry.SentrySdk.Init(options);
  3. All integrations get registered
    • NEW The TraceGenerationIntegration refrains from regenerating any traces that would be covered by other integrations
  4. The StartupTracingIntegration creates a transaction and it's child spans
    StartupTracingIntegration.StartTracing();
  5. The first scene loads.
    • Note: For the first scene, the SceneManagerTracingIntegration is not getting invoked. This happens outside of the SceneManagerAPI.
    • This means there is no need to deduplicate between StartupTracing and SceneManagerTracing
  6. For all subsequent scene loading, the SceneManagerTracingIntegration is solely responsible for generating a transaction. Finishing the transaction generates a new trace implicitely.

cursor[bot]

This comment was marked as outdated.

@bitsandfoxes
Copy link
Contributor Author

@sentry review

@bitsandfoxes bitsandfoxes requested a review from a team September 8, 2025 13:38
@bitsandfoxes
Copy link
Contributor Author

@sentry review

@bitsandfoxes bitsandfoxes merged commit 4b15fb8 into main Sep 12, 2025
19 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/trace-generation branch September 12, 2025 10:34
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.

Trace ID generation duplication
3 participants