नोट
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप साइन इन करने या निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
इस पेज तक पहुँच के लिए प्रमाणन की आवश्यकता होती है. आप निर्देशिकाओं को बदलने का प्रयास कर सकते हैं.
सत्र टेम्पलेट पर आधारित सत्र बनाता है और सत्र का युनीक आइडेंटिफ़ायर लौटाता है.
सिंटैक्स
Microsoft.Apm.createSession(SessionInput);
पैरामीटर्स
| नाम | Type | आवश्य | विवरण |
|---|---|---|---|
| सत्रइनपुट | तार | हां | बनाए जाने वाले सत्र के JSON इनपुट गुण। |
JSON SessionInput पैरामीटर की संरचना इस प्रकार है:
{
/**
* 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;
}
मान देता है
स्ट्रिंग के रूप में सत्र पहचानकर्ता।
उदाहरण
ये उदाहरण पैरामीटर के रूप में एक निकाय रिकॉर्ड पहचानकर्ता और एक सत्र टेम्पलेट पास करने वाला एक नया सत्र बनाने के createSession लिए विधि का उपयोग करते हैं.
एक मूल सत्र बनाएँ
घटना को निकाय नाम, घटना Id को entityId और सत्र टेम्पलेट के अनन्य नाम को templateName के रूप में पास करने वाला एक नया सत्र बनाता है.
नोट
इन विधियों का आह्वान करने वाले उपयोगकर्ता को एक ऐप प्रोफ़ाइल को असाइन किया जाना चाहिए जिसमें सत्र टेम्पलेट शामिल है।
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});
ऐसा सत्र बनाएँ जो फ़ोकस में न हो
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});