doc-exports/docs/fg/umn/functiongraph_03_0884.html
Chen, Junjie dac566cf2f FG UMN 20230725 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-04-03 10:30:56 +00:00

24 lines
6.8 KiB
HTML

<a name="functiongraph_03_0884"></a><a name="functiongraph_03_0884"></a>
<h1 class="topictitle1">How Do I Enable Structured Log Query?</h1>
<div id="body0000001509462314"><div class="section" id="functiongraph_03_0884__section1146184916153"><h4 class="sectiontitle">Scenario</h4><p id="functiongraph_03_0884__p1051403184">To check the status of asynchronous invocation requests, view the records by choosing <strong id="functiongraph_03_0884__b2494187133514">Configuration</strong> &gt; <strong id="functiongraph_03_0884__b15940118357">Configure Async Notification</strong> on the function details page, as shown in <a href="#functiongraph_03_0884__fig1760293323818">Figure 1</a>.</p>
<div class="fignone" id="functiongraph_03_0884__fig1760293323818"><a name="functiongraph_03_0884__fig1760293323818"></a><a name="fig1760293323818"></a><span class="figcap"><b>Figure 1 </b>Asynchronous invocation records</span><br><span><img id="functiongraph_03_0884__image5602533203810" src="en-us_image_0000001680007009.png"></span></div>
</div>
<div class="section" id="functiongraph_03_0884__section16301538191610"><h4 class="sectiontitle">Prerequisites</h4><p id="functiongraph_03_0884__p109049332010">You have enabled asynchronous invocation status persistence.</p>
</div>
<div class="section" id="functiongraph_03_0884__section895634911163"><h4 class="sectiontitle">Procedure</h4><ol id="functiongraph_03_0884__ol171517282201"><li id="functiongraph_03_0884__li161521328102018"><span>Contact customer service to add your account to the whitelist of this feature.</span></li><li id="functiongraph_03_0884__li881794112120"><span>On the <strong id="functiongraph_03_0884__b20898141415450">Configure Async Notification</strong> page, click <strong id="functiongraph_03_0884__b1427583619451">Enable LTS</strong>.</span></li><li id="functiongraph_03_0884__li4187131916233"><span>Click <strong id="functiongraph_03_0884__b1374314114612">Edit</strong> next to <strong id="functiongraph_03_0884__b1552113984620">Asynchronous Notification Policy</strong>, and enable <strong id="functiongraph_03_0884__b12764116104711">Asynchronous Invocation Status Persistence</strong>, as shown in <a href="#functiongraph_03_0884__fig113751514015">Figure 2</a> and <a href="#functiongraph_03_0884__fig94071959424">Figure 3</a>.</span><p><div class="fignone" id="functiongraph_03_0884__fig113751514015"><a name="functiongraph_03_0884__fig113751514015"></a><a name="fig113751514015"></a><span class="figcap"><b>Figure 2 </b>Configuring asynchronous notification policy</span><br><span><img id="functiongraph_03_0884__image73762514014" src="en-us_image_0000001680495569.png"></span></div>
<div class="fignone" id="functiongraph_03_0884__fig94071959424"><a name="functiongraph_03_0884__fig94071959424"></a><a name="fig94071959424"></a><span class="figcap"><b>Figure 3 </b>Enabling asynchronous invocation status persistence</span><br><span><img id="functiongraph_03_0884__image124081259823" src="en-us_image_0000001631816488.png"></span></div>
</p></li><li id="functiongraph_03_0884__li28781711172816"><span>Configure structured query on the LTS console.</span><p><ol type="a" id="functiongraph_03_0884__ol13698143173115"><li id="functiongraph_03_0884__li481814271313">On the function details page, view the log group and log stream. Press <strong id="functiongraph_03_0884__b5172229502">F12</strong>, choose <strong id="functiongraph_03_0884__b7666627125014">Network</strong>, enter filter <strong id="functiongraph_03_0884__b12460144905018">async-status-log-detail</strong>, and obtain the log group ID and log stream ID, as shown in <a href="#functiongraph_03_0884__fig5665103123612">Figure 4</a>.<div class="fignone" id="functiongraph_03_0884__fig5665103123612"><a name="functiongraph_03_0884__fig5665103123612"></a><a name="fig5665103123612"></a><span class="figcap"><b>Figure 4 </b>Obtaining log group ID and log stream ID</span><br><span><img id="functiongraph_03_0884__image1166518323617" src="en-us_image_0000001560650613.png"></span></div>
</li><li id="functiongraph_03_0884__li391763613364">On the LTS console, locate the log group and log stream by their IDs.</li><li id="functiongraph_03_0884__li124774910373">On the log stream details page, click the gear icon in the upper right.</li><li id="functiongraph_03_0884__li2275151316395">Configure log structuring.</li><li id="functiongraph_03_0884__li14370191544016">Click <strong id="functiongraph_03_0884__b36508599381">Intelligent Extraction</strong>.</li><li id="functiongraph_03_0884__li134441429134111">Click <span><img id="functiongraph_03_0884__image14262817114212" src="en-us_image_0000001509972086.png"></span> to modify the field definition as follows:<ol class="substepthirdol" id="functiongraph_03_0884__ol34417254512"><li id="functiongraph_03_0884__li1075921664518">Change <strong id="functiongraph_03_0884__b663116281523">field1</strong> to <strong id="functiongraph_03_0884__b1491010331221">function_urn</strong> and its type to <strong id="functiongraph_03_0884__b1940213528214">string</strong>.</li><li id="functiongraph_03_0884__li201118593445">Change <strong id="functiongraph_03_0884__b76372029316">field2</strong> to <strong id="functiongraph_03_0884__b86377215313">request_id</strong> and its type to <strong id="functiongraph_03_0884__b1063815215310">string</strong>.</li><li id="functiongraph_03_0884__li115231829164614">Change <strong id="functiongraph_03_0884__b153571086316">field3</strong> to <strong id="functiongraph_03_0884__b11357168937">seq_status</strong> and its type to <strong id="functiongraph_03_0884__b1535798139">long</strong>.</li><li id="functiongraph_03_0884__li1625524644619">Change <strong id="functiongraph_03_0884__b1686721614313">field4</strong> to <strong id="functiongraph_03_0884__b686718168310">operation_timestamp</strong> and its type to <strong id="functiongraph_03_0884__b78672161335">long</strong>.</li><li id="functiongraph_03_0884__li486217118475">Change <strong id="functiongraph_03_0884__b66856277314">field5</strong> to <strong id="functiongraph_03_0884__b86854271336">error_code</strong> and its type to <strong id="functiongraph_03_0884__b968614271836">long</strong>.</li><li id="functiongraph_03_0884__li7786619104711">Change <strong id="functiongraph_03_0884__b4275435132">field6</strong> to <strong id="functiongraph_03_0884__b142765351838">error_message</strong> and its type to <strong id="functiongraph_03_0884__b18276173518317">string</strong>.</li></ol>
<p id="functiongraph_03_0884__p34291516125611">Enable <strong id="functiongraph_03_0884__b1513310556413">Quick Analysis</strong>.</p>
</li><li id="functiongraph_03_0884__li575015725819">Click <strong id="functiongraph_03_0884__b76290471758">Save</strong>.</li></ol>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_03_0110_00.html">General FAQs</a></div>
</div>
</div>