FIELD NOTES / WHITEPAPER 003

Your AI Agent Is Running.
Is It Actually Working?

Go + OpenTelemetry + Datadog. Turn traces into evidence, evidence into alerts, and alerts into verified recovery.

By · Engineering field notes · November 4, 2026

OBSERVABILITY CONTRACTTRACE DATASETSAI ANALYSISRECOVERY

01 / Start with a contract, not a wall of charts.

An agent can return HTTP 200, stay inside its CPU limit, and still produce an unsupported answer or repeat an expensive tool call. Infrastructure health is necessary, but the operational question is whether the platform completed the intended task correctly, within its deadline, budget, and authority.

The observability contract is a versioned agreement between the service owner, platform team, security, and on-call responders. It connects user stories to evidence, defines what each signal means, and names the decision that follows a threshold breach. Treat the dashboards, monitors, trace schema, evaluation rubric, and recovery policy as implementations of that agreement.

Write the document around decisions
User storyWhat must be observedOperational decision
A user needs a correct incident summary on time.Durable task outcome, completion deadline, grounding evidence, and unfinished-task age.Detect incorrect or stalled work, even when transport succeeds.
On-call needs to find the failing step.Retrieval, model, tool, queue, and credential spans correlated with release and policy versions.Identify the dependency or change responsible for degradation.
The platform should recover safely.Fresh error ratios, independent probes, action history, and post-action results.Approve a bounded action and verify that it helped.
The owner needs to trust the evidence.Sampling coverage, ingestion loss, evaluator coverage, and dataset provenance.Declare unknown when telemetry is insufficient.

For each signal, write its owner, type, unit, population, allowed dimensions, aggregation, measurement point, delay, retention, dashboard, monitor, and runbook. Define exclusions explicitly. A retried tool attempt and a completed user task are different populations; combining them in one error ratio produces misleading results.

YAML / an internal observability contract

# Proposed internal schema; requires your validator and generator.
apiVersion: observability.seismicparadise.com/v1alpha1
kind: ObservabilityContract
metadata:
  name: agent-worker
  owner: platform
spec:
  version: "1.0"
  journey: incident-triage
  signals:
    - name: retrieval-errors
      numerator: agent.step.errors
      denominator: agent.step.calls
      scope: {env: production, service: agent-worker, step: retrieve}
      aggregation: ratio_of_sums
      window: 5m
      critical: 0.02
      recovery: 0.01
      minimumAttempts: 100
      missingData: unknown
      owner: platform-oncall
      runbook: runbooks/retrieval-degradation.md
  traces:
    sdkRecording: all
    metricsBeforeSampling: true
    retainedCohorts: [error, slow, healthy-baseline]
  evaluation:
    rubricVersion: retrieval-grounding-v1
    requireEvidenceSpanIds: true
    allowAbstention: true
  remediation:
    mode: approval-required
    allowedActions: [reduce-worker-concurrency]
    maximumConcurrentActions: 1
    cooldown: 15m

This proposed schema needs a validator and generator in your own repository. It is not a Datadog resource or an installed Kubernetes CRD. The numbers are illustrative starting points, not measured service promises. The downloadable contract template expands it into a reviewable document with user stories, metric definitions, dashboard requirements, dataset governance, and acceptance criteria.

02 / Give every span a meaning and every metric a population.

Model a task as a causal graph: accept, enqueue, plan, retrieve, invoke a model, authorize a tool, execute, and persist a result. Use stable span names such as agent.retrieve; put task IDs in controlled trace attributes, never in the operation name or metric tags. A retry gets its own attempt span. Parallel branches remain parallel in the graph.

TRACE MODEL / ONE LOGICAL TASK, MANY ATTEMPTS

TASK JOURNEY

Accept → Queue → Worker → Durable result

Task correlation reference connects execution segments; long-running work can use linked traces.

PLANNING BRANCH

Plan → Retrieve → Model

Context propagation, retrieval evidence, model version, token budget, time to first token.

ACTION BRANCH

Authorize → Tool → Verify

