Skip to content

chore: add launch counter for Sentry reporting#7554

Open
mikhail-dcl wants to merge 2 commits intodevfrom
chore/launch_count
Open

chore: add launch counter for Sentry reporting#7554
mikhail-dcl wants to merge 2 commits intodevfrom
chore/launch_count

Conversation

@mikhail-dcl
Copy link
Collaborator

@mikhail-dcl mikhail-dcl commented Mar 13, 2026

Pull Request Description

has_edentity alone doesn't recognize the first launch, as it will report false on re-login.

What does this PR change?

Adds a LaunchCounter class to the analytics domain that persists and increments a launch count across application runs via DCLPlayerPrefs. The count is attached as a tag to the Sentry loading transaction.

Key Changes

  • LaunchCounter static class in Assets/DCL/PerformanceAndDiagnostics/Analytics/ — reads, increments, and persists the count
  • DCLPrefKeys.LAUNCH_COUNT key for persistence
  • LaunchCounter.Increment() called from AnalyticsContainer.CreateAsync alongside CrashDetector.Initialize
  • launch_count tag added to the loading process Sentry transaction in LoadingStatusAnalyticsDecorator
  • has_identity and identity_expired tags also included in the same transaction

Test Instructions

Test Steps

  1. Launch the application
  2. Verify the launch_count tag appears on the loading_process Sentry transaction
  3. Close and relaunch — verify the count increments

Quality Checklist

  • Changes have been tested locally
  • Performance impact has been considered

@mikhail-dcl mikhail-dcl requested review from a team as code owners March 13, 2026 10:59
@github-actions github-actions bot requested review from Ludmilafantaniella, dalkia and mihakrajnc and removed request for dalkia and mihakrajnc March 13, 2026 10:59
@github-actions
Copy link
Contributor

github-actions bot commented Mar 13, 2026

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.

1 participant