Skip to main content

Observability & Telemetry

MeetLoyd implements OpenTelemetry (OTel) for standardized observability of AI agent executions, providing distributed tracing and metrics following industry-standard semantic conventions.

Overview

The telemetry system provides:

  • Distributed Tracing: Track requests across agent executions, LLM calls, and tool invocations
  • Metrics Collection: Counters and histograms for executions, tokens, latency, and costs
  • Gen AI Semantic Conventions: Industry-standard gen_ai.* attributes for LLM observability
  • OTLP Export: Compatible with any OpenTelemetry-compatible backend

Architecture

The telemetry pipeline flows from the MeetLoyd platform (agent execution spans, LLM call spans, tool execution spans) through the OpenTelemetry SDK (BatchSpanProcessor, MetricReader) to the OTLP/HTTP Exporter, which delivers data to your observability backend (Grafana, Honeycomb, Datadog, Jaeger, etc.).

Traced Operations

Agent Execution Spans

Root spans created for each agent execution:

AttributeDescription
gen_ai.agent.idUnique agent identifier
gen_ai.agent.nameHuman-readable agent name
gen_ai.request.modelLLM model used
gen_ai.provider.nameProvider (anthropic, openai, etc.)
meetloyd.tenant.idTenant identifier
meetloyd.user.idUser who triggered execution

LLM Call Spans

Child spans for each LLM API call:

AttributeDescription
gen_ai.operation.nameOperation type (chat, completion)
gen_ai.request.modelModel requested
gen_ai.request.max_tokensMax tokens parameter
gen_ai.request.temperatureTemperature parameter
gen_ai.usage.input_tokensInput tokens consumed
gen_ai.usage.output_tokensOutput tokens generated
gen_ai.response.idProvider response ID
gen_ai.response.finish_reasonsWhy generation stopped

Tool Execution Spans

Child spans for each tool invocation:

AttributeDescription
gen_ai.tool.nameTool identifier
gen_ai.tool.call.idUnique call identifier
gen_ai.tool.typeTool type (builtin, custom)

Metrics

Counters

MetricDescription
gen_ai.agent.executionsTotal agent executions
gen_ai.llm.callsTotal LLM API calls
gen_ai.tool.callsTotal tool invocations
gen_ai.tokens.inputTotal input tokens
gen_ai.tokens.outputTotal output tokens
gen_ai.errorsTotal errors by type

Histograms

MetricDescription
gen_ai.agent.durationExecution duration (ms)
gen_ai.llm.latencyLLM call latency (ms)
gen_ai.tool.latencyTool execution latency (ms)
gen_ai.cost.usdExecution cost (USD)
gen_ai.tokens.per_executionTokens per execution

Supported Backends

MeetLoyd's OTLP export is compatible with:

BackendNotes
Grafana Cloud (Recommended)Fully managed, generous free tier, cloud-agnostic
HoneycombTrace-first observability
DatadogFull-stack monitoring
AxiomLog analytics
AWS X-RayVia OpenTelemetry Collector
Azure MonitorVia Azure Monitor Exporter
Google Cloud TraceVia GCP exporter
Any OTLP-compatible collectorUniversal

Security Considerations

What's Captured

Telemetry data includes agent and user identifiers, model names and parameters, token counts and costs, and execution timing.

What's NOT Captured

Telemetry does not contain prompt content or responses, user messages, tool input/output data, or PII/sensitive business data.

Network Security

All OTLP exports use HTTPS. Authentication headers are supported. No data is exported when telemetry is disabled.

Compliance

OpenTelemetry supports SOC 2 (audit trail of AI operations), ISO 27001 (monitoring and incident detection), and GDPR (no PII in telemetry data by design).

Graceful Degradation

When telemetry is disabled or misconfigured, all tracing functions return no-ops with zero performance overhead. The application continues normally. A warning is logged if telemetry is enabled without an endpoint.

Additional Observability

Beyond OpenTelemetry, MeetLoyd provides:

  • Structured Logging: Pino-based JSON logs with correlation IDs
  • Chain of Thought Logging: Full reasoning capture in database
  • Agent Run Tracking: Execution history in the agent runs table
  • Audit Logs: Security-relevant events for compliance

See Audit Logs and SIEM Integration for more.