返回会话 ID 的会话对象。
Syntax
Microsoft.Apm.getSession(sessionId);
参数
| **名字 | 类型 | Required | 说明 |
|---|---|---|---|
| 会话ID | String | 是的 | 会话 ID |
返回值
会话作为对象。
Example
const sessionId = "session-id-1";
const session = Microsoft.Apm.getSession(sessionId);
if (!session.isDefault) {
session.title = "new title";
}