• /
  • ログイン
  • 無料アカウント

currentSessionId (iOS SDK API)

Syntax

currentSessionId;
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 context on how to use this API, see the documentation about sending custom attributes and events to Insights for:

Return values

Returns ID string for the current session.

Examples

Objective-C

Method:

+ (NSString*) currentSessionId;

Example:

NSString* sessionId = [NewRelic currentSessionId()];

Swift

Method:

NewRelic.currentSessionId() -> String

Example:

let sessionId = NewRelic.currentSessionId()

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.