<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Valentine's Day hands-on: Heartbeat failed ❤️ in Dynatrace tips</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/271279#M1667</link>
    <description>&lt;P&gt;oh awesome,&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/56833"&gt;@Tiit_Hallas&lt;/a&gt;,&amp;nbsp;thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2025 21:19:50 GMT</pubDate>
    <dc:creator>victoria</dc:creator>
    <dc:date>2025-02-27T21:19:50Z</dc:date>
    <item>
      <title>Valentine's Day hands-on: Heartbeat failed ❤️</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/269851#M1664</link>
      <description>&lt;P data-renderer-start-pos="1"&gt;With Valentine's Day just around the corner, Dynatrace is happy to bring to you: the &lt;STRONG data-renderer-mark="true"&gt;Valentine's Scavenger Hunt&lt;/STRONG&gt;!&lt;/P&gt;
&lt;P data-renderer-start-pos="1"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="banner2.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26379i6625B7B57AFFEFD9/image-size/large?v=v2&amp;amp;px=999" role="button" title="banner2.png" alt="banner2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="115"&gt;This blog post will guide you through a root cause analysis hands-on exercise. Each assignment introduces a goal to reach and steps to follow to reach this goal. You can either solve it by yourself, follow the steps to solve it or just look at the &lt;A class="cc-1rn59kg" title="https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/share/db2971d1-a816-49e5-b35c-d8eb3f9c9f80" href="https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/share/db2971d1-a816-49e5-b35c-d8eb3f9c9f80" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;&lt;U data-renderer-mark="true"&gt;solved investigation&lt;/U&gt;&lt;/A&gt; available in Security Investigator.&lt;/P&gt;
&lt;P data-renderer-start-pos="421"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="423"&gt;In the bustling city of Byteville, Valentine's Day was just around the corner. The air was filled with the scent of roses, and love was in the air—or at least, it was supposed to be. At the heart of Byteville was a quirky little company called "HeartSync," known for its innovative dating app that matched people based on their unique heartbeats.&lt;/P&gt;
&lt;P data-renderer-start-pos="771"&gt;One fateful morning, the HeartSync office was in chaos. Backend services analyzing the heartbeats were not working properly, customers were complaining, and the Dynatrace monitoring reported failures in the services running on the company's Kubernetes cluster.&lt;/P&gt;
&lt;P data-renderer-start-pos="1033"&gt;Without hesitation, Cupid McHeartFace, head of the HeartSync Engineering Department, called you, the best log forensics person, in the hope of assistance: maybe you can help them analyze the logs and traces to figure out what actually happened and what caused this madness on a day filled with hopes and dreams!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2 id="Background" data-renderer-start-pos="1346"&gt;Background&lt;/H2&gt;
&lt;P data-renderer-start-pos="1346"&gt;The service we’re about to investigate is running as a container called “&lt;STRONG data-renderer-mark="true"&gt;heartbeat-matcher-service&lt;/STRONG&gt;” in a pod “&lt;STRONG data-renderer-mark="true"&gt;heartbeat-matcher-service-78f6c784c9-2g77v&lt;/STRONG&gt;“ that runs in a Kubernetes cluster “&lt;STRONG data-renderer-mark="true"&gt;prod.cupid.cluster&lt;/STRONG&gt;“. Inbound connections to the service are managed by Istio, which runs in a container called “&lt;STRONG data-renderer-mark="true"&gt;istio-proxy&lt;/STRONG&gt;” in the same pod. All logs from the infrastructure are ingested to Dynatrace.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2 id="Logs" data-renderer-start-pos="1750"&gt;Logs&lt;/H2&gt;
&lt;P data-renderer-start-pos="1750"&gt;All logs have the &lt;A class="cc-1rn59kg" title="https://www.dynatrace.com/platform/application-topology-discovery/smartscape/" href="https://www.dynatrace.com/platform/application-topology-discovery/smartscape/" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;SmartScape&lt;/A&gt; metadata fields attached to them. All logs have the cluster name “&lt;STRONG data-renderer-mark="true"&gt;prod.cupid.cluster&lt;/STRONG&gt;“ set in the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;k8s.cluster.name&lt;/CODE&gt; field, pod names are in the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;k8s.kubernetes.pod&lt;/CODE&gt; fields. Logs sent from the containers &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;stdout&lt;/CODE&gt; have the container name shown in the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;k8s.container.name&lt;/CODE&gt; field. Kubernetes console output logs can be found using the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;dt.process.name&lt;/CODE&gt; value “&lt;STRONG data-renderer-mark="true"&gt;Linux System&lt;/STRONG&gt;”.&lt;/P&gt;
&lt;P data-renderer-start-pos="2148"&gt;Examples from the logs that we’re using during this hands-on are as follows:&lt;/P&gt;
&lt;H3 id="Istio-log-example" data-renderer-start-pos="2227"&gt;Istio log example&lt;/H3&gt;
&lt;P data-renderer-start-pos="2227"&gt;The &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;content&lt;/CODE&gt; of an istio sample request looks like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;{ &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt; &lt;BR /&gt;"bytes_received":1499, &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt; &lt;BR /&gt;"hostname":"heartbeat-matcher-service-78f6c784c9-2g77v", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt; &lt;BR /&gt;"method":"GET", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt; &lt;BR /&gt;"upstream_transport_failure_reason":null, &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-6" data-ds--code--row=""&gt; &lt;BR /&gt;"response_code":200, &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-7" data-ds--code--row=""&gt; "upstream_remote_port":8080, &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-8" data-ds--code--row=""&gt; "path":"/users/henry/", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-9" data-ds--code--row=""&gt; &lt;BR /&gt;"downstream_local_port":8080, &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-10" data-ds--code--row=""&gt; "time":"2025-02-14T05:31:11.033Z", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-11" data-ds--code--row=""&gt; &lt;BR /&gt;"log_type":"accesslog", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-12" data-ds--code--row=""&gt; "user_agent":"heartbeat.dating.app", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-13" data-ds--code--row=""&gt; &lt;BR /&gt;"downstream_protocol":"HTTP/1.1", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-14" data-ds--code--row=""&gt; &lt;BR /&gt;"upsteam_protocol":"HTTP/1.1", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-15" data-ds--code--row=""&gt; &lt;BR /&gt;"upstream_local_port":50840, &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-16" data-ds--code--row=""&gt; &lt;BR /&gt;"downstream_tls_version":"TLSv1.3","duration":33,"response_flags":"-", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-17" data-ds--code--row=""&gt; &lt;BR /&gt;"upstream_remote_address":"100.124.40.190", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-18" data-ds--code--row=""&gt; &lt;BR /&gt;"downstream_remote_address":"10.178.165.253", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-19" data-ds--code--row=""&gt; &lt;BR /&gt;"start_time":"2025-02-14T05:31:11.000Z", &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-20" data-ds--code--row=""&gt; &lt;BR /&gt;"bytes_sent":0&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-21" data-ds--code--row=""&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;H3 role="presentation"&gt;&lt;SPAN&gt;&lt;BR /&gt;Application GET request example&lt;BR /&gt;&lt;/SPAN&gt;&lt;/H3&gt;
&lt;DIV role="presentation"&gt;&lt;SPAN&gt;Additionally, to istio logs, a &lt;/SPAN&gt;&lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;GET&lt;/CODE&gt;&lt;SPAN&gt; request is logged by an application with the following log lines:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;2025-02-14T06:13:49.000Z INFO HB-CTX c.d.p.p.i.http.ApiLoggingInterceptor : Request@inbound: Method=GET RequestURI=/users/noah/ AuthHdrLen=1024 &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;2025-02-14T06:13:49.030Z INFO HB-CTX c.d.p.p.i.http.ApiLoggingInterceptor : Response@inbound: Status=200&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;H3 id="Application-POST-request-example" data-renderer-start-pos="3388"&gt;&lt;BR /&gt;Application POST request example&lt;/H3&gt;
&lt;P data-renderer-start-pos="3388"&gt;A &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;POST&lt;/CODE&gt; request is logged by an application by the following log lines:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;2025-02-14T06:13:50.000Z INFO HB-CTX c.d.p.p.i.http.ApiLoggingInterceptor : Request@inbound: Method=POST RequestURI=/users/mia/beats/ AuthHdrLen=1024 &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;2025-02-14T06:13:50.071Z INFO HB-CTX c.d.p.s.d.s.i.HeartbeatAnalyzer : Analysing heartrate batch. Frames: 11, beats: 22 &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;2025-02-14T06:13:50.071Z DEBUG HB-CTX c.d.p.s.d.s.i.HeartbeatAnalyzer : Heartbeat Fragment: 1010000010100000101000001010000010100000101000001010000010100000101000001010000010100000 &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;2025-02-14T06:13:50.439Z INFO HB-CTX c.d.p.s.d.s.i.HeartbeatAnalyzer : Processing done, adding to matching queue, workflow id: a6402a01-0866-4272-8b30-03de86268781 &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;2025-02-14T06:13:50.442Z INFO HB-CTX c.d.p.p.i.http.ApiLoggingInterceptor : Response@inbound: Status=200&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV role="presentation"&gt;
&lt;H1&gt;&lt;SPAN&gt;&lt;BR /&gt;Scenario&lt;/SPAN&gt;&lt;/H1&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="4239"&gt;Mr. McHeartFace informs you that Dynatrace has created a ticket for them about a &lt;A class="cc-1rn59kg" title="https://docs.dynatrace.com/docs/discover-dynatrace/platform/davis-ai" href="https://docs.dynatrace.com/docs/discover-dynatrace/platform/davis-ai" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;Problem&lt;/A&gt; that Davis® AI has detected. It seems that &lt;STRONG data-renderer-mark="true"&gt;failure rate for web requests&lt;/STRONG&gt; in the heartbeat-service peaked somewhere &lt;STRONG data-renderer-mark="true"&gt;between 5AM and 6AM&lt;/STRONG&gt; (UTC). He asked if you could help them to get to the bottom of this.&lt;/P&gt;
&lt;P data-renderer-start-pos="4534"&gt;From the Problem description, you see that a bunch of web requests got an &lt;STRONG data-renderer-mark="true"&gt;error 503&lt;/STRONG&gt; as a response for some reason, which triggered the problem creation. Can you find out why this has happened?&lt;/P&gt;
&lt;P data-renderer-start-pos="4729"&gt;You can use the &lt;A class="cc-1rn59kg" title="http://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/?_gl=1*flyr00*_gcl_aw*R0NMLjE3MzU4MjU3NjguQ2owS0NRaUFqOW03QmhEMUFSSXNBTnNJSXZCMU5sblR6cFh4TnRJTktzMTdLdTBZVG94THBpOV96OGtVQXJhUHVnMHQ4dXpmNWl1RU9SZ2FBbzVzRUFMd193Y0I.*_gcl_dc*R0NMLjE3MzU4MjU3NjguQ2owS0NRaUFqOW03QmhEMUFSSXNBTnNJSXZCMU5sblR6cFh4TnRJTktzMTdLdTBZVG94THBpOV96OGtVQXJhUHVnMHQ4dXpmNWl1RU9SZ2FBbzVzRUFMd193Y0I.*_gcl_au*MjQ0NTk3MDEuMTczODIzMTEyMw..*_ga*MTQ3NDE3ODA3OC4xNzI4ODg3NzMy*_ga_1MEMV02JXV*MTczODMyMDUxNC4xODMuMC4xNzM4MzIwNTE0LjAuMC4w" href="http://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/?_gl=1*flyr00*_gcl_aw*R0NMLjE3MzU4MjU3NjguQ2owS0NRaUFqOW03QmhEMUFSSXNBTnNJSXZCMU5sblR6cFh4TnRJTktzMTdLdTBZVG94THBpOV96OGtVQXJhUHVnMHQ4dXpmNWl1RU9SZ2FBbzVzRUFMd193Y0I.*_gcl_dc*R0NMLjE3MzU4MjU3NjguQ2owS0NRaUFqOW03QmhEMUFSSXNBTnNJSXZCMU5sblR6cFh4TnRJTktzMTdLdTBZVG94THBpOV96OGtVQXJhUHVnMHQ4dXpmNWl1RU9SZ2FBbzVzRUFMd193Y0I.*_gcl_au*MjQ0NTk3MDEuMTczODIzMTEyMw..*_ga*MTQ3NDE3ODA3OC4xNzI4ODg3NzMy*_ga_1MEMV02JXV*MTczODMyMDUxNC4xODMuMC4xNzM4MzIwNTE0LjAuMC4w" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;Dynatrace Security Investigator&lt;/A&gt; in &lt;A class="cc-1rn59kg" title="https://www.dynatrace.com/signup/playground/" href="https://www.dynatrace.com/signup/playground/" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;Dynatrace Playground&lt;/A&gt; to conduct the log analysis.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-renderer-start-pos="4831"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="bf6d5a1c-de75-4fd2-b0e7-8d5e0a4579e0.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26348i6F92AE2C2F23524E/image-size/large?v=v2&amp;amp;px=999" role="button" title="bf6d5a1c-de75-4fd2-b0e7-8d5e0a4579e0.png" alt="bf6d5a1c-de75-4fd2-b0e7-8d5e0a4579e0.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="Let’s-start-the-investigation" data-renderer-start-pos="4836"&gt;Let’s start the investigation&lt;/H1&gt;
&lt;P data-renderer-start-pos="4836"&gt;With no time to waste, let’s start with the investigation to find the root cause of these weird events that are disrupting our service!&lt;/P&gt;
&lt;H2 id="Find-logs-from-Grail" data-renderer-start-pos="5004"&gt;Find logs from Grail&lt;/H2&gt;
&lt;P data-renderer-start-pos="5004"&gt;Let's see if we can find any logs from the cluster &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;prod.cupid.cluster&lt;/CODE&gt; around the problem's timeframe between 5 AM and 6 AM UTC. To do that, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5189"&gt;Go to the &lt;A class="cc-1rn59kg" title="https://www.dynatrace.com/signup/playground/" href="https://www.dynatrace.com/signup/playground/" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;&lt;U data-renderer-mark="true"&gt;Dynatrace Playground&lt;/U&gt;&lt;/A&gt; environment and start the &lt;A class="cc-1rn59kg" title="https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/" href="https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;&lt;U data-renderer-mark="true"&gt;Security Investigator.&lt;/U&gt;&lt;/A&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5271"&gt;Choose the &lt;STRONG data-renderer-mark="true"&gt;+ Case&lt;/STRONG&gt; to start a new Investigation.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5322"&gt;Give your case a fancy name by clicking on the current case name “&lt;STRONG data-renderer-mark="true"&gt;Untitled case&lt;/STRONG&gt;” in the top area.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5422"&gt;Create a &lt;STRONG data-renderer-mark="true"&gt;custom timeframe&lt;/STRONG&gt;:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="2"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5452"&gt;Open the &lt;STRONG data-renderer-mark="true"&gt;Timeframe editor.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5481"&gt;Choose the timeframe between &lt;STRONG data-renderer-mark="true"&gt;5 AM&lt;/STRONG&gt; to &lt;STRONG data-renderer-mark="true"&gt;7 AM&lt;/STRONG&gt; morning (UTC) from Yesterday.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5555"&gt;Click &lt;STRONG data-renderer-mark="true"&gt;Save.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5569"&gt;Name the timeframe “&lt;STRONG data-renderer-mark="true"&gt;incident timeframe&lt;/STRONG&gt;”.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG data-renderer-mark="true"&gt;PS! &lt;/STRONG&gt;Yes, I actually mean “&lt;EM data-renderer-mark="true"&gt;yesterday&lt;/EM&gt;.” So, if you’re doing the walk-through on 15.02.2025, set the timeframe from &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;2025-02-14T05:00:00Z&lt;/CODE&gt; to &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;2025-02-14T05:59:59Z&lt;/CODE&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG data-renderer-mark="true"&gt;PPS!&lt;/STRONG&gt; Keep in mind that it’s &lt;STRONG data-renderer-mark="true"&gt;UTC time&lt;/STRONG&gt;! If you are using local time in Security Investigator, then either &lt;MARK id="3e25ff0e-52a4-4f4d-a895-ae49d86d521a" class="cc-4skef7" aria-disabled="true" data-renderer-mark="true" data-mark-type="annotation" data-mark-annotation-type="inlineComment" data-id="3e25ff0e-52a4-4f4d-a895-ae49d86d521a" data-mark-annotation-state="resolved" data-has-focus="false" data-is-hovered="false"&gt;change the timezone in settings&lt;/MARK&gt; or translate the UTC timestamp to your local time.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="5964"&gt;Choose the “&lt;STRONG data-renderer-mark="true"&gt;incident timeframe&lt;/STRONG&gt;” you’ve just created from the custom timeframes section and click &lt;STRONG data-renderer-mark="true"&gt;Apply&lt;/STRONG&gt; to activate the custom timeframe. You will see the timeframe selected in the timeframe selector component, as shown in the image.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="e45cb35b-d59d-4084-a377-ac487722c82b.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26349i931149CF02737D02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e45cb35b-d59d-4084-a377-ac487722c82b.png" alt="e45cb35b-d59d-4084-a377-ac487722c82b.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="6204"&gt;Fetch logs for the k8s cluster called &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;prod.cupid.cluster&lt;/CODE&gt;. You can do it by using the following DQL query:&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;PRE&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="6375"&gt;&lt;BR /&gt;Nice! You got a bunch of logs as a result! Let's aggregate the results to see if all the relevant logs described in the “&lt;STRONG data-renderer-mark="true"&gt;Background&lt;/STRONG&gt;” section are available from Grail.&lt;/P&gt;
&lt;P data-renderer-start-pos="6544"&gt;To do that, add the following &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;summarize&lt;/CODE&gt; command to the query and click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt;.&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN&gt;| summarize count(), by: { k8s.cluster.name, k8s.container.name, dt.process.name }&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="6705"&gt;You should see the following result:&lt;/P&gt;
&lt;DIV class="rich-media-item mediaSingleView-content-wrap image-center cc-1yc7jgi" data-layout="center" data-width="760" data-width-type="pixel" data-node-type="mediaSingle" data-renderer-start-pos="6743"&gt;
&lt;DIV class="cc-ysg9ko"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image-20250130-203235.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26350i7EC1C1FD2B5A4B73/image-size/large?v=v2&amp;amp;px=999" role="button" title="image-20250130-203235.png" alt="image-20250130-203235.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="6746"&gt;Right-click on the query node you’ve just created and &lt;STRONG data-renderer-mark="true"&gt;rename&lt;/STRONG&gt; the node to “&lt;STRONG data-renderer-mark="true"&gt;Log sources&lt;/STRONG&gt;”.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2 id="Fetch-the-ISTIO-logs" data-renderer-start-pos="6835"&gt;Fetch the ISTIO logs&lt;/H2&gt;
&lt;P data-renderer-start-pos="6835"&gt;Cool! Logs are visible in Grail, and we can access them, so let's kick off the investigation! Let's continue and fetch &lt;STRONG data-renderer-mark="true"&gt;istio container logs&lt;/STRONG&gt;. To do that, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="7033"&gt;Remove the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;summarize&lt;/CODE&gt; command from the end of your DQL query.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="7096"&gt;Right-click on the “&lt;STRONG data-renderer-mark="true"&gt;istio-proxy&lt;/STRONG&gt;“ value in the results table and choose &lt;STRONG data-renderer-mark="true"&gt;Filter&lt;/STRONG&gt;. A &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command will be added to your DQL query automatically.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="7241"&gt;Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the constructed query.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;H2 id="Web-Request-response-code-distribution" data-renderer-start-pos="7287"&gt;Web Request response code distribution&lt;/H2&gt;
&lt;P data-renderer-start-pos="7287"&gt;OK, there are a lot of them, and it would be really time-consuming to go through them all manually. So, instead, let's visualize the data by viewing the response codes as metrics. This enables us to quickly understand how response errors are distributed over time and how they affect each other.&lt;/P&gt;
&lt;P data-renderer-start-pos="7287"&gt;To do that, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="7660"&gt;Extract the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;response_code&lt;/CODE&gt; value from the istio JSON formatted log record by adding the following &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;parse&lt;/CODE&gt; command to the query:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| parse content, "json{int:response_code}(flat=true)"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="7841"&gt;The command will convert the log record to a JSON object and extract the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;response_code&lt;/CODE&gt; value from it as an integer value. The extracted value is displayed as a new column in the results table.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="8037"&gt;Create a metric from the field values by using the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;makeTimeseries&lt;/CODE&gt; command. Use the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;response_code&lt;/CODE&gt; as the metric and use a 1-minute &lt;STRONG data-renderer-mark="true"&gt;interval&lt;/STRONG&gt; for the series. The following DQL snippet can be used for this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| makeTimeseries count(default: 0), by: response=toString(response_code), interval: 1m&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="8331"&gt;The final DQL query you’ve just constructed looks like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter k8s.container.name == "istio-proxy"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;| parse content, "json{int:response_code}(flat=true)"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;| makeTimeseries count(default: 0), by: response=toString(response_code), interval: 1m&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the query and choose the &lt;STRONG data-renderer-mark="true"&gt;Chart&lt;/STRONG&gt; tab to view the results as a visualized chart.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;P data-renderer-start-pos="8741"&gt;The output looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="03ee8f06-3f07-4df9-99ad-95bbcb9009dd.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26357i406001B2C7902E6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="03ee8f06-3f07-4df9-99ad-95bbcb9009dd.png" alt="03ee8f06-3f07-4df9-99ad-95bbcb9009dd.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P data-renderer-start-pos="8774"&gt;&lt;BR /&gt;Right-click on the query node in the query tree and rename the node “&lt;STRONG data-renderer-mark="true"&gt;Response code distribution&lt;/STRONG&gt;”&lt;/P&gt;
&lt;H2 id="What-happened-before-the-first-503" data-renderer-start-pos="8872"&gt;&lt;BR /&gt;What happened before the first 503&lt;/H2&gt;
&lt;P data-renderer-start-pos="8872"&gt;Let's read a bit about the error itself. As written in &lt;A class="cc-1rn59kg" title="https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.4" href="https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.4" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;RFC7231&lt;/A&gt;, the response code &lt;A class="cc-1rn59kg" title="https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.4" href="https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.4" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;503 (Service Unavailable)&lt;/A&gt; indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. In other words, a request that results in a response 503 is &lt;STRONG data-renderer-mark="true"&gt;not the cause&lt;/STRONG&gt; of the problem but is only an indication that &lt;STRONG data-renderer-mark="true"&gt;something has already broken the service&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P data-renderer-start-pos="9351"&gt;To find out what caused the service problems, let's examine the events that occurred before the first request, which received a response of 503.&lt;/P&gt;
&lt;P data-renderer-start-pos="9498"&gt;To do that, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="9533"&gt;Remove the last line from the query that contains the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;makeTimeseries&lt;/CODE&gt; command.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="9613"&gt;Add a filter command to retrieve only requests, which results in response code &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;503&lt;/CODE&gt;. You can do this by adding the following command to your query:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| filter response_code == 503&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;To get only the first timestamp, let's add a summarize command that takes the minimum &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;timestamp&lt;/CODE&gt; value from all of the results. You can do this by adding the following command to your query:&lt;/DIV&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| summarize timestamp = min(timestamp)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV role="presentation"&gt;
&lt;DIV&gt;&lt;STRONG style="font-family: inherit;" data-renderer-mark="true"&gt;PS!&lt;/STRONG&gt;&lt;SPAN&gt; Notice that we added an alias for the &lt;/SPAN&gt;&lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;min(timestamp)&lt;/CODE&gt;&lt;SPAN&gt; result: the &lt;/SPAN&gt;&lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;timestamp = &lt;/CODE&gt;&lt;SPAN&gt; in front of the function gives the field a new name.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="10165"&gt;Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the query.&lt;/P&gt;
&lt;P data-renderer-start-pos="10198"&gt;Now that we have the timestamp for the first 503 response, let's construct a DQL query to fetch events that happened &lt;STRONG data-renderer-mark="true"&gt;before&lt;/STRONG&gt; that. To do this, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="10364"&gt;Remove the last two lines from the query that contains the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; for the 503 response code and the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;summarize&lt;/CODE&gt; commands.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="10486"&gt;Right-click on the timestamp value in the results table, and choose &lt;STRONG data-renderer-mark="true"&gt;Timestamp filters&lt;/STRONG&gt; → &lt;STRONG data-renderer-mark="true"&gt;Earlier than&lt;/STRONG&gt;. The DQL query looks now like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter k8s.container.name == "istio-proxy"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;| parse content, "json{int:response_code}(flat=true)"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;| filter timestamp &amp;lt; toTimestamp("2025-02-14T05:32:01.000000000Z")&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="10855"&gt;Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the DQL query.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="10893"&gt;Yeah, well. OK, we still have a lot of requests to go through, but it seems that many of them result in either &lt;STRONG data-renderer-mark="true"&gt;200 &lt;/STRONG&gt;(OK) or &lt;STRONG data-renderer-mark="true"&gt;401&lt;/STRONG&gt; (Unauthorized), which might not be that interesting for us at this point.&lt;/P&gt;
&lt;P data-renderer-start-pos="11096"&gt;Let's change the &lt;STRONG data-renderer-mark="true"&gt;color of this node to blue&lt;/STRONG&gt; for future reference and &lt;STRONG data-renderer-mark="true"&gt;filter&lt;/STRONG&gt; the 200 and 401 events out to see if we have anything interesting left.&lt;/P&gt;
&lt;P data-renderer-start-pos="11245"&gt;To set the node color, right-click on the &lt;STRONG data-renderer-mark="true"&gt;active node&lt;/STRONG&gt;, choose &lt;STRONG data-renderer-mark="true"&gt;Color,&lt;/STRONG&gt; and select the &lt;STRONG data-renderer-mark="true"&gt;blue color&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P data-renderer-start-pos="11342"&gt;To create the described filter, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="11397"&gt;Hold down the &lt;STRONG data-renderer-mark="true"&gt;Ctrl&lt;/STRONG&gt; (&lt;STRONG data-renderer-mark="true"&gt;Cmd&lt;/STRONG&gt; for Macbook users) key on your keyboard.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="11464"&gt;Choose the values 401 and 200 from the results table.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="11520"&gt;Right-click on either of them and choose &lt;STRONG data-renderer-mark="true"&gt;Filter.&lt;/STRONG&gt;&lt;BR /&gt;The following &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command will be automatically added to the query:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| filter in(response_code, {200, 401})&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="11684"&gt;Add a &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;not&lt;/CODE&gt; condition to the filter you created in the last step to exclude the records containing these records from your results. The filtering statement would look like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| filter not in(response_code, {200, 401})&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="11908"&gt;Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the query.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="11943"&gt;No results … Okay, let's set the node color to &lt;STRONG data-renderer-mark="true"&gt;orange&lt;/STRONG&gt; for future reference. Right-click on the node and choose the &lt;STRONG data-renderer-mark="true"&gt;orange &lt;/STRONG&gt;color from the color menu.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2 id="Let's-check-the-response-latency" data-renderer-start-pos="12093"&gt;Let's check the response latency&lt;/H2&gt;
&lt;P data-renderer-start-pos="12093"&gt;OK, but maybe it is related to the requests that resulted in either 200 or 401. Let's analyze the response latency to see if something suspicious stands out. Let’s generate the &lt;STRONG data-renderer-mark="true"&gt;average response time&lt;/STRONG&gt; and &lt;STRONG data-renderer-mark="true"&gt;maximum response time&lt;/STRONG&gt; metrics from these log records.&lt;/P&gt;
&lt;P data-renderer-start-pos="12385"&gt;To do that, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="12420"&gt;Navigate back to the &lt;STRONG data-renderer-mark="true"&gt;blue node&lt;/STRONG&gt; you created before&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="12473"&gt;Change the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;parse&lt;/CODE&gt; command to extract the &lt;STRONG data-renderer-mark="true"&gt;duration&lt;/STRONG&gt; from istio logs as well. You can do so by using the following DPL pattern instead of the previous one:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;json{string:response_code, int:duration}(flat=true)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="12682"&gt;To extract metrics from logs, we can use the following &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;makeTimeseries&lt;/CODE&gt; command as follows:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="fontSizeMedium"&gt;&lt;SPAN&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| makeTimeseries {avg(duration), max(duration)}, interval:1m&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="12837"&gt;The final DQL query looks like this.&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter k8s.container.name == "istio-proxy"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;| parse content, "json{string:response_code, int:duration}(flat=true)"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;| filter timestamp &amp;lt; toTimestamp("2025-02-14T05:32:01.000000000Z")
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-6" data-ds--code--row=""&gt;| makeTimeseries {avg(duration), max(duration)}, interval:1m&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P data-renderer-start-pos="13181"&gt;The result visualized as a &lt;STRONG data-renderer-mark="true"&gt;chart&lt;/STRONG&gt; looks something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="4c7c6e30-2e83-45d3-a9b1-a20dc45c1b06.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26358i991FA5102412A234/image-size/large?v=v2&amp;amp;px=999" role="button" title="4c7c6e30-2e83-45d3-a9b1-a20dc45c1b06.png" alt="4c7c6e30-2e83-45d3-a9b1-a20dc45c1b06.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="13245"&gt;Right-click on the node and name it “&lt;STRONG data-renderer-mark="true"&gt;response latency chart&lt;/STRONG&gt;”&lt;/P&gt;
&lt;P data-renderer-start-pos="13307"&gt;Looking at the charts, nothing stands out. Everything seems to be within normal deviance thresholds. But what might have caused the incident?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2 id="When-are-the-events-logged-by-istio?" data-renderer-start-pos="13450"&gt;When are the events logged by istio?&lt;/H2&gt;
&lt;P data-renderer-start-pos="13488"&gt;When looking at the istio log sample in the “&lt;STRONG data-renderer-mark="true"&gt;Background&lt;/STRONG&gt;” section, we see two interesting fields in the logged event: &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;duration&lt;/CODE&gt; and &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;start_time&lt;/CODE&gt;. Since the log records contain the response and duration for the request, we can assume that the events are generated and &lt;STRONG data-renderer-mark="true"&gt;logged at the end of the transaction&lt;/STRONG&gt; after the response has been received. But what time does the timestamp represent, then?&lt;/P&gt;
&lt;P data-renderer-start-pos="13877"&gt;Looking at the event, it seems that the timestamp field we used earlier represents the &lt;STRONG data-renderer-mark="true"&gt;end of the transaction&lt;/STRONG&gt; (when a request has received its response). This means that it is possible that our suspicious request has taken quite a long time to get its response and might appear in the logs &lt;STRONG data-renderer-mark="true"&gt;after the first 503 event&lt;/STRONG&gt;. To verify this theory, let’s look at the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;start_time&lt;/CODE&gt; field instead of &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;timestamp&lt;/CODE&gt; and look for events based on that.&lt;/P&gt;
&lt;P data-renderer-start-pos="14309"&gt;To do that, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="14344"&gt;Navigate back to the &lt;STRONG data-renderer-mark="true"&gt;first orange&lt;/STRONG&gt; node we created earlier.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="14405"&gt;Modify the DPL pattern in the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;parse&lt;/CODE&gt; command so it will extract the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;start_date&lt;/CODE&gt; value as a new field using the following DPL pattern:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;json{int:response_code, timestamp('yyyy-MM-ddTHH:mm:ss.SZ'):start_time}(flat=true)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
This DPL expression will extract the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;response_code&lt;/CODE&gt; and &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;start_time&lt;/CODE&gt; values from the JSON object with &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;integer&lt;/CODE&gt; and &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;timestamp&lt;/CODE&gt; types, respectively.&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="14767"&gt;In the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command after the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;parse&lt;/CODE&gt; command, change the field name from &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;timestamp&lt;/CODE&gt; to &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;start_time&lt;/CODE&gt;. The final query should look like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter k8s.container.name == "istio-proxy"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;| parse content, "json{int:response_code, timestamp('yyyy-MM-ddTHH:mm:ss.SZ'):start_time}(flat=true)"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;| filter start_time &amp;lt; toTimestamp("2025-02-14T05:32:01.000000000Z")
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-6" data-ds--code--row=""&gt;| filter not in(response_code, {200, 401})&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the query&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="15260"&gt;OK, cool, we got something! This time, the response is &lt;STRONG data-renderer-mark="true"&gt;not&lt;/STRONG&gt; empty! For some reason, there is a single event that resulted in a status &lt;STRONG data-renderer-mark="true"&gt;500 (Server Error)&lt;/STRONG&gt;! You can look at the JSON payload closer by right-clicking on the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;content&lt;/CODE&gt; field and choosing &lt;STRONG data-renderer-mark="true"&gt;View field details&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="9f93572d-9edb-4e18-b9ca-7fe18eb339e6.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26359i29A758A27272A40E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="9f93572d-9edb-4e18-b9ca-7fe18eb339e6.png" alt="9f93572d-9edb-4e18-b9ca-7fe18eb339e6.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="rich-media-item mediaSingleView-content-wrap image-center cc-dixdpw" data-layout="center" data-width="746" data-width-type="pixel" data-node-type="mediaSingle" data-renderer-start-pos="15526"&gt;
&lt;DIV class="cc-vqsm1i"&gt;
&lt;DIV data-type="file" data-node-type="media" data-width="746" data-height="621" data-id="37261535-58db-48e6-80ca-ad700f3022fd" data-collection="contentId-924876958" data-file-name="image-20250205-213317.png" data-file-size="293317" data-file-mime-type="image/png" data-alt="image-20250205-213317.png" data-renderer-start-pos="15527" data-context-id="924876958"&gt;
&lt;DIV id="newFileExperienceWrapper" class="new-file-experience-wrapper cc-mr0svm" data-testid="media-card-view" data-media-vc-wrapper="true"&gt;
&lt;DIV class="media-file-card-view cc-z40uwk" data-testid="media-file-card-view" data-test-status="complete" data-test-source="remote" data-test-media-name="image-20250205-213317.png" data-test-progress="1"&gt;&lt;SPAN&gt;Let's change the &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;" data-renderer-mark="true"&gt;node color to green&lt;/STRONG&gt;&lt;SPAN&gt; and continue to look deeper into the request.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="15614"&gt;By now, your query tree should look something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="0d5770d9-ae87-41c7-9ed2-ae7e90488dfd.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26360iF12CEF822A5C92F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="0d5770d9-ae87-41c7-9ed2-ae7e90488dfd.png" alt="0d5770d9-ae87-41c7-9ed2-ae7e90488dfd.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="What-was-executed-with-the-request?" data-renderer-start-pos="15675"&gt;What was executed with the request?&lt;/H2&gt;
&lt;P data-renderer-start-pos="15675"&gt;Let's try to find out what happened during this request in our systems. The easiest way to do that is to use Dynatraces' &lt;A class="cc-1rn59kg" title="https://docs.dynatrace.com/docs/analyze-explore-automate/distributed-tracing" href="https://docs.dynatrace.com/docs/analyze-explore-automate/distributed-tracing" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;Distributed Tracing&lt;/A&gt;, which creates spans and traces for every request that it is monitoring. Luckily, we have trace_ids attached to our log events.&lt;/P&gt;
&lt;P data-renderer-start-pos="15982"&gt;First, let's save the &lt;STRONG data-renderer-mark="true"&gt;trace_id&lt;/STRONG&gt; from the suspicious error 500 events as evidence. You can do so by right-clicking on the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;trace_id&lt;/CODE&gt; value in the results table and choosing &lt;STRONG data-renderer-mark="true"&gt;Add to evidence list&lt;/STRONG&gt; → &lt;STRONG data-renderer-mark="true"&gt;Create a new list&lt;/STRONG&gt;. Name the list as “&lt;STRONG data-renderer-mark="true"&gt;errors trace&lt;/STRONG&gt;”. Now we can use this trace_id to create filters on any query node.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="bd36e628-7d3a-4478-a238-47c9c180fbfb.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26361i790F5ECFAAA162CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bd36e628-7d3a-4478-a238-47c9c180fbfb.png" alt="bd36e628-7d3a-4478-a238-47c9c180fbfb.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="16297"&gt;To start searching for the log records matching this trace_id, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="16383"&gt;Navigate to the &lt;STRONG data-renderer-mark="true"&gt;first node&lt;/STRONG&gt; at the top of the query tree where we had all the logs from our k8s cluster.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="16489"&gt;Add a &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command to the DQL query by clicking on the “&lt;STRONG data-renderer-mark="true"&gt;errors trace&lt;/STRONG&gt;” Evicende list menu, choose &lt;STRONG data-renderer-mark="true"&gt;Filter for,&lt;/STRONG&gt; and choose &lt;STRONG data-renderer-mark="true"&gt;Filter within field “trace_id”.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="c3c0f792-0612-4ab4-8694-b9fb082019ff.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26362iD08A7E94E502879A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="c3c0f792-0612-4ab4-8694-b9fb082019ff.png" alt="c3c0f792-0612-4ab4-8694-b9fb082019ff.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="16648"&gt;The DQL query you’ve just constructed looks like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter matchesValue(trace_id, "*e0f28a67b2854b1fa8442d9df9f3deeb*")&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the created query.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;P data-renderer-start-pos="16876"&gt;A new branch is created for the first node, which has all the events from this trace so we can dig deeper. Set the node color to &lt;STRONG data-renderer-mark="true"&gt;purple&lt;/STRONG&gt; so we can reference it later.&lt;/P&gt;
&lt;P data-renderer-start-pos="17044"&gt;Enable the &lt;STRONG data-renderer-mark="true"&gt;multiline mode&lt;/STRONG&gt; for the column from the Column menu at the top of the results table to simplify reading the logs. This will give a better overview of multiline logs, such as stack traces and other longer and structured logs.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="43db7ae3-9784-41d8-84ba-9766b80bbf77.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26363i7AFD19DB12C8B99A/image-size/large?v=v2&amp;amp;px=999" role="button" title="43db7ae3-9784-41d8-84ba-9766b80bbf77.png" alt="43db7ae3-9784-41d8-84ba-9766b80bbf77.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="17284"&gt;Another good option for viewing multiline logs would be to open &lt;STRONG data-renderer-mark="true"&gt;Field Details&lt;/STRONG&gt; view from the fields context menu and navigate between the log records using the arrows on your keyboard.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="887afe43-eb6f-4dda-81c2-f220fb9ede0d.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26364i5F8586753605B824/image-size/large?v=v2&amp;amp;px=999" role="button" title="887afe43-eb6f-4dda-81c2-f220fb9ede0d.png" alt="887afe43-eb6f-4dda-81c2-f220fb9ede0d.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="17472"&gt;Rename the node to “&lt;STRONG data-renderer-mark="true"&gt;Failing request&lt;/STRONG&gt;“ and continue analyzing the results.&lt;/P&gt;
&lt;P data-renderer-start-pos="17546"&gt;When we look at what a &lt;STRONG data-renderer-mark="true"&gt;POST request&lt;/STRONG&gt; logs should look like in the &lt;STRONG data-renderer-mark="true"&gt;“Background”&lt;/STRONG&gt; section, they aren’t quite the same as we see here. Especially interesting is the stack trace part, which is visible in the trace. It seems we have encountered some &lt;STRONG data-renderer-mark="true"&gt;heartbeat irregularities,&lt;/STRONG&gt; which has thrown our system into an unexpected state.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H2 id="What-else-did-the-application-do-after-this?" data-renderer-start-pos="17870"&gt;What else did the application do after this?&lt;/H2&gt;
&lt;P data-renderer-start-pos="17870"&gt;We should look beyond this request and see what else our application did afterward. To see the following events in our application, let's modify the query following these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="18097"&gt;Remove that last &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command from the query that has the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;trace_id&lt;/CODE&gt; in it.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="18175"&gt;Add a &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command to fetch logs only from the same pod by right-clicking on the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;k8s.pod.name&lt;/CODE&gt; value and choose &lt;STRONG data-renderer-mark="true"&gt;Filter for.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="18303"&gt;Add another &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command to see only relevant logs from the same container by right-clicking on the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;k8s.container.name&lt;/CODE&gt; value and choose &lt;STRONG data-renderer-mark="true"&gt;Filter for.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="18455"&gt;To see only the events following this event, right-click on the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;timestamp&lt;/CODE&gt; field value of the &lt;STRONG data-renderer-mark="true"&gt;first log record&lt;/STRONG&gt;, choose &lt;STRONG data-renderer-mark="true"&gt;Timestamp filters,&lt;/STRONG&gt; and choose &lt;STRONG data-renderer-mark="true"&gt;Later than&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="18618"&gt;Add a &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;sort&lt;/CODE&gt; command to order the results by timestamp in an ascending order.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="18697"&gt;The DQL query you’ve just constructed looks like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter k8s.pod.name == "heartbeat-matcher-service-78f6c784c9-2g77v"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;| filter k8s.container.name == "heartbeat-matcher-service"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;| filter timestamp &amp;gt; toTimestamp("2025-02-14T05:32:00.000000000Z")
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-6" data-ds--code--row=""&gt;| sort timestamp&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the query.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;P data-renderer-start-pos="19060"&gt;The results provide some interesting information. It seems that our service received a &lt;STRONG data-renderer-mark="true"&gt;shutdown&lt;/STRONG&gt; command (graceful, I might add), and the application restarted itself.&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt; Commencing graceful shutdown. Waiting for active requests to complete&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
But why? Has our system been hacked? Has a hacker stopped or restarted our system? Has the Kubernetes control plane lost its mind? Is it the Aliens? Let's see what we can find from other logs!&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;H2 id="What-did-Kubernetes-do-at-that-time?" data-renderer-start-pos="19495"&gt;What did Kubernetes do at that time?&lt;/H2&gt;
&lt;P data-renderer-start-pos="19533"&gt;Let's see what our Kubernetes cluster did at that time. Fortunately, we’re collecting those logs as well. To see the k8s console logs, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="19691"&gt;Copy the last two lines containing the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; and &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;sort&lt;/CODE&gt; commands from the current query.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="19781"&gt;Go to the &lt;STRONG data-renderer-mark="true"&gt;second gray node&lt;/STRONG&gt; in the query tree, where we aggregated all the log sources and what we called “&lt;STRONG data-renderer-mark="true"&gt;Log sources&lt;/STRONG&gt;”.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="19904"&gt;Remove the last line that contains the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;summarize&lt;/CODE&gt; command.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="19964"&gt;Right-click on the “&lt;STRONG data-renderer-mark="true"&gt;Linux System&lt;/STRONG&gt;” value in the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;dt.process.name&lt;/CODE&gt; column and choose &lt;STRONG data-renderer-mark="true"&gt;Filter for&lt;/STRONG&gt; to fetch only the k8s plane logs.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="20092"&gt;Paste the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; and &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;sort&lt;/CODE&gt; commands to the very end of the query.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="20161"&gt;The DQL query looks like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter dt.process.name == "Linux System"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;| filter timestamp &amp;gt; toTimestamp("2025-02-14T05:32:00.000000000Z")
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;| sort timestamp&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the DQL query.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;P data-renderer-start-pos="20421"&gt;The query tree by now should look something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="88a7b796-15ca-4236-85bc-6a34a90c565a.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26365iBCD9EF7530BF1E1E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="88a7b796-15ca-4236-85bc-6a34a90c565a.png" alt="88a7b796-15ca-4236-85bc-6a34a90c565a.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="20480"&gt;OK, seems that we’re getting the puzzle together here. From the logs, we gathered that heartbeat monitor/health checks &lt;STRONG data-renderer-mark="true"&gt;started to fail&lt;/STRONG&gt; after the request. The failing heartbeats resulted in the K8S control plane restarting the server gracefully since the container was marked unhealthy:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;Killing container with a grace period&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="20806"&gt;Seems that the logical sequence of events might have been the following:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="20882"&gt;A request came in, which &lt;STRONG data-renderer-mark="true"&gt;resulted in an error&lt;/STRONG&gt; and caused problems in the service.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="20966"&gt;Because of the error, the load on the server increased, causing &lt;STRONG data-renderer-mark="true"&gt;health check endpoints to fail&lt;/STRONG&gt; as well.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="21072"&gt;Due to failed heartbeats, K8S decided to &lt;STRONG data-renderer-mark="true"&gt;restart the container &lt;/STRONG&gt;and sent a “kill container” signal to the container.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="21190"&gt;The sent signal &lt;STRONG data-renderer-mark="true"&gt;restarted the service&lt;/STRONG&gt; gracefully.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="21242"&gt;The requests that came in during the restart resulted in a &lt;STRONG data-renderer-mark="true"&gt;response code 503&lt;/STRONG&gt; (service not available).&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="21347"&gt;The restart sequence is an interesting source that we should use in the future. See if you can find the first successful event after the restart that would indicate the end of the restart sequence. Right-click on its timestamp and choose &lt;STRONG data-renderer-mark="true"&gt;Timestamp filter → Earlier than&lt;/STRONG&gt;. The following &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; will be added to your query:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| filter timestamp &amp;lt; toTimestamp("2025-02-06T05:35:01.000000000Z")&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
Click &lt;STRONG data-renderer-mark="true"&gt;Run&lt;/STRONG&gt; to execute the query and give the node a &lt;STRONG data-renderer-mark="true"&gt;neon color&lt;/STRONG&gt; to reference it later. Also, name the node to &lt;STRONG data-renderer-mark="true"&gt;“Restart cycle”&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;H2 id="What-was-the-request-that-killed-it-all?" data-renderer-start-pos="21864"&gt;What was the request that killed it all?&lt;/H2&gt;
&lt;P data-renderer-start-pos="21906"&gt;But what was the request that started it all? Let's go back to the &lt;STRONG data-renderer-mark="true"&gt;first purple node&lt;/STRONG&gt; and analyze the heartbeat fragment that was sent. It seems that this might have been the source of the problem.&lt;/P&gt;
&lt;P data-renderer-start-pos="22105"&gt;Let's try to analyze and visualize the Heartbeat Fragment to understand what’s in it. To analyze the inner workings of the fragment, follow these steps:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="22261"&gt;Create a filter to see only the log record containing the Heartbeat Fragment. To achieve this, select the “Heartbeat Fragment” portion from the content field, right-click on the selection, and choose &lt;STRONG data-renderer-mark="true"&gt;Filter for&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV class="rich-media-item mediaSingleView-content-wrap image-center cc-8acwex" data-layout="center" data-width="736" data-width-type="pixel" data-node-type="mediaSingle" data-renderer-start-pos="22477"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P data-renderer-start-pos="22480"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="478aa533-b5c4-4f16-a082-1cc267db2861.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26366i3DA0AD9F94B62DD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="478aa533-b5c4-4f16-a082-1cc267db2861.png" alt="478aa533-b5c4-4f16-a082-1cc267db2861.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="22480"&gt;The following &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;filter&lt;/CODE&gt; command will be added to your query:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| filter contains(content, "Heartbeat Fragment")&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;Extract the heartbeat bitmap as a separate array field. To do that, add the following &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;parse&lt;/CODE&gt; command to your query:&lt;/DIV&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| parse content, "LD 'Heartbeat Fragment: ' array{ LD{1}:a }{,100}:binary"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P data-renderer-start-pos="22786"&gt;This DPL pattern will extract up to 100 1-character-long pieces of line data (&lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;LD&lt;/CODE&gt; matcher) into an array field called &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;binary&lt;/CODE&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="22915"&gt;To visualize the data better, let's generate a key for each binary value. Use the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;iIndex()&lt;/CODE&gt; function to do it, like in the following DQL snippet:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;| fields heartbeats = record(value = binary[], key = concat("position_", iIndex()))&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;LI&gt;Use &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;expand&lt;/CODE&gt; to expand all array elements into separate log records and &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;fieldsFlatten&lt;/CODE&gt; command to spread the elements of the &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;record&lt;/CODE&gt; object to separate fields.&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="23309"&gt;Finally, add a &lt;CODE class="code cc-1tbex3z" data-renderer-mark="true"&gt;fieldsRemove&lt;/CODE&gt; command to remove the heartbeats field and leave only the key and value columns.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="23420"&gt;The final DQL query you just constructed looks like this:&lt;/P&gt;
&lt;DIV class="code-block  cc-wroouh"&gt;
&lt;DIV class="cc-9n57oc"&gt;
&lt;DIV class="cc-v2tmjh"&gt;
&lt;DIV role="presentation"&gt;
&lt;PRE&gt;&lt;SPAN class="prismjs cc-zn1qqt" data-code-lang="" data-ds--code--code-block="" data-testid="renderer-code-block"&gt;&lt;CODE class="language-"&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-1" data-ds--code--row=""&gt;fetch logs
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-2" data-ds--code--row=""&gt;| filter k8s.cluster.name == "prod.cupid.cluster"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-3" data-ds--code--row=""&gt;| filter contains(trace_id, "e0f28a67b2854b1fa8442d9df9f3deeb")
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-4" data-ds--code--row=""&gt;| filter contains(content, "Heartbeat Fragment")
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-5" data-ds--code--row=""&gt;| parse content, "LD 'Heartbeat Fragment: ' array{ LD{1}:a }{,100}:binary"
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-6" data-ds--code--row=""&gt;| fields heartbeats = record(value = binary[], key = concat("position_",iIndex()))
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-7" data-ds--code--row=""&gt;| expand heartbeats
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-8" data-ds--code--row=""&gt;| fieldsFlatten heartbeats
&lt;/SPAN&gt;&lt;SPAN class="" data-testid="renderer-code-block-line-9" data-ds--code--row=""&gt;| fieldsRemove heartbeats&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
The results don't reveal much in the Security Investigator. Still, luckily, we can use &lt;STRONG data-renderer-mark="true"&gt;Notebooks&lt;/STRONG&gt; to format the findings in a more meaningful way and use it to share the outcome with our stakeholders! But first, give the node a new color of &lt;STRONG data-renderer-mark="true"&gt;Gold&lt;/STRONG&gt; and rename the node to &lt;STRONG data-renderer-mark="true"&gt;“Heartbeats“&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;P data-renderer-start-pos="24169"&gt;The final query tree looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="bb1040f7-adb4-42e1-b492-a60cf2021332.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26367iD3CCAC5DBC1622B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bb1040f7-adb4-42e1-b492-a60cf2021332.png" alt="bb1040f7-adb4-42e1-b492-a60cf2021332.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2 id="Report-your-investigation-results-in-Notebooks" data-renderer-start-pos="24211"&gt;Report your investigation results in Notebooks&lt;/H2&gt;
&lt;P data-renderer-start-pos="24259"&gt;Security Investigator enables you to create a Notebook document from your query nodes to create a comprehensive report using &lt;A class="cc-1rn59kg" title="https://www.dynatrace.com/hub/detail/notebooks/" href="https://www.dynatrace.com/hub/detail/notebooks/" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;&lt;STRONG data-renderer-mark="true"&gt;Dynatrace Notebooks&lt;/STRONG&gt;&lt;/A&gt;. You can select the relevant nodes for your report and generate a Notebook document from them.&lt;/P&gt;
&lt;P data-renderer-start-pos="24500"&gt;To create a Notebooks document for our investigation, follow these steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI data-renderer-start-pos="24500"&gt;Choose the relevant nodes for your report. Hold down the &lt;STRONG data-renderer-mark="true"&gt;Ctrl&lt;/STRONG&gt; (&lt;STRONG data-renderer-mark="true"&gt;Cmd&lt;/STRONG&gt; for Macbook users) key and click on the following nodes:&lt;/LI&gt;
&lt;/OL&gt;
&lt;UL class="ak-ul" data-indent-level="2"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="24705"&gt;the &lt;STRONG data-renderer-mark="true"&gt;second gray node&lt;/STRONG&gt; to show the &lt;STRONG data-renderer-mark="true"&gt;log sources&lt;/STRONG&gt; we analyzed&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="24765"&gt;&lt;STRONG data-renderer-mark="true"&gt;fourth gray node&lt;/STRONG&gt; to show the &lt;STRONG data-renderer-mark="true"&gt;response code distribution&lt;/STRONG&gt; over time&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="24834"&gt;&lt;STRONG data-renderer-mark="true"&gt;second blue node&lt;/STRONG&gt; to show the &lt;STRONG data-renderer-mark="true"&gt;response latency&lt;/STRONG&gt; chart&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="24889"&gt;&lt;STRONG data-renderer-mark="true"&gt;first purple node&lt;/STRONG&gt; to show the request that &lt;STRONG data-renderer-mark="true"&gt;caused the error&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="24952"&gt;&lt;STRONG data-renderer-mark="true"&gt;neon node&lt;/STRONG&gt; for the &lt;STRONG data-renderer-mark="true"&gt;restart&lt;/STRONG&gt; of the application&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="25000"&gt;&lt;STRONG data-renderer-mark="true"&gt;golden&lt;/STRONG&gt; to show the bitmap&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ed384319-5e1b-48c0-aab7-07dfc160ac09.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26368i3F5E3D4EBBAAA7B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ed384319-5e1b-48c0-aab7-07dfc160ac09.png" alt="ed384319-5e1b-48c0-aab7-07dfc160ac09.png" /&gt;&lt;/span&gt;&lt;SPAN&gt;2. Right-click on the nodes and choose &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;" data-renderer-mark="true"&gt;Download nodes as&lt;/STRONG&gt;&lt;SPAN&gt; → &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;" data-renderer-mark="true"&gt;Notebooks document.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P data-renderer-start-pos="25000"&gt;&lt;STRONG data-renderer-mark="true"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;SPAN&gt;3. Check the Results checkbox to include results in the Notebooks document.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P data-renderer-start-pos="25113"&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="731efca6-370e-485a-b2cb-62e4a4b40e69.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26369i40EF318CCB39E77E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="731efca6-370e-485a-b2cb-62e4a4b40e69.png" alt="731efca6-370e-485a-b2cb-62e4a4b40e69.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-renderer-start-pos="25000"&gt;4. Click &lt;STRONG data-renderer-mark="true"&gt;Download,&lt;/STRONG&gt; and you’re done!&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-renderer-start-pos="25227"&gt;Now, open the &lt;STRONG data-renderer-mark="true"&gt;Notebooks app&lt;/STRONG&gt;, click on the &lt;STRONG data-renderer-mark="true"&gt;Upload&lt;/STRONG&gt; button, and select the document you just downloaded from the Security Investigator.&lt;/P&gt;
&lt;P data-renderer-start-pos="25362"&gt;Follow these steps to illustrate your report:&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="25411"&gt;Resize the “log sources” section results table to fill in the content.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="25484"&gt;Change the visualization options for the “response code distribution” and “response latency chart” sections to a &lt;STRONG data-renderer-mark="true"&gt;line chart&lt;/STRONG&gt; and Hide the input.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="25631"&gt;Resize all sections so that they would look nice for the report, and if needed, add markup sections in the middle to fill in the gaps in your investigation.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="25790"&gt;But currently, let's focus on the last section that contained our &lt;STRONG data-renderer-mark="true"&gt;Heartbeat Fragment&lt;/STRONG&gt;. Let's see if we can find a suitable visualization for the fragment.&lt;/P&gt;
&lt;OL class="ak-ol" start="1" data-indent-level="1"&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="25947"&gt;Open Heartbeats segments &lt;STRONG data-renderer-mark="true"&gt;Options.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="25983"&gt;Choose &lt;STRONG data-renderer-mark="true"&gt;Honeycomb&lt;/STRONG&gt; visualization.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P data-renderer-start-pos="26017"&gt;From the color palette, choose &lt;STRONG data-renderer-mark="true"&gt;Fireplace.&lt;/STRONG&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P data-renderer-start-pos="26062"&gt;Your request that made your service &lt;STRONG data-renderer-mark="true"&gt;skip a heartbeat&lt;/STRONG&gt; (or a few) looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="7d6d066e-2290-467e-8b0c-9458abd17963.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26370i78F23A27A0BBA85E/image-size/large?v=v2&amp;amp;px=999" role="button" title="7d6d066e-2290-467e-8b0c-9458abd17963.png" alt="7d6d066e-2290-467e-8b0c-9458abd17963.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="rich-media-item mediaSingleView-content-wrap image-center cc-1yc7jgi" data-layout="center" data-width="760" data-width-type="pixel" data-node-type="mediaSingle" data-renderer-start-pos="26143"&gt;
&lt;DIV class="cc-t57aey"&gt;
&lt;DIV class=" cc-1t7vnwi" contenteditable="false" data-media-badges="true" data-testid="media-badges"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P class="lia-align-center" data-renderer-start-pos="26146"&gt;&lt;STRONG data-renderer-mark="true"&gt;Congratulations!&lt;/STRONG&gt; You have successfully finished the &lt;STRONG&gt;Valentine's Day scavenger hunt&lt;/STRONG&gt;!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-renderer-start-pos="26231"&gt;A shared &lt;STRONG&gt;Security Investigator&lt;/STRONG&gt; case of the full walkthrough can be found &lt;A class="cc-1rn59kg" title="https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/share/db2971d1-a816-49e5-b35c-d8eb3f9c9f80" href="https://wkf10640.apps.dynatrace.com/ui/apps/dynatrace.security.investigator/share/db2971d1-a816-49e5-b35c-d8eb3f9c9f80" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P data-renderer-start-pos="26231"&gt;The final &lt;STRONG&gt;Notebook document&lt;/STRONG&gt; report can be found&amp;nbsp;&lt;A class="cc-1rn59kg" title="https://wkf10640.apps.dynatrace.com/ui/document/v0/#share=32371a6a-316c-4701-b319-5445f2546310" href="https://wkf10640.apps.dynatrace.com/ui/document/v0/#share=32371a6a-316c-4701-b319-5445f2546310" target="_blank" rel="noopener" data-testid="link-with-safety" data-renderer-mark="true"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P data-renderer-start-pos="26354"&gt;Did you reach a different solution? Do you have a different query tree? Share your tree and describe your experience in the comments!&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":right_arrow:"&gt;➡️&lt;/span&gt; Author of this hands-on:&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/56833"&gt;@Tiit_Hallas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 11:38:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/269851#M1664</guid>
      <dc:creator>GosiaMurawska</dc:creator>
      <dc:date>2025-02-27T11:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Valentine's Day hands-on: Heartbeat failed ❤️</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/270951#M1665</link>
      <description>&lt;P&gt;Finally got around to this. Such fun!&lt;BR /&gt;&lt;BR /&gt;I did end up with a slightly different query tree but it ended up all good in the end.&lt;BR /&gt;&lt;BR /&gt;Ignoring the multiple extra nodes because I ran frequent queries with small iterations, My node for the Restart Cycle (cyan?) is on the left side of the tree instead of underneath one of the purple nodes. I think it ended up fine though!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="victoria_0-1740489904933.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26642i2ECB696E5E02A850/image-size/medium?v=v2&amp;amp;px=400" role="button" title="victoria_0-1740489904933.png" alt="victoria_0-1740489904933.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 13:27:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/270951#M1665</guid>
      <dc:creator>victoria</dc:creator>
      <dc:date>2025-02-25T13:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Valentine's Day hands-on: Heartbeat failed ❤️</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/271017#M1666</link>
      <description>&lt;P&gt;Thank You for sharing your experience with Security Investigator and I'm glad to hear you had fun doing this walkthrough! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Just a little hint, maybe it comes handy in some cases (specially with the small iterations you mentioned): Security Investigator has also the possibility to execute the query &lt;STRONG&gt;in the same node&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;You can either choose this option from the &lt;STRONG&gt;"Run" menu&lt;/STRONG&gt; ("three-dot menu" next to the Run button) or use the keyboard shortcut &lt;STRONG&gt;Ctrl + Shift + Enter&amp;nbsp;&lt;/STRONG&gt;(Cmd+Shift+Enter for macbook users).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tiit_Hallas_0-1740556287060.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26657i4528C4AD91DD110C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tiit_Hallas_0-1740556287060.png" alt="Tiit_Hallas_0-1740556287060.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 07:54:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/271017#M1666</guid>
      <dc:creator>Tiit_Hallas</dc:creator>
      <dc:date>2025-02-26T07:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Valentine's Day hands-on: Heartbeat failed ❤️</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/271279#M1667</link>
      <description>&lt;P&gt;oh awesome,&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/56833"&gt;@Tiit_Hallas&lt;/a&gt;,&amp;nbsp;thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 21:19:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Valentine-s-Day-hands-on-Heartbeat-failed-%EF%B8%8F/m-p/271279#M1667</guid>
      <dc:creator>victoria</dc:creator>
      <dc:date>2025-02-27T21:19:50Z</dc:date>
    </item>
  </channel>
</rss>

