• English日本語한국어
  • Log inStart now

currentSessionId (Android SDK API)



Returns ID for current session.


Compatible with all agent versions.


Returns the current session ID. This method is useful for consolidating monitoring of app data (not just New Relic data) based on a single session definition and identifier. For example, you might want to use the same identifier for marketing analytics, or user analytics.

For more context on how to use this API, see Send custom attributes and events.

Return values

Returns ID string for the current session.


Return session ID

String sessionId = NewRelic.currentSessionId();
Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.