Oharra
Baimena behar duzu orria atzitzeko. Direktorioetan saioa has dezakezu edo haiek alda ditzakezu.
Baimena behar duzu orria atzitzeko. Direktorioak alda ditzakezu.
Saio batean oinarritutako saioa sortu du, eta saioaren identifikatzaile bakarra itzuliko du.
Sintaxia
Microsoft.Apm.createSession(SessionInput);
Parametroak
| Izena | Idatzi | Beharrezkoa | Azalpena |
|---|---|---|---|
| Saioaren sarrera | Soka | Bai | Sortuko den saioaren JSON sarrera-jabetzak. |
JSON SessionInput parametroaren egitura honako hau da:
{
/**
* Returns the name of the template used in the session
*/
templateName: string;
/**
* additional information for session creation
*/
sessionContext: Map<string, string>;
/**
* will focus after session is created
*/
isFocused?: boolean;
/**
* Indicates whether the session should be restored after creation.
* If set to true, the session is restored in the agent workspace. Else, the session is created without being restored.
*/
shouldRestore?: boolean;
}
Itzulitako balioa
String bezalako saioaren identifikatzailea.
Adibideak
Adibide horietan, saio berri bat sortzeko metodoa createSession erabiltzen da, entitate-erregistroaren identifikatzaile bat eta saio-txantiloi bat parametro gisa erabiliz.
Oinarrizko saio bat sortzea
Saio berri bat sortu du, gertakaria entitate izen gisa, entityId izenarekin izandako intzidenteen identifikatzailea eta saioko langileen izen bakarra tenplateName gisa igaroz.
Oharra
Metodo horiek erabiltzen dituen erabiltzaileak saio-plantilla duen aplikazio-profil bati esleitu behar dio.
x=new Map();
x.set("parametersStr", '[["entityName", "incident"], ["entityId", "11bb11bb-cc22-dd33-ee44-55ff55ff55ff"]]');
Microsoft.Apm.createSession({templateName: "case_entity_session_default_template", sessionContext: x});
Enfokatuta ez dagoen saio bat sortzea
x=new Map();
x.set("parametersStr", '[["entityName", "incident"], ["entityId", "22cc22cc-dd33-ee44-ff55-66aa66aa66aa"]]');
Microsoft.Apm.createSession({templateName: "case_entity_session_default_template", sessionContext: x, isFocused: false});