Mobile Betting · 18 / 26

Telemetry Sequence Diagrams

Sequence diagrams of the telemetry flow: trace context propagation, export and privacy processing, tail sampling, business events, alerting and online evaluation.

What these show

The telemetry page lists what is collected and the queries that read it. These diagrams show how the data moves: how one trace identifier follows an item across every component, how telemetry is cleaned and sampled on the way out, how business events become the numbers compliance watches, and how an alert becomes a response.

1 · Trace context follows the item

Trace context propagation across one KYC case Intake starts the trace and the orchestrator creates the root span. Every call to the AI gateway and the tool gateway carries the W3C traceparent header, so their spans join the same trace as the models and the account platform. Intake Orchestrator AI gateway Model Tool gateway Account platform application and documents start kyc.item, new trace id model call + traceparent call, child span extraction and usage fields, cost in headers tool call + traceparent open account, child span opened result, audited end span, record metric One trace id from intake to the account platform.
Trace context propagation across one KYC case

Without propagation a slow item shows as a slow root span and nothing more. With it, the waterfall shows which step took the time.

2 · From the service to the stores

Telemetry export pipeline The service sends spans, metrics and logs to a collector over OTLP. A privacy processor drops or hashes sensitive attributes, a tail sampler keeps the traces that matter, and the result goes to Azure Monitor and to the lakehouse. Service Collector Privacy processor Tail sampler Azure Monitor Lakehouse OTLP spans, metrics, logs batch drop text, hash player and device sanitised spans wait 10 s, decide per trace kept traces kept traces, masked copy metrics, all Nothing sensitive leaves this step.
Telemetry export pipeline

The privacy processor runs before sampling and before export, so no downstream store ever holds a document or a player identity in clear.

3 · What the tail sampler keeps

Tail sampling decision The sampler holds the spans of each trace until the root ends. A trace with an error or a guardrail block is always kept in full. Other traces are kept at a fixed percentage. Service Collector Tail sampler Azure Monitor spans for item A, normal hold spans for item A no error, no block: sample 10% kept in 1 of 10 spans for item B, airs.action = block hold spans for item B policy keep-blocks matches keep the full trace spans for item C, tool error hold spans for item C policy keep-errors matches keep the full trace
Tail sampling decision

Metrics are not sampled, so rates and percentiles stay exact. Only the detailed traces are thinned.

4 · A business event becomes a protection number

Business event to time-to-intervention query When a harm marker is raised and when a protection is applied, the service writes log records with custom event names. They are exported through the collector into Log Analytics as AppEvents rows, and a query measures the time between them. Service Logging pipeline Collector Log Analytics Safer gambling lead harm marker, then protection log records, events harm.marker and protection.applied export write AppEvents rows time-to-first-action query (KQL) join markers to actions median and p95 by band Same events feed the audit checks.
Business event to time-to-intervention query

The events carry the hashed case identifier, the band and the action, never the player's identity or behaviour detail.

5 · From an alert to a response

Alert to incident response A scheduled alert query returns a marketing message sent to an excluded player. The alert rule fires an action group that pages the on-call engineer with a runbook link. The engineer acknowledges, pauses marketing sends and opens the case query from the dashboard. Log Analytics Alert rule Action group On-call engineer Safety switch Dashboard run query every 5 minutes rows returned: 1 threshold: more than 0 fire alert page with runbook link acknowledge pause marketing sends open case query trace for the case spans, events, outcome Runbook 2 · marketing to an excluded player.
Alert to incident response

The alert carries the trace identifier and the runbook link, so the first minutes go to containing the problem.

6 · Traces become quality scores

Online evaluation from production traces A sample of production traces goes to an online evaluator, which asks a judge model to score extraction, rule groundedness and tone. Scores are attached to the trace. Low scores go to a review queue, and a sustained drop raises an alert. Service Tracing tool Online evaluator Judge model Review queue Alerts trace of the item sampled, 5% score extraction, grounding, tone scores feedback on the trace score below threshold 7-day drop of 5 points A person reviews, adds the case to the dataset.
Online evaluation from production traces

This closes the loop with the evaluation plan: production behaviour becomes new test cases, and the release gate protects against the same failure next time.

Build this for your business

This example is a player protection and operations platform for a licensed betting operator, but the same pattern, deterministic rules for every hard duty, a governed gateway, runtime security, protect-first automation and measured quality, fits any regulated, customer-facing service. We can scope a pilot on your own systems.

Book a discovery call