<commit_before><#ftl output_format="JSON">
<#macro stringOrNull data="">
    <#if data != "">
    "${data}"<#else>
    null</#if>
</#macro>
{ "index" : { "_index" : "${index}", "_type" : "${documentType}", "_id" : "${status.getId()}" } }
<@compress single_line=true>
{
    "gateway":"${gateway}",
    "api":"${status.getApi()}",
    "endpoint":"${status.getEndpoint()}",
    "available":${status.isAvailable()?c},
    "response-time":${status.getResponseTime()},
    "success":${status.isSuccess()?c},
    "state":${status.getState()},
    "steps": [
<#list status.getSteps() as step>
        {"name": "${step.getName()}",
        "success":${step.isSuccess()?c},
        "request": {
            "uri":"${step.getRequest().getUri()}",
            "method":"${step.getRequest().getMethod()}"
            <#if step.getRequest().getBody()??>
            ,"body":"${step.getRequest().getBody()?j_string}"
            </#if>
            <#if step.getRequest().getHeaders()??>
            ,"headers":{
                <#list step.getRequest().getHeaders() as headerKey, headerValue>
                "${headerKey}": [
                    <#list headerValue as value>
                    "${value}"
                        <#sep>,</#sep>
                    </#list>
                ]
                    <#sep>,</#sep>
                </#list>
            }
            </#if>
        },
        "response": {
            "status":${step.getResponse().getStatus()}
            <#if step.getResponse().getBody()??>
            ,"body":"${step.getResponse().getBody()?j_string}"
            </#if>
            <#if step.getResponse().getHeaders()??>
            ,"headers":{
                <#list step.getResponse().getHeaders() as headerKey, headerValue>
                "${headerKey}": [
                    <#list headerValue as value>
                    "${value}"
                        <#sep>,</#sep>
                    </#list>
                ]
                    <#sep>,</#sep>
                </#list>
            }
            </#if>
        },
        "response-time":${step.getResponseTime()},
        "message":<@stringOrNull data=step.getMessage()/>
    }<#sep>,</#sep>
</#list>],
"@timestamp":"${@timestamp}"
}</@compress><commit_msg>fix(healthcheck): Escape HTTP headers value<commit_after><#ftl output_format="JSON">
<#macro stringOrNull data="">
    <#if data != "">
    "${data}"<#else>
    null</#if>
</#macro>
{ "index" : { "_index" : "${index}", "_type" : "${documentType}", "_id" : "${status.getId()}" } }
<@compress single_line=true>
{
    "gateway":"${gateway}",
    "api":"${status.getApi()}",
    "endpoint":"${status.getEndpoint()}",
    "available":${status.isAvailable()?c},
    "response-time":${status.getResponseTime()},
    "success":${status.isSuccess()?c},
    "state":${status.getState()},
    "steps": [
<#list status.getSteps() as step>
        {"name": "${step.getName()}",
        "success":${step.isSuccess()?c},
        "request": {
            "uri":"${step.getRequest().getUri()}",
            "method":"${step.getRequest().getMethod()}"
            <#if step.getRequest().getBody()??>
            ,"body":"${step.getRequest().getBody()?j_string}"
            </#if>
            <#if step.getRequest().getHeaders()??>
            ,"headers":{
                <#list step.getRequest().getHeaders() as headerKey, headerValue>
                "${headerKey}": [
                    <#list headerValue as value>
                    "${value?j_string}"
                        <#sep>,</#sep>
                    </#list>
                ]
                    <#sep>,</#sep>
                </#list>
            }
            </#if>
        },
        "response": {
            "status":${step.getResponse().getStatus()}
            <#if step.getResponse().getBody()??>
            ,"body":"${step.getResponse().getBody()?j_string}"
            </#if>
            <#if step.getResponse().getHeaders()??>
            ,"headers":{
                <#list step.getResponse().getHeaders() as headerKey, headerValue>
                "${headerKey}": [
                    <#list headerValue as value>
                    "${value?j_string}"
                        <#sep>,</#sep>
                    </#list>
                ]
                    <#sep>,</#sep>
                </#list>
            }
            </#if>
        },
        "response-time":${step.getResponseTime()},
        "message":<@stringOrNull data=step.getMessage()/>
    }<#sep>,</#sep>
</#list>],
"@timestamp":"${@timestamp}"
}</@compress>
{'fraction_non_alphanumeric': 0.22038749449581682, 'fraction_numerical': 0.0, 'mean_word_length': 1.7650639074863055, 'pattern_counts': {'":': 48, '<': 77, '<?xml version=': 0, '>': 77, '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': '3838048', 'n_tokens_mistral': 1371, 'n_tokens_neox': 1338, 'n_words': 187}