Policy decision, execution outcome, safe error category, resource verification.

RETRIES ARE SEPARATE EVIDENCE

Attempt 1: timeout → Attempt 2: success

The first attempt remains an error; final task success is recorded once by the durable state machine.

Figure 1. A failed child span can coexist with a successful task. Task success, step reliability, and semantic quality need separate measures.
Minimum signal inventory
SignalDefinition and dimensionsUse
agent.step.calls / errorsCounts per completed attempt; env, service, step. Same scope and window.Step error ratio; retries count as attempts.
agent.step.duration_secondsDistribution in seconds, same bounded dimensions.Latency percentiles and budget violations.
Task outcomes + oldest outstanding ageDeduplicated durable transitions and a gauge over pending tasks.User SLI and detection of tasks that never emit a terminal span.
Model tokens, cost estimate, and tool iterationsPer-task usage with provider/model version and price-table provenance.Runaway loops and spending anomalies; estimates are not invoices.
Evaluation outcomes and coverageFailures / evaluated cohort, plus evaluated / eligible.Semantic quality with an explicit coverage caveat.
Export loss, collector lag, missing parentsSDK/Collector health and dataset integrity.Determine whether evidence is trustworthy.

Evaluate duration, status, required attributes, and contract invariants on every received span. Evaluate critical-path duration, retries, fan-out, and terminal outcome when enough trace context is available. Error rates are aggregates over comparable operations and time windows; an individual span has a status, not a statistically meaningful service error rate.

Propagate W3C trace context through trusted HTTP calls and message headers. Extract it at the consumer, create a new attempt span, and preserve task correlation separately. For long queues and fan-out, document when to use span links instead of one unbounded trace. Treat incoming context as correlation data, never as authorization. Count orphaned spans, late arrivals, duplicate IDs, and missing terminal states.

03 / Instrument the boundary in Go.

The examples use OpenTelemetry for traces and the Datadog Go client for independent step metrics. Traces go to a protected Collector and then Datadog; DogStatsD metrics go to a configured Datadog Agent. Deploy those receivers on separate endpoints and follow the supported topology for your environment. A request is instrumented once; avoid duplicating spans with a second auto-instrumentation stack. [1][13]

Go / trace provider and propagation

package observability

import (
	"context"
	"go.opentelemetry.io/otel"
	"go.opentelemetry.io/otel/attribute"
	"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
	"go.opentelemetry.io/otel/propagation"
	"go.opentelemetry.io/otel/sdk/resource"
	sdktrace "go.opentelemetry.io/otel/sdk/trace"
)

// Configure OTEL_EXPORTER_OTLP_ENDPOINT and TLS through the environment.
// Use a private, authenticated Collector endpoint. No API key in code.
func StartTracing(ctx context.Context, version string) (func(context.Context) error, error) {
	exporter, err := otlptracegrpc.New(ctx)
	if err != nil {
		return nil, err
	}
	provider := sdktrace.NewTracerProvider(
		sdktrace.WithBatcher(exporter),
		// Tail sampling needs the spans: do not discard them in the SDK.
		sdktrace.WithSampler(sdktrace.AlwaysSample()),
		sdktrace.WithResource(resource.NewSchemaless(
			attribute.String("service.name", "agent-worker"),
			attribute.String("service.version", version),
			attribute.String("deployment.environment.name", "production"),
		)),
	)
	otel.SetTracerProvider(provider)
	otel.SetTextMapPropagator(propagation.TraceContext{})
	return provider.Shutdown, nil
}

Configure the OTLP endpoint, transport credentials, and service/env/version mapping explicitly. The example records all spans so a downstream tail sampler can inspect outcomes. That increases local telemetry volume and requires capacity planning. On shutdown, stop accepting work and call the returned shutdown function with a fresh bounded context. Install an OpenTelemetry error handler and monitor export failures. [2]

Go / one retrieval attempt, span, counters, and latency

package observability

import (
	"context"
	"errors"
	"github.com/DataDog/datadog-go/v5/statsd"
	"go.opentelemetry.io/otel"
	"go.opentelemetry.io/otel/attribute"
	"go.opentelemetry.io/otel/codes"
	"time"
)

// RunRetrieval instruments one attempt, not the whole user task.
// The caller owns retry policy and supplies a bounded, cancellable function.
func RunRetrieval(ctx context.Context, m *statsd.Client, fn func(context.Context) error) error {
	ctx, span := otel.Tracer("agent/steps").Start(ctx, "agent.retrieve")
	defer span.End()
	start := time.Now()
	ctx, cancel := context.WithTimeout(ctx, 2*time.Second)
	defer cancel()
	err := fn(ctx)
	if err == nil {
		err = ctx.Err()
	}
	elapsed := time.Since(start)
	outcome := "ok"
	if err != nil {
		outcome = "error"
		// Export safe categories, never raw provider responses or prompts.
		kind := "dependency"
		if errors.Is(err, context.DeadlineExceeded) {
			kind = "timeout"
		}
		span.SetStatus(codes.Error, kind)
		span.SetAttributes(attribute.String("error.type", kind))
	}
	span.SetAttributes(
		attribute.String("agent.step", "retrieve"),
		attribute.String("agent.outcome", outcome),
		attribute.Bool("agent.latency_breach", elapsed > 1500*time.Millisecond),
		attribute.String("obs.contract_version", "1.0"),
	)
	tags := []string{"service:agent-worker", "env:production", "step:retrieve"}
	// Counts are emitted for every attempt, independently of trace sampling.
	failures := int64(0)
	if err != nil {
		failures = 1
	}
	metricErr := errors.Join(
		m.Count("agent.step.calls", 1, tags, 1),
		m.Count("agent.step.errors", failures, tags, 1),
		m.Distribution("agent.step.duration_seconds", elapsed.Seconds(), tags, 1),
	)
	if metricErr != nil {
		// Route exporter health to a separate, rate-limited diagnostic sink.
		span.SetAttributes(attribute.Bool("obs.metric_enqueue_failed", true))
	}
	return err
}

Create the metrics client once with statsd.New using your protected Agent endpoint; check the returned error, reuse the client, and close it on shutdown. These metrics use sample rate 1. The SDK enqueue result does not confirm delivery: UDP loss, process crashes, and exporter failures still need independent monitoring. Use the durable task ledger for business-critical reconciliation.

The wrapper records attempts on return. Its 1.5-second latency marker is distinct from the 2-second deadline; crossing the latency budget does not automatically mean an execution error. Go cancellation is cooperative: every network call and dependency must honor the context. Panics and abrupt process termination may bypass this accounting, so add process health and unfinished-task detection. The caller owns retry policy and counts task completion separately.

Redact before export. This sample sends error categories and operational metadata, not raw prompts, tool arguments, credentials, or provider error bodies. Add approved evaluation evidence through a separate governed path. High-cardinality trace IDs and tenant references belong in restricted evidence stores, not metric labels.

Download the exact examples: bootstrap.go, step.go, window.go, and go.mod. They form an illustrative library; application wiring and a live Datadog configuration are separate work.

04 / Keep error evidence without losing the denominator.

The sampling invariant

Compute full-population operational metrics before dropping trace records. If the retained dataset contains only errors, errors divided by retained traces will describe the selection policy, not platform reliability.

TWO EVIDENCE PATHS / ONE INSTRUMENTED PLATFORM

  1. 01
    Record and classifyGo spans + independent attempt counters → safe fields and contract checks
  2. 02
    Preserve aggregate truthUnsampled metric path → Datadog rates, latency distributions, SLOs, and monitors
  3. 03
    Select investigation evidenceTrace-affinity Collector → tail decision → Datadog ingestion → explicit indexing policy
  4. 04
    Evaluate the datasetGoverned redacted evidence → deterministic analysis + bounded AI evaluation
Figure 2. Metrics and investigation traces have different jobs. Sampling the second path must not silently change the population measured by the first.

Datadog distinguishes ingestion from retention/indexing. A retention filter selects from already-ingested spans; it cannot resurrect data dropped by the SDK or Collector. An error-span filter is not equivalent to retaining every span in each affected trace. Configure and test trace-level retention when full causal context is required. Audit overlapping filters and default retention behavior when implementing a strict policy. [6]

With native Datadog SDKs, the Agent’s error sampling mechanism has its own limits and interactions with SDK sampling rules. Do not assume that setting normal sampling to zero preserves every error. For this OpenTelemetry design, a Collector tail sampler makes the decision after observing span outcomes; upstream head sampling must not discard those spans first. [7]

YAML / error-focused tail sampling

# Processor fragment, not a complete Collector deployment.
processors:
  tail_sampling:
    decision_wait: 30s
    num_traces: 50000
    expected_new_traces_per_sec: 1000
    policies:
      - name: errors
        type: status_code
        status_code: {status_codes: [ERROR]}
      - name: slow
        type: latency
        latency: {threshold_ms: 1500}
      - name: healthy-baseline
        type: probabilistic
        probabilistic: {sampling_percentage: 1}
# For strict error-only, remove slow and healthy-baseline.
# Keep full-population metrics on a separate, unsampled path.

The example keeps marked errors, slow traces, and a 1% baseline. Strict error-only mode keeps just the error policy. Its known blind spots are unmarked semantic failures, successful but slow operations, and healthy comparison examples. Analyze permitted evidence before the drop point if those cases still need evaluation. Do not label semantic findings as runtime errors merely to force retention; use a separate tested selection rule for that cohort.

All spans in a trace must reach the same sampling instance. The 30-second decision wait and 50,000-trace buffer are examples, not a promise of completeness. Size the buffer from arrival rate, duration, and burst headroom; measure late spans and evictions. Long-running agent tasks need bounded execution segments or a larger, justified decision window. An error arriving after the decision may be missed. [5]

Datadog’s current Collector guidance uses an OTLP pipeline with a span_metrics connector for APM metrics. Place that computation before tail sampling, using a compatible pinned distribution. This paper’s custom attempt counters provide a separate population for its monitor examples; do not assume every internal span automatically becomes a built-in APM metric. Verify resource-tag mapping, generated metric names, supported components, and intake authentication in staging. [3][4]

05 / Make the dashboard an operational interface.

Organize dashboards around questions and decisions. Every widget should identify its unit, window, population, owner, and drill-down. Display deployment and contract-version changes so an operator can connect a regression to a rollout. Keep user outcomes visible above infrastructure detail.

Dashboard specification to commit with the contract
ViewRequired widgetsDecision / drill-down
Journey healthTask success, deadline compliance, volume, oldest outstanding task, error-budget consumption.Are users affected? Link to task evidence and the incident runbook.
Dependency healthPer-step error ratio, p95/p99 latency, queue age, retries, credential renewal, provider throttling.Which dependency is constraining progress? Link to filtered traces.
Behavior and qualityGrounding findings, repeated tool cycles, evaluator abstentions, review agreement, coverage.Are successful responses still wrong? Link to the reviewed dataset.
Telemetry trustDropped spans, export retries, Collector memory, incomplete traces, ingestion/indexing volumes.Is this quiet dashboard healthy or blind?
Recovery evidenceActions proposed/approved/executed, guardrail denials, verification, rollback, recurrence.Did automation help, and should it remain enabled?

JSON / minimal Datadog dashboard seed

{
  "title": "Agent platform / contract 1.0",
  "layout_type": "ordered",
  "description": "Illustrative dashboard seed. Step attempts, not user tasks. Add quality, telemetry and recovery panels.",
  "widgets": [
    {
      "definition": {
        "type": "timeseries",
        "title": "Retrieval attempt rate / production",
        "requests": [
          {
            "q": "sum:agent.step.calls{env:production,service:agent-worker,step:retrieve}.as_rate()",
            "display_type": "line"
          }
        ]
      }
    }
  ]
}

