ontoloji.orgOpen Reference Hub
Agent Architecture & Governance11 min read·Updated: 2026-12-03·Türkçe sürüm →

OpenTelemetry for Enterprise AI Agents: W3C Traceparent, MCP Spans & Data Custody

Connecting application spans, model API calls, Managed Agents sessions, and internal MCP servers into one W3C traceparent tree while avoiding auto-disable traps and ZDR/PII custody leaks.

Executive Summary — Key Takeaways
  • 01End-to-end agent tracing unites four layers—Application, Client SDK, Model Platform (service.name = claude-platform), and internal MCP servers—by forwarding W3C traceparent inside MCP params._meta.
  • 02Sending an incoming traceparent header with the sampled flag off (00) suppresses both the top-level API span and all nested anthropic.mcp_tool_use spans.
  • 03OTLP/HTTP destinations require public-DNS HTTPS 443 without /v1/traces manually appended, and auto-disable immediately on 3xx redirects, private IP resolution, or 24 hours of delivery failures.
  • 04Exported spans leave your model provider's Zero Data Retention (ZDR) boundary and enter your observability vendor's custody—default to metadata_only when ERP or PII payloads are in scope.

1. Four-Layer W3C Traceparent Propagation Into Internal MCP Servers

Debugging a multi-turn enterprise agent from flat HTTP logs is guesswork: an operator needs one unified trace showing the user request, every model reasoning turn, which MCP tool was selected, and how many milliseconds the downstream ERP replica or API spent.

  • MCP params._meta Context Handoff: On tools/call invocations, the platform injects a traceparent referencing anthropic.mcp_tool_use directly into params._meta, letting internal MCP servers parent their database and validation spans seamlessly.
  • The Sampled-Off Suppression Trap: If an upstream gateway sends traceparent with sampled = 0, the platform emits zero spans for that turn; pin sampling to 100% on audited financial and shop-floor workflows.
Unified W3C Trace Tree Across Application, SDK, Model Platform & MCP Server
[1] Enterprise App Span (W3C traceparent: 00-<traceId>-<spanId>-01)
 └── [2] Client SDK Span (must include W3C TraceContext propagator alongside B3)
      └── [3] Model Platform Span (service.name = "claude-platform")
           ├── anthropic.messages.create
           └── anthropic.mcp_tool_use ──► forwards traceparent in params._meta!
                └── [4] Internal Enterprise Ontology MCP Span (SQL / ERP BAPI latency)

2. OTLP/HTTP Delivery Timeouts, Retries & Three Auto-Disable Triggers

While a default OpenTelemetry Collector listens on port 4318, cloud model push exporters require an HTTPS hostname on port 443 accepting protobuf OTLP/HTTP payloads:

  • Base URL Hygiene & Compression Fallback: Supply the base prefix without /v1/traces (the exporter appends /v1/traces automatically unless overridden). Payloads arrive gzip-compressed first and immediately retry uncompressed on HTTP 400 or 415.
  • Strict 5s / 5s / 10s Budget & Deduplication: Endpoints have 5 seconds for TLS handshake, 5 seconds to response headers, and 10 seconds total including uncompressed fallback. Because delivery is at-least-once and best-effort, deduplicate in your SIEM/collector by trace_id + span_id.
  • Three Silent Shutoff Triggers: Returning any 3xx redirect, resolving the collector hostname to a non-public IP, or failing all deliveries for 24 hours flips the destination to Disabled until an administrator re-enables it.

3. Metadata-Only vs. Full Content, ZDR Eligibility & Data Custody

Observability pipelines frequently become accidental compliance leaks when Full content tracing is turned on indiscriminately:

  • Custody & ZDR Boundaries: Once spans reach your third-party OTLP collector, they sit outside your LLM provider's custody and Zero Data Retention terms (and stateful Managed Agents sessions are not ZDR-eligible to begin with).
  • Pair Best-Effort OTLP With Deterministic Ontology Audit Logs: Use metadata_only OTLP spans for latency and token alerting, while recording immutable, caller-signed ERP read/write provenance inside your on-premise enterprise ontology keyed by the shared trace_id.
Compliance Rule: Never Rely on Best-Effort Push Spans as Your Sole Audit Ledger

Best-effort OTLP exports can drop spans during collector maintenance without failing the agent turn. Keep authoritative approval and mutation logs inside your transactional ontology database.

Glossary Concepts Referenced in This Guide

Open License (CC BY 4.0) · Cite This Page

Free to reference in engineering docs, ADRs, articles, and course syllabi with attribution.

[OpenTelemetry for Enterprise AI Agents: W3C Traceparent, MCP Spans & Data Custody — Ontoloji.org](https://ontoloji.org/en/guides/opentelemetry-for-ai-agents-w3c-traceparent-mcp-spans-and-custody)

More Guides in This Series

Core Architecture
How AI Uses an Ontology
9 min read
Agent Engineering
Agent Harness vs. Ontology
8 min read
Data Engineering
ERP, CRM & MES Patterns
10 min read
Strategy & Governance
30-Day Ontology Strategy
7 min read
ERP Integration
ERP Ontology Integration Guide
11 min read
ERP Data Engineering
Logo Tiger, Nebim V3 & Turkish Unicode Traps
14 min read
Agent Governance
Adversarial Verification, Permissions & Compaction
13 min read
Verification Engineering
Absence-Aware Gates & Ratio Reconstruction
13 min read
Provenance & Governance
Draft vs. Normative Provenance Hygiene
12 min read
SAP & Protocol Architecture
SAP BTP, Cloud Connector & ORD Ontology
11 min read
ERP Write-Safety
Logo REST, Nebim Integrator & UBL-TR Safety
12 min read
Platform Architecture Comparison
Cortex, Genie, dbt & Cube vs. Ontology
12 min read
Systems Engineering & Forensics
ERP Integrator Anti-Patterns & Forensics
13 min read
Platform Architecture Comparison
Fabric IQ, D365 MCP & SAP Joule vs. Ontology
12 min read
Retrieval & RAG Architecture
PageIndex Vectorless Tree RAG vs. Vector DBs
11 min read
Platform Architecture Comparison
Atlan, Stardog & Neo4j vs. Ontology
12 min read
Statutory & Financial Governance
GİB UBL-TR, VUK/TMS 29 & KVKK Ontology
13 min read
Agent Memory & Ontology Architecture
Cognee & Zep Graphiti vs. Ontology
11 min read
Protocol & Multi-Agent Architecture
MCP vs. OpenAPI & Specialist Agents
12 min read
Protocols & Standards
MCP 2026-07-28: Tasks, Events & Apps
13 min read
Agent Architecture & Governance
Agent Harness Engineering Rubric
12 min read
Agent Architecture & Governance
Multi-Agent Task Boards & Mailboxes
12 min read
Verification & Security
Generate-Evaluate-Repair & Observers
12 min read
Verification & Security
NSA MCP Security & CIMD vs. DCR
13 min read