<commit_before><#-- @ftlvariable name="" type="com.hypnoticocelot.telemetry.dropwizard.views.TraceView" -->
<html>
<head>
    <title>Trace - ${trace.root.data.name}</title>
    <style>
        .trace {
            width: 100%;
        }

        .span {
            position: relative;
            border: 1px solid #ff1493;
            background: #ffc0cb;
        }
    </style>
</head>
<body>
<h1>Trace - ${trace.root.data.name}</h1>
<div id="trace-${trace.id}" class="trace">
    <@renderSpan span=trace.root trace=trace/>
</div>
</body>
</html>

<#macro renderSpan span trace>
<#-- @ftlvariable name="span" type="com.hypnoticocelot.telemetry.tracing.Span" -->
<#-- @ftlvariable name="trace" type="com.hypnoticocelot.telemetry.tracing.Trace" -->
<div id="span-${span.id}" class="span" style="left: ${((span.startTime - trace.startTime) / trace.duration) * 100}%; width: ${(span.duration / trace.duration) * 100}%;">
    ${span.data.name}<commit_msg>Simple rendering of Span annotations in the UI.<commit_after><#-- @ftlvariable name="" type="com.hypnoticocelot.telemetry.dropwizard.views.TraceView" -->
<html>
<head>
    <title>Trace - ${trace.root.data.name}</title>
    <style>
        .trace {
            width: 100%;
        }

        .span {
            position: relative;
            border: 1px solid #ff1493;
            background: #ffc0cb;
        }
    </style>
</head>
<body>
<h1>Trace - ${trace.root.data.name}</h1>
<div id="trace-${trace.id}" class="trace">
    <@renderSpan span=trace.root trace=trace/>
</div>
</body>
</html>

<#macro renderSpan span trace>
<#-- @ftlvariable name="span" type="com.hypnoticocelot.telemetry.tracing.Span" -->
<#-- @ftlvariable name="trace" type="com.hypnoticocelot.telemetry.tracing.Trace" -->
<div id="span-${span.id}" class="span" style="left: ${((span.startTime - trace.startTime) / trace.duration) * 100}%; width: ${(span.duration / trace.duration) * 100}%;">
    ${span.data.name} [
        <#list span.data.annotations?keys as annotation>${annotation} => ${span.data.annotations[annotation]} </#list>
    ]
{'fraction_non_alphanumeric': 0.19980648282535074, 'fraction_numerical': 0.01644895984518626, 'mean_word_length': 3.1277445109780437, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5048852', 'n_tokens_mistral': 754, 'n_tokens_neox': 717, 'n_words': 128}