Manage dashboard JSON with datadog_dashboard_json, then expand the seed to the five views above. For the duration distribution, enable the needed percentile aggregations and validate seconds versus milliseconds in the final query. Use consistent service and environment filters across widgets. A trace link is investigation evidence; a sampled span count is not a substitute for the unsampled throughput widget. [10]

06 / Turn thresholds into actionable alerts.

Separate a per-span breach marker, a rolling service-level signal, and permission to remediate. A single timeout can help find a trace. A sustained error ratio with enough traffic can page a responder. An automated action needs additional evidence and an approved policy.

For the retrieval example, calculate the sum of failed attempts divided by the sum of all attempts over the same five-minute window. Do not average per-bucket percentages. Datadog’s as_count() evaluation path supports this ratio-of-sums behavior. Keep scope and dimensions identical in numerator and denominator. [8]

Terraform / error ratio, minimum-volume gate, and composite monitor

# Fragment for the DataDog/datadog provider; pin a tested version.
# Provider credentials belong in a protected deployment environment.
resource "datadog_monitor" "retrieval_error_ratio" {
  name = "Retrieval error ratio exceeds 2 percent"
  type = "query alert"
  query = "sum(last_5m):sum:agent.step.errors{env:production,service:agent-worker,step:retrieve}.as_count() / sum:agent.step.calls{env:production,service:agent-worker,step:retrieve}.as_count() > 0.02"
  message = "Inspect retrieval evidence and the approved runbook."
  monitor_thresholds {
    critical = 0.02
    critical_recovery = 0.01
  }
  require_full_window = false
  notify_no_data = false
  tags = ["team:platform", "contract:1.0"]
}
resource "datadog_monitor" "retrieval_volume" {
  name = "Retrieval volume permits ratio evaluation"
  type = "query alert"
  query = "sum(last_5m):sum:agent.step.calls{env:production,service:agent-worker,step:retrieve}.as_count() >= 100"
  message = "Volume gate only; do not route separately."
  monitor_thresholds { critical = 100 }
  require_full_window = false
  notify_no_data = false
}
resource "datadog_monitor" "retrieval_page" {
  name = "Retrieval error ratio with sufficient traffic"
  type = "composite"
  query = "${datadog_monitor.retrieval_error_ratio.id} && ${datadog_monitor.retrieval_volume.id}"
  message = "Retrieval degradation. Add the agreed on-call recipient and runbook URL before enabling."
}

These monitor fragments target the metrics emitted by the Go wrapper and need a configured, pinned provider. The component monitors should not independently notify. Route the composite to the agreed rotation and runbook; it is a detector, not a remediation trigger on its own. Validate the query syntax with the Datadog API and exercise real notifications in staging before enabling it. [9]

Use a separate heartbeat and missing-data monitor. No traffic, a delayed exporter, and a true zero error rate are different states. The error-ratio monitor deliberately disables no-data notifications so it does not pretend to solve that problem. Add independent task-age and synthetic checks for low-volume periods where a minimum-volume gate would suppress a real outage.

Go / validate a completed error-rate window

package observability

import "time"

type Window struct {
	Calls, Errors    uint64
	End              time.Time
	TelemetryHealthy bool
}

// AssessWindow consumes aligned, deduplicated five-minute aggregates.
// "candidate" is evidence for a policy engine, never permission to act.
func AssessWindow(w Window, now time.Time) string {
	if !w.TelemetryHealthy || w.End.After(now) ||
		now.Sub(w.End) > time.Minute || w.Errors > w.Calls {
		return "unknown"
	}
	if w.Calls < 100 {
		return "insufficient-data"
	}
	if float64(w.Errors)/float64(w.Calls) > 0.02 {
		return "candidate"
	}
	return "within-budget"
}

This helper checks freshness, consistency, traffic volume, and the ratio. A candidate still needs repeated fresh windows and an independent probe before recovery automation is considered. For customer-facing SLOs, add multi-window burn-rate alerts with a defined good/eligible event population. Baseline anomaly detection can reveal a change, but releases and traffic shifts must be considered before taking action.

07 / Treat traces as a governed analytical dataset.

