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

Impossible to apply SessionIdRatioBasedSampler after session refactoring #841

Open
GerardPaligot opened this issue Feb 19, 2025 · 1 comment

Comments

@GerardPaligot
Copy link

Now that we should use SessionManager to generate the session id and because ServiceManager getServiceManager from OpenTelemetryRumBuilder or SessionManagerImpl aren't public, it is impossible to call setSampler from SdkTracerProviderBuilder to initialize SessionIdRatioBasedSampler class.

otelRumBuilder.addTracerProviderCustomizer { tracerProvider, _ ->
  return@addTracerProviderCustomizer tracerProvider
    .setSampler(SessionIdRatioBasedSampler(ratio, /* session provider here but we can't get it */))
}
@LikeTheSalad
Copy link
Contributor

cc @breedx-splk @surbhiia @bidetofevil

This sounds related to what we discussed in the last SIG meeting, in which we should allow the session manager to be retrieved from OTel RUM. Then we would be able to enable a lot of use cases by providing the OTel RUM object, including the automatic instrumentation that needs access to the session manager to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants