Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new experimental api to customize the currently visible screen name. #857

Conversation

breedx-splk
Copy link
Contributor

This adds a new api to the SplunkRumBuilder called setExperimentalCurrentScreenCustomizer(). A user can use this to pass a customizer which allows them to take full control over determining the name of the current screen. A new interface called CurrentlyVisibleScreen is introduced, to prevent additional use of or coupling to the existing upstream VisibleScreenTracker. Additionally, a new SpanProcessor called CurrentlyVisibleScreenAttributeSpanProcessor is added (to replace ScreenAttributesAppender), which does not couple to the VisibleScreenTracker but instead uses an instance of CurrentlyVisibleScreen.

Specifying the "current screen name" can be done thought delegation to the existing/default CurrentlyVisibleScreen instance and/or through screen tracking mechanism a user might wish to build.

This is an alternate approach to #851 that does not subclass VisibleScreenTracker. Instead, it uses the more established OpenTelemetry java pattern of allowing the user to pass a customizer. This customizer is given control of determining the name of the "currently visible screen".

This approach is NOT opinionated about specific frameworks (such as Jetpack compose), and there is no built-in tracking of lifecycle for unknown components. The user of this new experimental API is responsible for tracking their own navigation state and determining when a "screen" has changed, and to generate the appropriate events (create, pause, destroy, whatever their framework offers).

@breedx-splk breedx-splk requested review from a team as code owners June 13, 2024 22:48
@breedx-splk
Copy link
Contributor Author

So no feedback on this, let's just go ahead and experiment with #851 then.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant