Skip to content

Commit

Permalink
Deployed e70c296 to main with MkDocs 1.6.1 and mike 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 9, 2024
1 parent c5a7f43 commit 19f6739
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
35 changes: 30 additions & 5 deletions main/features/0034-message-tracing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4760,7 +4760,19 @@ <h3 id="decorator">Decorator<a class="headerlink" href="#decorator" title="Perma
often be a <strong>forward</strong> message, but could also be the terminal message unpacked
and handled at its final destination) with the
<code>~trace</code> attribute. Here is the simplest possible example:</p>
<p><a href="msg-with-trace.json"><img alt="example of ~trace" src="msg-with-trace.png" /></a></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>{
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a> &quot;@type&quot;: &quot;did:sov:BzCBs...;spec/routing/1.0/forward&quot;,
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> &quot;@id&quot;: &quot;abc-def-...&quot;,
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a> &quot;msg&quot;: &quot;U2Vl...&quot;,
<a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a> &quot;~trace&quot;: {
<a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a> &quot;target&quot;: &quot;http://example.com/tracer&quot;,
<a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a> &quot;full_thread&quot;: true
<a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a> }
<a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a>}
</code></pre></div>
<p>The <code>"target"</code> can refer to a url (as above) or the term <code>"log"</code>, which is a request to
append trace information to the standard log file. (Information can then be manually
collated from agents.)</p>
<p>This example asks the handler of the message to perform an HTTP POST of a <strong>trace report</strong>
about the message to the URI <code>http://example.com/tracer</code>.</p>
<p>The service listening for trace reports--called the <strong>trace sink</strong>--
Expand All @@ -4781,14 +4793,25 @@ <h3 id="decorator">Decorator<a class="headerlink" href="#decorator" title="Perma
</ol>
<h3 id="trace-reports">Trace Reports<a class="headerlink" href="#trace-reports" title="Permanent link">&para;</a></h3>
<p>The body of the HTTP request (the <em>trace report</em>) is a JSON document that looks like this:</p>
<p><a href="trace-report.json"><img alt="trace report" src="trace-report.png" /></a></p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a>{
<a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a> &quot;@type&quot;: &quot;did:sov:BzCBs...;spec/1.0/trace_report&quot;,
<a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a> &quot;msg_id&quot;: &quot;abc-def-...df&quot;,
<a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a> &quot;thread_id&quot;: &quot;hij-klm-nop-...qr&quot;,
<a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a> &quot;handler&quot;: &quot;did:sov:1234abcd#3&quot;,
<a id="__codelineno-1-6" name="__codelineno-1-6" href="#__codelineno-1-6"></a> &quot;ellapsed_milli&quot;: 27,
<a id="__codelineno-1-7" name="__codelineno-1-7" href="#__codelineno-1-7"></a> &quot;traced_type&quot;: &quot;did:sov:BzCBs...;spec/routing/1.0/forward&quot;,
<a id="__codelineno-1-8" name="__codelineno-1-8" href="#__codelineno-1-8"></a> &quot;str_time&quot;: &quot;2018-03-27 18:23:45.123Z&quot;,
<a id="__codelineno-1-9" name="__codelineno-1-9" href="#__codelineno-1-9"></a> &quot;timestamp&quot;: &quot;1234567890.123456&quot;,
<a id="__codelineno-1-10" name="__codelineno-1-10" href="#__codelineno-1-10"></a> &quot;outcome&quot;: &quot;OK ...&quot;
<a id="__codelineno-1-11" name="__codelineno-1-11" href="#__codelineno-1-11"></a>}
</code></pre></div>
<h3 id="subtleties">Subtleties<a class="headerlink" href="#subtleties" title="Permanent link">&para;</a></h3>
<h5 id="message-ids">Message IDs<a class="headerlink" href="#message-ids" title="Permanent link">&para;</a></h5>
<p>If messages have a different <code>@id</code> attribute at each hop in a delivery chain, then a trace
of the message at hop 1 and a trace of the message at hop 2 will not appear to have any
connection when the reports are analyzed together.</p>
<p><img alt="tracing unrelated messages" src="trace-xyz.png" /></p>
<p>To solve this problem, traced messages use an ID convention that permits ordering.
<p>To solve this problem, traced messages <em>may</em> use an ID convention that permits ordering.
Assume that the inner application message has a base ID, <em>X</em>. Containing
messages (e.g., <code>forward</code> messages) have IDs in the form <em>X</em>.1, <em>X</em>.2, <em>X</em>.3,
and so forth -- where numbers represent the order in
Expand Down Expand Up @@ -4858,8 +4881,9 @@ <h3 id="trace-report-attributes">Trace Report Attributes<a class="headerlink" hr
<li><code>@type</code>: Should always be <code>"https://didcomm.org/tracing/1.0/trace_report"</code>,
or some evolved version thereof. Required for version control and to support trace sinks
that process other HTTP payloads as well.</li>
<li><code>for_id</code>: The ID of the message that the handler is looking at when it composes the
<li><code>msg_id</code>: The ID of the message that the handler is looking at when it composes the
trace report. Required.</li>
<li><code>thread_id</code>: The ID of the protocol thread. Required.</li>
<li><code>handler</code>: A string that identifies the handler in a way that's useful for troubleshooting purposes.
For example, it might identify a particular agent by DID+keyref, or it might be a friendly
string like "iPhone" or "AgentsRUs Cloud Agent, geocaching extension v1.3.7". Optional but
Expand All @@ -4868,9 +4892,10 @@ <h3 id="trace-report-attributes">Trace Report Attributes<a class="headerlink" hr
the trace report? If the same handler emits more than one trace report, how long has it
been since the last trace was composed? Optional but encouraged.</li>
<li><code>traced_type</code>: What was the message type of the traced message? Optional but encouraged.</li>
<li><code>report_time</code>: What was the UTC timestamp of the system clock of the handler
<li><code>str_time</code>: What was the UTC timestamp of the system clock of the handler
when the handler composed the trace report? ISO 8601 format with millisecond precision.
Optional but encouraged.</li>
<li><code>timestamp</code>: Value fo the <code>str_time</code> field in milliseconds (UNIX time format).</li>
<li><code>outcome</code>: A string that describes the outcome of the message handling. The string MUST
begin with one of the following tokens: <code>"OK"</code> (meaning the handler completed its processing
successfully; <code>"ERR"</code> (the handler failed), or <code>"PEND"</code> (the handler is still working on the
Expand Down
2 changes: 1 addition & 1 deletion main/search/search_index.json

Large diffs are not rendered by default.

Binary file modified main/sitemap.xml.gz
Binary file not shown.

0 comments on commit 19f6739

Please sign in to comment.