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 context on how to use this API, see the documentation about sending custom attributes and events to Insights for:
Returns ID string for the current session.
+ (NSString*) currentSessionId;
NSString* sessionId = [NewRelic currentSessionId()];
NewRelic.currentSessionId() -> String
let sessionId = NewRelic.currentSessionId()
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's and and documentation.