19. prosince 2025

AI Telemetry, Analytics & Proxies

AI Telemetry, Analytics & Proxy



Context Engineering in agentic Ai



Use the AI proxy

Call any AI provider through a unified interface

The Braintrust AI proxy provides unified access to models from OpenAI, Anthropic, Google, AWS, Mistral, and third-party providers through a single API. Point your OpenAI SDK to the proxy URL and immediately get automatic caching, observability, and multi-provider support.

https://www.braintrust.dev/docs/deploy/ai-proxy
 

Transparent telemetry collector for agents
GitHub -  Tapes - TokenCost


Lumina is an OpenTelemetry-native platform


LLM Observability via OpenTelemetry
open telemetry

 



1. Telemetry (event logs)
   - Log every “agent event” as structured JSON: request_id, user_id (pseudonym), session_id, agent_step, model, prompt_hash, tool_name, tool_args_hash, latency_ms, tokens_in/out, cost, error_code, outcome.
   - Tech: JSON logging + pipeline into ELK/OpenSearch/Splunk/Datadog/Grafana Loki.

2. Distributed tracing across agent steps
   - Correlation IDs + spans: user → router → LLM call → tool call → post-processing → response.
   - Tech: OpenTelemetry (OTel) + Collector + backend (Jaeger/Tempo/Datadog/New Relic).

3. Prompt/response observability (LLM-specific metrics)
   - Store: prompt template version, “prompt diff”, context length, tool-call graph, retry count, stream interruptions, safety flags, temperature/top_p, to explain regressions.
   - Tech: LLM observability tools (e.g., Langfuse, LangSmith, Helicone, PromptLayer) or your own store.

4. Tooling and permissions audit logs (tooling/audit)
   - Separate “what the LLM proposed” vs “what the system actually executed”.
   - Log: policy-enforcer decisions, denied actions, scopes/entitlements, sandbox results.
   - Tech: append-only logs (WORM/S3 Object Lock, immutability), RBAC/ABAC, policy engine (e.g., OPA).

5. Quality and reliability metrics (SLOs)
   - Quantify: task success rate, factuality proxies (e.g., “citations found”), tool success rate, hallucination proxies (contradictions, invalid JSON, schema-fail), time-to-answer, cost per task.
   - Tech: Prometheus + Grafana, data tests, schema validation (JSON Schema), canary releases.

6. Evals and regression tests (offline and online)
   - Dataset of typical tasks + automated scoring (exact match, rubric, pairwise).
   - For agents additionally test: “trajectory” (correct tool sequence) and “final answer”.
   - Tech: eval frameworks (internal), golden sets, A/B tests, replay of production sessions (with PII scrubbing).

7. User feedback loops
   - In-app: thumbs up/down + reason, “was this helpful”, hallucination reports, ratings for tool actions.
   - Tech: event ingestion + analytics, active learning (error prioritization), human review queue.

8. Conversation analysis and “conversation mining”
   - Topic clustering, repeated-failure detection, funnel analysis (where users drop off), intent drift.
   - Tech: embeddings + vector DB, classifiers, BI (Metabase/Superset/Looker), data warehouse
     (BigQuery/Snowflake).

9. Security and privacy (privacy-by-design analytics)
   - Data minimization: hashing/pseudonymization of identifiers, PII redaction, sampling, retention policies.
   - Separate log levels: prod vs debug; sensitive prompts only in explicit “debug sessions”.
   - Tech: DLP/redaction, tokenization, KMS, role-based access, differential privacy (advanced).

10. “Agent graph” analytics (steps, branching, planning)
   - Model an agent run as a graph: nodes = LLM/tools, edges = control flow, attributes = time/cost/errors.
   - Helps find expensive loops, unnecessary tool calls, and the highest-error hotspots.
   - Tech: event sourcing + graph DB (Neo4j) or SQL analytics over a “steps” table.

11. Conclusion
   - Combine: event telemetry + OTel tracing + LLM-specific observability + evals + feedback, complemented by audit/policy logs and privacy layers.
   - Key: a single correlation ID across the entire agent run, and strict separation of LLM proposals vs executed actions.





Stop wasting tokens: Real-time LLM cost analytics inside your telemetry pipeline
https://cribl.io/blog/stop-wasting-tokens-real-time-llm-cost-analytics-inside-your-telemetry-pipeline/

https://grafana.com/products/cloud/ai-tools-for-observability

Measure AI code assistants and agents





Volejte libovolného poskytovatele AI prostřednictvím jednotného rozhraní

Proxy Braintrust AI poskytuje jednotný přístup k modelům od OpenAI, Anthropic, Google, AWS, Mistral a poskytovatelů třetích stran prostřednictvím jediného API. Nasměrujte svou sadu OpenAI SDK na adresu URL proxy a okamžitě získejte automatické ukládání do mezipaměti, pozorovatelnost a podporu více poskytovatelů.





1. Telemetrie (event logs)
   - Loguj každou „agentní událost“ jako strukturovaný JSON: request_id, user_id (pseudonym), session_id, agent_step, model, prompt_hash, tool_name, tool_args_hash, latency_ms, tokens_in/out, cost, error_code, outcome.
   - Technologie: JSON logging + pipeline do ELK/Opensearch/Splunk/Datadog/Grafana Loki.

2. Distribuované trasování (tracing) napříč kroky agenta
   - Korelační ID + „spans“: uživatel → router → LLM call → tool call → post-processing → odpověď.
   - Technologie: OpenTelemetry (OTel) + collector + backend (Jaeger/Tempo/Datadog/New Relic).