A trace dataset is more than a folder of errors. Its manifest needs a collection interval, schema version, service and release scope, sampling policy, trace completeness, redaction version, access rules, deletion deadline, and evaluator provenance. Preserve trace/span/parent IDs and deduplicate by trace ID plus span ID. Keep source records immutable; attach findings as separately versioned records.

SPAN ANALYTICS / FROM EVIDENCE TO A REVIEWABLE FINDING

  1. 01
    Validate and reconstructCheck schema, IDs, timestamps, parent links, duplicate delivery, and missing segments
  2. 02
    Run deterministic checksCompare latency budgets, retries, tool cycles, output schema, and authorized action outcomes
  3. 03
    Evaluate approved evidence with AIRedacted context + parent/child evidence + versioned rubric → structured finding or abstention
  4. 04
    Calibrate and routeGround-truth review + cohort metrics + evidence links → issue, alert candidate, or regression case
Figure 3. Cheap checks can cover every received span. AI evaluation has explicit scope, latency, cost, and coverage; it cannot inspect evidence that was never collected or was discarded.

Look for failures that conventional status flags miss: an empty retrieval that still returns 200, a conclusion unsupported by retrieved evidence, a repeated plan/tool cycle, schema-valid but incorrect output, or a tool reporting success when the resource never changed. Combine typed validators and independent resource checks with semantic evaluation. Timing metadata alone cannot establish factual correctness.

Run deterministic checks on every received record, and use a queue for bounded AI evaluation of relevant spans with their task context. Avoid a separate model call for every low-level network span. Group related evidence, enforce token and latency budgets, cache by evidence hash plus evaluator version, and record queue lag, evaluation failures, abstentions, and coverage. If full evaluation coverage is required, provision for it and report incomplete coverage explicitly.

JSON / proposed evaluation result envelope

{
  "dataset_id": "triage-holdout-v1",
  "trace_id": "<source trace ID>",
  "span_id": "<source span ID>",
  "evaluator_version": "grounding-v1",
  "cohort": "healthy-baseline",
  "completeness": "complete",
  "verdict": "needs-review",
  "category": "unsupported-conclusion",
  "evidence_span_ids": [
    "<retrieval span ID>",
    "<answer span ID>"
  ],
  "confidence": 0.82,
  "abstain_reason": null,
  "remediation_authorized": false
}

This is an internal dataset schema, not the Datadog intake payload. The model’s confidence is an uncalibrated score until checked against labeled examples. Require valid evidence IDs from the supplied context, bounded categories, schema validation, and an abstention path when evidence is missing. Treat prompts and tool outputs as untrusted text that may try to manipulate the evaluator.

Datadog Agent Observability supports managed and custom LLM-as-a-judge evaluations across traces and spans. Its dedicated intake API also accepts evaluation and feedback data with supported joins. Ordinary APM spans do not automatically become fully instrumented LLM records: configure the applicable integration or intake schema and map correlation IDs deliberately. The Go snippets here produce APM telemetry; connecting the governed evaluation dataset is a separate integration. [11][12]

Maintain a labeled healthy cohort and known failure cases, including rare failures. Split evaluation data by task or time so sibling spans do not leak across calibration and holdout sets. Measure reviewer agreement, precision, recall, false-positive rate, and abstention rate. Report quality separately for error, slow, and healthy cohorts; a risk-enriched dataset cannot estimate the population’s failure prevalence without a defensible sampling model.

08 / Make automated recovery a controlled state machine.

Dynamic resolution should choose among pre-approved, reversible actions using fresh operational evidence. Useful candidates include reducing worker concurrency during provider throttling, pausing a faulty queue consumer, or rolling back an eligible release. Each action needs a specific trigger, target selector, scope limit, verification probe, rollback procedure, owner, and expiry.

RECOVERY LOOP / EVIDENCE → POLICY → ACTION → PROOF

  1. 01
    Detect and corroborateMonitor fires → fresh full-population metrics + independent probe agree
  2. 02
    Authorize and boundAuthenticated event + policy + approval + lock + cooldown + action budget
  3. 03
    Execute a canary actionAllowlisted change on a constrained target → record idempotency key and outcome
  4. 04
    Verify or roll backCheck task success, latency, and side effects → expand, revert, or escalate
Figure 4. An AI finding may suggest a hypothesis. The policy controller grants authority, and independent post-action checks determine whether recovery succeeded.

Persist transitions such as proposed, approved, executing, verifying, recovered, and rolled-back. Authenticate inbound monitor events, reject stale evidence, deduplicate repeated delivery, and acquire a durable lock for the target. Cap concurrent actions and enforce cooldowns to prevent oscillation. A repeated timeout during execution must not repeat an external side effect.

Separate the diagnostic evaluator from the privileged executor. The evaluator cannot generate arbitrary shell commands for automatic execution or broaden its own permissions. Apply the Vault, Okta, and tool-gateway boundaries from Field Notes 002. A Kubernetes operator can reconcile desired remediation state, but a healthy reconciliation loop is not proof that a database, queue, or provider recovered.

Automation must stop when telemetry is stale, conflicting, or absent. Preserve a manual kill switch. A falling alert alone is insufficient evidence of recovery: traffic may have disappeared. Verify a controlled task, compare throughput and latency with the pre-action baseline, and check for unintended effects. Escalate if verification or rollback fails.

09 / Ship observability as reviewed infrastructure.

Keep the human-readable contract, machine-readable definitions, instrumentation, Collector configuration, Terraform dashboards and monitors, evaluator rubric, dataset schema, and runbooks in one reviewed change. A contract version should be visible in telemetry and deployment annotations so responders can identify what measurement rules were active.

Repository and delivery contract
ArtifactValidation before promotion
contracts/agent-worker.yaml + observability.mdRequired owners, units, populations, bounded tags, thresholds, recovery rules, and missing-data semantics.
instrumentation/ + collector/Compile Go; test context propagation, timeout accounting, sampling, missing parents, late spans, and telemetry loss.
datadog/monitors + dashboardsTerraform validate/plan; API query validation; correct units, filters, routing, and links.
datasets/manifest + evaluators/rubricRedaction, lineage, coverage, holdout results, reviewed failure examples, and deletion policy.
runbooks/ + remediation/policiesLeast privilege, idempotency, approval, bounded targets, kill switch, independent verification, rollback.

Make a small synthetic dataset with known outcomes: 100 attempts and 3 failures should evaluate to 3%, even when most successful traces are dropped. Add a successful task containing a failed retry, a silent semantic failure, a delayed child span, a missing metric stream, duplicate delivery, and a wrong AI verdict. Confirm that each produces the expected metric, evidence record, alert state, and permitted response.

Promote progressively: observe first, route alerts next, require approval for recovery, then automate only the proven low-risk actions. Monitor the observability system’s own cost and failure modes. The finished contract should answer four questions without guesswork: what happened, how much confidence do we have, who owns the response, and what action is permitted?

FROM TELEMETRY TO OPERATIONAL CONFIDENCE

Make your agent platform explain itself.

A Seismic Paradise Ops review can define your observability contract, trace dataset, Datadog views, alert thresholds, and safe recovery workflow around the user journeys that matter.

Discuss your observability stack ↗

Download the contract template ↓

Technical references

Primary documentation consulted November 4, 2026. This is an illustrative architecture and code guide. Examples do not install a Collector, provision Datadog resources, or enable automated remediation.

  1. OpenTelemetry Go instrumentation ↗
  2. OpenTelemetry Go exporters ↗
  3. Datadog Collector setup ↗
  4. Datadog sampling with OpenTelemetry ↗
  5. OpenTelemetry tail-sampling processor ↗
  6. Datadog trace retention ↗
  7. Datadog ingestion mechanisms ↗
  8. Datadog count-based monitor evaluation ↗
  9. Datadog Terraform monitor resource ↗
  10. Datadog Terraform dashboard JSON resource ↗
  11. Datadog Agent Observability evaluations ↗
  12. Datadog LLM Observability intake API ↗
  13. Datadog Go DogStatsD client ↗