<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" type="device">
  <diagram id="openspanguard-architecture" name="Architecture">
    <mxGraphModel dx="1540" dy="1060" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1540" pageHeight="1060" math="0" shadow="0" background="#F5F3EB">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="title" value="OpenSpanGuard | Architecture" style="text;html=0;strokeColor=none;fillColor=none;align=left;fontColor=#0B1220;fontSize=32;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="40" y="25" width="1400" height="50" as="geometry"/></mxCell>
        <mxCell id="subtitle" value="Completed spans → evaluation in the export path → traces, metrics, and alerts · Developer preview" style="text;html=0;strokeColor=none;fillColor=none;align=left;fontColor=#516170;fontSize=17;" vertex="1" parent="1"><mxGeometry x="40" y="80" width="1400" height="35" as="geometry"/></mxCell>
        <mxCell id="remote-lane" value="OPTIONAL REMOTE EVALUATION" style="swimlane;html=0;startSize=35;horizontal=1;rounded=0;fillColor=#E3F4EE;swimlaneFillColor=#F3FBF8;strokeColor=#91BEB0;fontColor=#086954;fontSize=13;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="515" y="140" width="375" height="145" as="geometry"/></mxCell>
        <mxCell id="app-lane" value="01 / APPLICATION" style="swimlane;html=0;startSize=35;horizontal=1;rounded=0;fillColor=#E7EAE8;swimlaneFillColor=#FFFFFF;strokeColor=#BDC9CC;fontColor=#152336;fontSize=13;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="35" y="340" width="440" height="200" as="geometry"/></mxCell>
        <mxCell id="gateway-lane" value="02 / ENRICHMENT GATEWAY" style="swimlane;html=0;startSize=35;horizontal=1;rounded=0;fillColor=#D9F3EB;swimlaneFillColor=#F3FBF8;strokeColor=#91BEB0;fontColor=#086954;fontSize=13;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="515" y="340" width="375" height="200" as="geometry"/></mxCell>
        <mxCell id="trace-lane" value="03 / TRACE DELIVERY" style="swimlane;html=0;startSize=35;horizontal=1;rounded=0;fillColor=#E7EAE8;swimlaneFillColor=#FFFFFF;strokeColor=#BDC9CC;fontColor=#152336;fontSize=13;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="930" y="340" width="570" height="200" as="geometry"/></mxCell>
        <mxCell id="observe-lane" value="04 / METRICS, QUERIES, AND ALERT ROUTING" style="swimlane;html=0;startSize=35;horizontal=1;rounded=0;fillColor=#E7EAE8;swimlaneFillColor=#FFFFFF;strokeColor=#BDC9CC;fontColor=#152336;fontSize=13;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="515" y="610" width="985" height="345" as="geometry"/></mxCell>
        <mxCell id="agent" value="AI agent&#xa;Generation completes" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#8899A7;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="app-lane"><mxGeometry x="20" y="70" width="160" height="85" as="geometry"/></mxCell>
        <mxCell id="sdk" value="OpenTelemetry SDK&#xa;Async span processor" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#8899A7;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="app-lane"><mxGeometry x="240" y="70" width="175" height="85" as="geometry"/></mxCell>
        <mxCell id="gateway" value="OpenSpanGuard&#xa;Evaluate · remove known content&#xa;Enrich exported spans" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#0B1220;strokeColor=#0B1220;fontColor=#F5F3EB;fontSize=17;spacing=12;" vertex="1" parent="gateway-lane"><mxGeometry x="45" y="65" width="285" height="100" as="geometry"/></mxCell>
        <mxCell id="jev" value="Jev · score / noul&#xa;Raw-content opt-in required" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#086954;fontColor=#086954;fontSize=16;spacing=12;" vertex="1" parent="remote-lane"><mxGeometry x="45" y="50" width="285" height="75" as="geometry"/></mxCell>
        <mxCell id="collector" value="OTel Collector&#xa;Forward traces" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#8899A7;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="trace-lane"><mxGeometry x="25" y="70" width="205" height="85" as="geometry"/></mxCell>
        <mxCell id="tempo" value="Tempo&#xa;Trace storage" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#8899A7;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="trace-lane"><mxGeometry x="340" y="70" width="200" height="85" as="geometry"/></mxCell>
        <mxCell id="prometheus" value="Prometheus&#xa;Scrape + evaluate rules" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#E3F4EE;strokeColor=#086954;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="observe-lane"><mxGeometry x="45" y="60" width="285" height="85" as="geometry"/></mxCell>
        <mxCell id="grafana" value="Grafana&#xa;Query metrics + traces" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#8899A7;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="observe-lane"><mxGeometry x="725" y="60" width="230" height="85" as="geometry"/></mxCell>
        <mxCell id="alertmanager" value="Alertmanager&#xa;Group + route alerts" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#8899A7;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="observe-lane"><mxGeometry x="425" y="225" width="220" height="85" as="geometry"/></mxCell>
        <mxCell id="webhook" value="Webhook&#xa;Local demo receiver" style="rounded=1;whiteSpace=wrap;html=0;arcSize=10;fillColor=#FFFFFF;strokeColor=#8899A7;fontColor=#152336;fontSize=16;spacing=12;" vertex="1" parent="observe-lane"><mxGeometry x="725" y="225" width="230" height="85" as="geometry"/></mxCell>
        <mxCell id="agent-sdk" value="completed&#xa;spans" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#516170;strokeWidth=2;fontColor=#152336;fontSize=11;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="agent" target="sdk"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="sdk-gateway" value="async export&#xa;OTLP/HTTP JSON" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#086954;strokeWidth=2;fontColor=#086954;fontSize=11;labelBackgroundColor=#F5F3EB;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1" source="sdk" target="gateway"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="gateway-jev" value="optional request / result&#xa;captured content → score + noul" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;startArrow=block;startFill=1;endArrow=block;endFill=1;strokeColor=#086954;strokeWidth=2;dashed=1;fontColor=#086954;fontSize=11;labelBackgroundColor=#F5F3EB;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" edge="1" parent="1" source="gateway" target="jev"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="gateway-collector" value="enriched&#xa;original IDs" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#086954;strokeWidth=2;fontColor=#086954;fontSize=11;labelBackgroundColor=#F5F3EB;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1" source="gateway" target="collector"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="collector-tempo" value="OTLP traces" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#516170;strokeWidth=2;fontColor=#152336;fontSize=11;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="collector" target="tempo"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="prom-scrape" value="scrape /metrics&#xa;pull request" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#086954;strokeWidth=2;fontColor=#086954;fontSize=12;labelBackgroundColor=#F5F3EB;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" edge="1" parent="1" source="prometheus" target="gateway"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="grafana-prom" value="query metrics" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#516170;strokeWidth=2;dashed=1;fontColor=#152336;fontSize=12;labelBackgroundColor=#FFFFFF;exitX=0;exitY=0.5;entryX=1;entryY=0.5;" edge="1" parent="1" source="grafana" target="prometheus"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="grafana-tempo" value="query traces" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#516170;strokeWidth=2;dashed=1;fontColor=#152336;fontSize=12;labelBackgroundColor=#F5F3EB;exitX=0.5;exitY=0;entryX=0.5;entryY=1;" edge="1" parent="1" source="grafana" target="tempo"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="prom-alert" value="firing alerts" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#516170;strokeWidth=2;fontColor=#152336;fontSize=12;labelBackgroundColor=#FFFFFF;exitX=0.5;exitY=1;entryX=0;entryY=0.5;" edge="1" parent="1" source="prometheus" target="alertmanager"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="alert-webhook" value="route" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=0;endArrow=block;endFill=1;strokeColor=#516170;strokeWidth=2;fontColor=#152336;fontSize=12;labelBackgroundColor=#FFFFFF;" edge="1" parent="1" source="alertmanager" target="webhook"><mxGeometry relative="1" as="geometry"/></mxCell>
        <mxCell id="privacy-note" value="EXPLICIT CONTENT CAPTURE&#xa;Raw input exists before redaction.&#xa;Unknown custom fields can retain it.&#xa;Minimize content in the application." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#E7EAE8;strokeColor=#BDC9CC;fontColor=#516170;fontSize=15;align=left;spacing=18;" vertex="1" parent="1"><mxGeometry x="35" y="635" width="400" height="145" as="geometry"/></mxCell>
        <mxCell id="limits-note" value="EXPORT-PATH BOUNDARY&#xa;No synchronous scoring wait on generation&#xa;when the SDK processor is asynchronous.&#xa;Export still incurs evaluation + delivery latency." style="rounded=0;whiteSpace=wrap;html=0;fillColor=#E7EAE8;strokeColor=#BDC9CC;fontColor=#516170;fontSize=15;align=left;spacing=18;" vertex="1" parent="1"><mxGeometry x="35" y="805" width="400" height="145" as="geometry"/></mxCell>
        <mxCell id="footer" value="Editable source · OpenSpanGuard · Apache-2.0 · Process-local cache, JSON only, no durable queue or exactly-once guarantee. Live Jev remains unbenchmarked." style="text;html=0;strokeColor=none;fillColor=none;align=left;fontColor=#516170;fontSize=13;" vertex="1" parent="1"><mxGeometry x="40" y="990" width="1460" height="40" as="geometry"/></mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