3. Prompt/response observability (LLM-specifické metriky)
   - Ukládej: verzi prompt šablon, „prompt diff“, délky kontextu, tool-call graf, retry count, stream interruptions, safety flags, temperature/top_p, aby šly vysvětlit regrese.
   - Technologie: LLM observability nástroje (např. Langfuse, LangSmith, Helicone, PromptLayer) nebo vlastní store.

4. Auditní log nástrojů a oprávnění (tooling/audit)
   - Odděl „co LLM navrhl“ vs „co systém skutečně provedl“.
   - Loguj: rozhodnutí policy-enforceru, zamítnuté akce, scope/entitlements, sandbox výsledky.
   - Technologie: append-only log (WORM/S3 Object Lock, immutability), RBAC/ABAC, policy engine (např. OPA).

5. Metriky kvality a spolehlivosti (SLO)
   - Kvantifikuj: success rate úloh, factuality proxy (např. „citace nalezeny“), tool-success rate, halucinace proxy (kontradikce, neplatné JSON, schema-fail), time-to-answer, cost per task.
   - Technologie: Prometheus + Grafana, datové testy, schema validace (JSON Schema), canary release.

6. Evals a regresní testy (offline i online)
   - Dataset typických úloh + automatické skórování (exact match, rubric, pairwise).
   - U agentů navíc: testuj „trajectory“ (správná sekvence nástrojů) i „final answer“.
   - Technologie: eval frameworky (interní), golden-sety, A/B testy, replay produkčních session (se scrubem PII).

7. Získávání signálu od uživatelů (feedback loops)
   - In-app: thumbs up/down + důvod, „was this helpful“, report hallucination, rating nástrojových akcí.
   - Technologie: event ingestion + analýza, aktivní učení (prioritizace chyb), human review queue.

8. Analýza konverzací a „conversation mining“
   - Topic clustering, detekce opakovaných selhání, „funnel“ analýza (kde uživatel odpadá), intent drift.
   - Technologie: embeddingy + vektor DB, klasifikátory, BI (Metabase/Superset/Looker), datový sklad
     (BigQuery/Snowflake).

9. Bezpečnost a soukromí (privacy-by-design analytics)
   - Minimalizace dat: hashování/pseudonymizace identifikátorů, redakce PII, sampling, retenční politiky.
   - Oddělené úrovně logů: prod vs debug; citlivé prompty jen na explicitní „debug session“.
   - Technologie: DLP/redaction, tokenizace, KMS, role-based přístup, differential privacy (pokročilé).

10. Analytika „agent graphu“ (kroky, větvení, plánování)
   - Modeluj agentní běh jako graf: uzly = LLM/tool, hrany = kontrola toku, atributy = čas/cena/chyby.
   - Umožní to najít „drahé smyčky“, zbytečné tool-calls a body s nejvyšší chybovostí.
   - Technologie: event sourcing + graf DB (Neo4j) nebo analytika v SQL nad „steps“ tabulkou.

11. Závěr
   - Kombinace: event telemetrie + OTel tracing + LLM-specifické observability + evals + feedback, doplněné o audit/policy logy a privacy vrstvy.
   - Klíč: jednotné korelační ID napříč během agenta a striktní oddělení návrhu LLM vs provedené akce.






Objective comparison of token/cost efficiency on “the same coding projects” is only possible if you run the same eval harness (same task dataset, same tests, same model versions, and same parameters). 

The most practical metric is cost_per_success (total cost / number of tasks that pass build+tests+lint+typecheck), supplemented by tokens_per_success and time_per_success. 

For collecting metrics and tracing agent runs, observability platforms like Langfuse/LangSmith/Lumina are useful, and for cross-provider measurement a gateway approach (e.g., Helicone) often works best. 

For actual “variant comparison” (model/prompt/agent), you want A/B experiments and dataset-based evaluations; that is what Langfuse/Helicone and CI eval runners are designed for. 

Without pricing normalization and control of cache/retries/tool-calls, the comparison will be biased. 

A good workflow is: define the dataset plus automated tests as ground truth, log trace/token/cost/latency for every run, and continuously run regression comparisons after changes to prompts or agent strategies.





Objektivní porovnání token/cost efektivity u „stejných kódovacích projektů“ je možné jen tehdy, když běžíš přes stejný eval harness (stejný dataset úloh, stejné testy, stejné model verze a parametry).

Nejpraktičtější metrika je cost_per_success (celkové náklady / počet úloh splněných podle build+test+lint+typecheck), doplněná o tokens_per_success a time_per_success.

Pro sběr metrik a trasování agentních běhů se hodí observability platformy jako Langfuse/LangSmith/Lumina a pro měření napříč providery často nejlépe funguje gateway přístup (např. Helicone). 

Pro samotné „porovnání variant“ (model/prompt/agent) je užitečné mít A/B experimenty a datasetové evaluace; na to míří Langfuse/Helicone a CLI eval nástroje typu prompt-eval runner v CI. 

Bez normalizace ceníků a kontroly cache/retry/tool-calls bude srovnání zkreslené.
Doporučený postup je: definovat dataset + automatické testy jako ground truth, logovat trace/token/cost/latency u každého běhu a průběžně dělat regresní porovnání po změnách promptů či agentních strategií.








VSCodium
About
binary releases of VS Code without MS branding/telemetry/licensing
 
Klíčový ekosystém pro VSCodium je Open VSX (alternativa k VS Code Marketplace)
Roo Code – explicitně dokumentuje instalaci přes Open VSX pro VSCodium


Tabby







Cline




Top Coding Models in Kilo This Week
kilo leader board
 

 











code token efficiency  



Žádné komentáře: