• /
  • Log in
  • Free account

currentSessionId (Android SDK API)

Syntax

NewRelic.currentSessionId()

Returns ID for current session.

Requirements

Compatible with all agent versions.

Description

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 to Insights.

Return values

Returns ID string for the current session.

Examples

Return session ID

String sessionId = NewRelic.currentSessionId();
Create issueEdit page
Copyright © 2022 New Relic Inc.