Distributed tracing answers the one question metrics and logs can't touch: across a chain of microservices, where did the latency go or the failure actually begin? The vocabulary is compact, and the exam expects you to use it precisely.

needsmake up obs

Orientation

competency 4.1 · tracing solutions

Two habits make tracing tasks straightforward: knowing the exact OTLP address telemetry needs to hit, and remembering that a trace only hangs together if context propagates across every hop. Everything else is just reading the UI.

Lab topology

The OpenTelemetry Operator runs in opentelemetry-operator-system, with the Collector and Jaeger side by side in tracing. That gives you in-cluster OTLP endpoints at otel-collector.tracing.svc:4317 (gRPC) and :4318 (HTTP). Burn the pattern <svc>.<ns>.svc:4317 into memory, because almost every tracing task starts right there.

Vocabulary and plumbing

spans · context · pipeline

A trace captures one request's end-to-end journey. A span represents a single timed operation along the way, stamped with a trace ID, its own span ID, its parent span ID, status, attributes, and events. Together they form a tree anchored at the root span.

Context propagation stitches spans across service boundaries: the caller injects trace context into outbound headers, and the callee extracts it to continue the same trace rather than starting a brand-new one. Modern stacks use W3C traceparent (alongside tracestate, plus baggage for custom key-values traveling with the request). Older services may still speak B3 headers, so mixed fleets configure propagators for both.

The classic broken-propagation tell

If Jaeger fills up with hundreds of single-span traces (one per service, none stitched together), context propagation is broken. Suspect a proxy stripping unknown headers, a mismatched propagator (W3C vs. B3), a hand-rolled HTTP client skipping header injection, or an uninstrumented async hop like a message queue.

The OpenTelemetry pipeline

app (SDK or auto-instrumentation agent)
   │ OTLP  gRPC :4317 / HTTP :4318
   ▼
Collector   receivers ──▶ processors ──▶ exporters
             otlp, jaeger,     batch, memory_limiter,   otlp_grpc/jaeger,
             prometheus,       attributes, k8s_attributes, debug,
             filelog           tail_sampling            prometheus
   ▼
backend  Jaeger (traces) · Prometheus (metrics) · Loki (logs)

The Collector is the platform team's control plane for telemetry: sampling, batching, PII redaction, and routing all belong here instead of inside app code. That's the platform-engineering answer to controlling observability spend: update one Collector deployment instead of chasing forty application teams.

SamplingDecidesTrade-off
Head-basedat trace start, typically a fixed percentagecheap and stateless, but can easily drop the one slow or broken request you actually needed
Tail-basedafter the trace completes, based on errors or latencykeeps every interesting trace, at the cost of buffering full traces in memory and requiring every span of a trace to hit the exact same collector

Kubernetes-side: two CRDs

  • OpenTelemetryCollector: lets the operator manage collectors as Deployments, DaemonSets, StatefulSets, or Sidecars. Inspect its spec whenever you need to trace the receiver → processor → exporter chain.
  • Instrumentation: your zero-code auto-instrumentation path. Our lab ships one named auto in default; add instrumentation.opentelemetry.io/inject-java: "default/auto" (or -python, -nodejs, -dotnet) to a pod template and the admission webhook injects the language agent via an init container automatically.
Injection runs at pod creation only

Adding the annotation to a live Deployment won't touch existing pods; you have to trigger a rollout restart. Also make sure the annotation sits on spec.template.metadata (the pod template), not the Deployment's top-level metadata. Those two slip-ups cause 90% of "auto-instrumentation isn't working" headaches.

The Collector, field by field

pipelines, connectors, the processors that decide cost

A Collector configuration defines four data-path sections (receivers, processors, exporters, connectors), an extensions block for side capabilities (health_check, pprof, zpages), and a service.pipelines block that wires them together per signal. Declaring a component does nothing until a pipeline activates it. You can instantiate the same type multiple times with suffixes (otlp_grpc/2, otlp_http/loki), and a connector acts as both an exporter on one pipeline and a receiver on another (that's how span_metrics turns traces into RED metrics automatically). Note that Collector 0.16x renamed several components (otlp → otlp_grpc, otlphttp → otlp_http, k8sattributes → k8s_attributes, spanmetrics → span_metrics); older names still load with deprecation warnings, so stay fluent in both.

receivers:
  otlp: { protocols: { grpc: { endpoint: 0.0.0.0:4317 }, http: { endpoint: 0.0.0.0:4318 } } }
processors:
  memory_limiter: { check_interval: 1s, limit_mib: 800, spike_limit_mib: 160 }
  k8s_attributes: {}
  batch: {}
exporters:
  otlp_grpc/jaeger: { endpoint: jaeger-collector.tracing.svc:4317, tls: { insecure: true } }
  prometheus: { endpoint: 0.0.0.0:8889 }
connectors:
  span_metrics: {}
service:
  pipelines:
    traces:  { receivers: [otlp], processors: [memory_limiter, k8s_attributes, batch], exporters: [otlp_grpc/jaeger, span_metrics] }
    metrics: { receivers: [span_metrics], processors: [batch], exporters: [prometheus] }
ProcessorFields that matterRule of thumb
memory_limitercheck_interval, limit_mib (hard), spike_limit_mib (soft = hard minus spike; start around 20%), or limit_percentagealways put this first so back-pressure hits the receiver before OOM; pair with GOMEMLIMIT
batchsend_batch_size (8192), timeout (200ms), send_batch_max_sizeplace last right before exporters to cut RPC overhead
k8s_attributespod_association (k8s.pod.ip or k8s.pod.name+k8s.namespace.name), extract.metadata, extract.labelsneeds RBAC to watch pods, replicasets, and namespaces; without it, spans lose k8s.* attributes and log correlation breaks
resource / attributesactions: [{key, action: insert|upsert|delete|hash}]handle redaction centrally (like stripping http.request.header.authorization)
filterOTTL rules, e.g. dropping spans where attributes["http.route"] == "/healthz"dropping mid-trace spans breaks parent/child trees; prefer sampling whole traces instead
tail_samplingdecision_wait (30s), num_traces (50000), policies[] (always_sample, latency, status_code, probabilistic, rate_limiting, string_attribute, ottl_condition, and, composite)every span of a trace must hit the same collector; put a front-tier loadbalancing exporter (routing_key: traceID) ahead of multi-replica gateways
probabilistic_samplersampling_percentagehead sampling in the collector; cheap, but blind to errors

Most production setups split into two tiers: an agent (DaemonSet or sidecar) sitting right next to workloads to enrich and batch, forwarding to a gateway (Deployment behind a Service) that handles tail sampling, redaction, and fan-out. When verifying whether spans arrive at all, add the debug exporter (verbosity: detailed); the old logging exporter was removed in current builds and will crash startup.

Port/protocol mismatch trap

otlp_grpc expects host:port on 4317, while otlp_http expects a full URL on 4318. Crossing gRPC and HTTP ports causes cryptic connection resets or HTTP 415 / unimplemented errors. Note that Python auto-instrumentation speaks http/protobuf only, so always point its Instrumentation CR at port 4318.

Operator CRDs, Jaeger v2, and tracing failure modes

modes, annotations, backends, exemplars, failure modes

OpenTelemetryCollector and Instrumentation details

  • spec.mode: deployment (default), daemonset, statefulset (required for the target allocator or sharded tail sampling), and sidecar (injected via sidecar.opentelemetry.io/inject: "true" or a collector name, distinct from language injection annotations). The operator automatically renders spec.config into a ConfigMap and creates a Service matching your receiver ports (otlp-grpc, otlp-http). Enabling spec.targetAllocator lets a Collector StatefulSet shard Prometheus ServiceMonitor/PodMonitor scrapes.
  • Instrumentation fields: exporter.endpoint, propagators (tracecontext, baggage, b3), sampler.type (parentbased_traceidratio) and sampler.argument ("0.25"), plus per-language overrides (java.image, python.env, nodejs, dotnet, go).
  • Annotation values on instrumentation.opentelemetry.io/inject-<lang>: "true" (only works cleanly if there's one Instrumentation CR in the pod's namespace), "name", "namespace/name", or "false". Multi-container pods need instrumentation.opentelemetry.io/container-names: "app,worker" or only the first container gets instrumented. Use inject-sdk for env vars only, and note that Go auto-instrumentation uses eBPF with a privileged sidecar (pointing otel-go-auto-target-exe at the binary), which a restricted PSS namespace rejects.

Jaeger v2 and Tempo

Jaeger v2 is built straight on top of the OpenTelemetry Collector: one jaeger binary configured in Collector YAML, running as collector, query, ingester (from Kafka), or all-in-one. Its extensions include jaeger_storage (in-memory, Badger, Cassandra, Elasticsearch, OpenSearch, ClickHouse), jaeger_query (UI and API on port 16686), remote_sampling, and the adaptivesampling processor. Ingest is pure OTLP on 4317/4318; legacy v1 jaeger-agent and Thrift ports are gone (use an OpenTelemetry Collector instead). The HTTP query API (/api/traces?service=) stays unchanged for scripted checks.

You'll also see Grafana Tempo named in scenarios: an object-storage trace backend indexed primarily by trace ID, queried with TraceQL, and sporting a metrics-generator that emits span metrics and service graphs to Prometheus just like the Collector's span_metrics connector.

Exemplars and semantic conventions

An exemplar attaches a real trace_id to a Prometheus histogram bucket sample (# {trace_id="abc..."} in OpenMetrics text), letting you jump straight from a latency spike on a dashboard into an exact slow trace. Prometheus stores them when --enable-feature=exemplar-storage (spec.enableFeatures) is on, and Grafana wires the jump via exemplarTraceIdDestinations. Consistent semantic conventions tie all three signals together: service.name (unset = unknown_service), service.namespace, k8s.namespace.name, k8s.pod.name, k8s.deployment.name, http.request.method, http.response.status_code, and url.path (dots become underscores when exported to Prometheus).

Tracing failure modes at a glance

SymptomCauseWhere to look
hundreds of single-span tracesbroken propagation (proxy strips traceparent, W3C vs. B3 mismatch, manual client)outbound caller headers; propagators in Instrumentation
child span starts before its parentclock skew across nodesnode NTP; the trace itself is fine
blank gap in the waterfalluninstrumented hop (queue consumer, cron) or a filter processor dropped spansservice at the gap; collector pipeline config
slow/errored requests missinghead sampling dropped themmove to tail_sampling on latency/status_code, or bump sampling ratio
service listed as unknown_serviceOTEL_SERVICE_NAME / service.name missingInstrumentation resource attributes or pod env vars
spans arrive without k8s.* attributesmissing k8s_attributes processor or RBAC, or gateway hides pod IP from pod_associationcollector logs; associate via k8s.pod.name instead of IP
collector logs data refused due to high memory usagememory_limiter hard cap trippedraise memory limits or sample earlier (working as intended to prevent OOM)
init container injected, zero spanswrong OTLP port/protocol, or NetworkPolicy blocks egress to tracingcheck OTEL_EXPORTER_OTLP_ENDPOINT in the pod and test connectivity
How this gets tested

"Deploy a Collector forwarding OTLP traces to Jaeger" → OpenTelemetryCollector with an otlp receiver, pipeline, and exporter pointed at Jaeger on 4317. "Auto-instrument this Deployment" → Instrumentation CR + pod-template annotation + rollout restart. "Keep only errors and requests over 1s" → tail_sampling with status_code and latency policies (plus trace-ID-aware routing if running multiple replicas).

Exercises

tick the dot when its check passes

kubectl -n tracing get cm -o yaml | grep -A30 'receivers:' (or the OpenTelemetryCollector CR if present). Draw the chain on paper: which receivers listen, which exporter points at Jaeger, what processors sit between.

verify: you can name the exact address an application in this cluster should send OTLP to (otel-collector.tracing.svc:4317 or the HTTP twin). Every tracing task starts by knowing that address.

telemetrygen is the collector project's own traffic generator, and it makes tracing exercises deterministic:

kubectl run telemetrygen --restart=Never \
  --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest \
  -- traces --otlp-endpoint otel-collector.tracing.svc:4317 --otlp-insecure \
     --service curriculum-drill --traces 20 --child-spans 3
outputcaptured 2026-08-26
$ kubectl run telemetrygen --restart=Never \
  --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest \
  -- traces --otlp-endpoint otel-collector.tracing.svc:4317 --otlp-insecure \
     --service curriculum-drill --traces 20 --child-spans 3
pod/telemetrygen created
verify: in Jaeger (address from make urls): service curriculum-drill appears in the dropdown, 20 traces, each of 4 spans (one root plus three children, two levels). Then verify the API way, because exams grade with curl: curl -s 'http://<jaeger>/api/traces?service=curriculum-drill&limit=1' | jq '.data[0].spans | length' returns 4.

Open one trace, read the waterfall: parent/child structure, per-span duration, attributes on each span. Answer for that trace: which span is the critical path, and what would you look at next if the leaf span were slow (that span's service's logs, at that timestamp; this is why traces carry IDs you can grep logs for).

verify: that narration is what "trace analysis and root cause" means as a testable skill.

Run a small Java service (ghcr.io/open-telemetry/opentelemetry-java-examples images work, or any Spring Boot sample), annotate its pod template with instrumentation.opentelemetry.io/inject-java: "default/auto", restart, and hit its endpoint. If it does not appear, the diagnostic ladder is: annotation on the pod template (not the Deployment metadata), pod restarted since annotating, Instrumentation CR namespace/name correct in the annotation value, operator webhook alive.

verify: kubectl describe pod shows the injected init container, and the service appears in Jaeger with HTTP spans you never wrote.

No cluster needed: service A calls B through a proxy that strips unknown headers. Describe what Jaeger shows and which header must survive.

verify: if your answer names traceparent and predicts orphaned single-service traces, the concept is yours.

A sidecar collector buffers locally so the app never blocks on a network hop, and the operator injects it from an annotation. Seeing the injected container is the whole point; the annotation is two words.

kubectl apply -f - <<'EOF'
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata: { name: side, namespace: default }
spec:
  mode: sidecar
  config:
    receivers:
      otlp:
        protocols:
          grpc: { endpoint: 0.0.0.0:4317 }
          http: { endpoint: 0.0.0.0:4318 }
    processors:
      batch: { timeout: 5s }
    exporters:
      otlp:
        endpoint: otel-collector.tracing.svc:4317
        tls: { insecure: true }
    service:
      pipelines:
        traces: { receivers: [otlp], processors: [batch], exporters: [otlp] }
EOF
sleep 15
kubectl -n default run sidecar-demo --image=ghcr.io/stefanprodan/podinfo:6.7.1 --annotations="sidecar.opentelemetry.io/inject=true"
kubectl -n default wait --for=condition=Ready pod/sidecar-demo --timeout=120s
kubectl -n default get pod sidecar-demo -o json | jq -r '[.spec.initContainers[]?, .spec.containers[]?] | .[] | "\(.name) \(.image)"'
kubectl -n default get opentelemetrycollector -o custom-columns=NAME:.metadata.name,MODE:.spec.mode
kubectl -n default delete pod sidecar-demo
kubectl -n default delete opentelemetrycollector side
outputcaptured 2026-11-18
$ kubectl apply -f - <<'EOF'
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata: { name: side, namespace: default }
spec:
  mode: sidecar
  config:
    receivers:
      otlp:
        protocols:
          grpc: { endpoint: 0.0.0.0:4317 }
          http: { endpoint: 0.0.0.0:4318 }
    processors:
      batch: { timeout: 5s }
    exporters:
      otlp:
        endpoint: otel-collector.tracing.svc:4317
        tls: { insecure: true }
    service:
      pipelines:
        traces: { receivers: [otlp], processors: [batch], exporters: [otlp] }
EOF
opentelemetrycollector.opentelemetry.io/side created
$ sleep 15
$ kubectl -n default run sidecar-demo --image=ghcr.io/stefanprodan/podinfo:6.7.1 --annotations="sidecar.opentelemetry.io/inject=true"
pod/sidecar-demo created
$ kubectl -n default wait --for=condition=Ready pod/sidecar-demo --timeout=120s
pod/sidecar-demo condition met
$ kubectl -n default get pod sidecar-demo -o json | jq -r '[.spec.initContainers[]?, .spec.containers[]?] | .[] | "\(.name) \(.image)"'
otc-container otel/opentelemetry-collector-contrib:0.162.0
sidecar-demo ghcr.io/stefanprodan/podinfo:6.7.1
$ kubectl -n default get opentelemetrycollector -o custom-columns=NAME:.metadata.name,MODE:.spec.mode
NAME   MODE
side   sidecar
$ kubectl -n default delete pod sidecar-demo
pod "sidecar-demo" deleted from default namespace
$ kubectl -n default delete opentelemetrycollector side
opentelemetrycollector.opentelemetry.io "side" deleted from default namespace
verify: the listing names two containers, your podinfo container and otc-container, the collector the operator injected from the annotation. It may appear under initContainers rather than containers, which is the operator's native-sidecar form and still the injected collector. If only your container is listed, the operator found no sidecar-mode collector in the namespace, and the collector listing says so.

Head sampling throws away traces before anything is known about them. Tail sampling waits for the whole trace and then keeps the errors and the slow ones, paid for by buffering every span until the decision is made.

kubectl -n tracing get opentelemetrycollector otel -o jsonpath='{.spec.config.service.pipelines.traces}' | jq
kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"processors":{"tail_sampling":{"decision_wait":"10s","policies":[{"name":"errors","type":"status_code","status_code":{"status_codes":["ERROR"]}},{"name":"slow","type":"latency","latency":{"threshold_ms":500}}]}},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","tail_sampling","batch"],"exporters":["otlp_grpc/jaeger"]}}}}}}'
kubectl -n tracing rollout status deploy otel-collector --timeout=180s
kubectl -n tracing run gen-ok --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service ok-service --traces 5
kubectl -n tracing run gen-err --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service err-service --status-code Error --traces 5
sleep 30
kubectl -n tracing port-forward svc/jaeger 16686:16686 & PF1=$!
sleep 5
curl -s 'http://localhost:16686/api/services' | jq
curl -s 'http://localhost:16686/api/traces?service=err-service&limit=10' | jq '.data | length'
curl -s 'http://localhost:16686/api/traces?service=ok-service&limit=10' | jq '.data | length'
kill $PF1
# put the shared pipeline back: left in place, this drops every ordinary trace for the rest of the page
kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"processors":{"tail_sampling":null},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","batch"],"exporters":["otlp_grpc/jaeger"]}}}}}}'
kubectl -n tracing rollout status deploy otel-collector --timeout=180s
outputcaptured 2026-11-18
$ kubectl -n tracing get opentelemetrycollector otel -o jsonpath='{.spec.config.service.pipelines.traces}' | jq
{
  "exporters": [
    "otlp_grpc/jaeger"
  ],
  "processors": [
    "k8s_attributes",
    "batch"
  ],
  "receivers": [
    "otlp"
  ]
}
$ kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"processors":{"tail_sampling":{"decision_wait":"10s","policies":[{"name":"errors","type":"status_code","status_code":{"status_codes":["ERROR"]}},{"name":"slow","type":"latency","latency":{"threshold_ms":500}}]}},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","tail_sampling","batch"],"exporters":["otlp_grpc/jaeger"]}}}}}}'
opentelemetrycollector.opentelemetry.io/otel patched
$ kubectl -n tracing rollout status deploy otel-collector --timeout=180s
Waiting for deployment spec update to be observed...
Waiting for deployment spec update to be observed...
Waiting for deployment "otel-collector" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
deployment "otel-collector" successfully rolled out
$ kubectl -n tracing run gen-ok --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service ok-service --traces 5
2026-11-18T09:48:17.153Z	INFO	traces/traces.go:53	starting gRPC exporter
2026-11-18T09:48:17.153Z	INFO	grpclog/component.go:69	[core] original dial target is: "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:48:17.154Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel created for target "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:48:17.154Z	INFO	channelz/trace.go:200	[core] [Channel #1] parsed dial target is: resolver.Target{URL:url.URL{Scheme:"dns", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/otel-collector.tracing.svc:4317", Fragment:"", RawQuery:"", RawPath:"", RawFragment:"", ForceQuery:false, OmitHost:false}}	{"grpc_log": true}
2026-11-18T09:48:17.154Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel authority set to "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:48:17.154Z	INFO	traces/traces.go:125	generation of traces is limited	{"per-second": 1}
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
2026-11-18T09:48:19.156Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel Connectivity change to CONNECTING	{"grpc_log": true}
2026-11-18T09:48:19.156Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel exiting idle mode	{"grpc_log": true}
2026-11-18T09:48:19.263Z	INFO	channelz/trace.go:200	[core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "10.96.174.160:4317",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Metadata": null
    }
  ],
  "Endpoints": [
    {
      "Addresses": [
        {
          "Addr": "10.96.174.160:4317",
          "ServerName": "",
          "Attributes": null,
          "BalancerAttributes": null,
          "Metadata": null
        }
      ],
      "Attributes": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)	{"grpc_log": true}
2026-11-18T09:48:19.263Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel switches to new LB policy "pick_first"	{"grpc_log": true}
2026-11-18T09:48:19.263Z	INFO	grpclog/prefix_logger.go:42	[pick-first-leaf-lb] [pick-first-leaf-lb 0x210955ca0540] Received new config {
  "shuffleAddressList": false
... 45 more lines
$ kubectl -n tracing run gen-err --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service err-service --status-code Error --traces 5
2026-11-18T09:48:35.549Z	INFO	traces/traces.go:53	starting gRPC exporter
2026-11-18T09:48:35.549Z	INFO	grpclog/component.go:69	[core] original dial target is: "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:48:35.549Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel created for target "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:48:35.549Z	INFO	channelz/trace.go:200	[core] [Channel #1] parsed dial target is: resolver.Target{URL:url.URL{Scheme:"dns", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/otel-collector.tracing.svc:4317", Fragment:"", RawQuery:"", RawPath:"", RawFragment:"", ForceQuery:false, OmitHost:false}}	{"grpc_log": true}
2026-11-18T09:48:35.549Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel authority set to "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:48:35.549Z	INFO	traces/traces.go:125	generation of traces is limited	{"per-second": 1}
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
2026-11-18T09:48:37.554Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel Connectivity change to CONNECTING	{"grpc_log": true}
2026-11-18T09:48:37.554Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel exiting idle mode	{"grpc_log": true}
2026-11-18T09:48:37.560Z	INFO	channelz/trace.go:200	[core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "10.96.174.160:4317",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Metadata": null
    }
  ],
  "Endpoints": [
    {
      "Addresses": [
        {
          "Addr": "10.96.174.160:4317",
          "ServerName": "",
          "Attributes": null,
          "BalancerAttributes": null,
          "Metadata": null
        }
      ],
      "Attributes": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)	{"grpc_log": true}
2026-11-18T09:48:37.560Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel switches to new LB policy "pick_first"	{"grpc_log": true}
2026-11-18T09:48:37.560Z	INFO	grpclog/prefix_logger.go:42	[pick-first-leaf-lb] [pick-first-leaf-lb 0xb5dbff92620] Received new config {
  "shuffleAddressList": false
... 45 more lines
$ sleep 30
$ kubectl -n tracing port-forward svc/jaeger 16686:16686 & PF1=$!
$ sleep 5
Forwarding from 127.0.0.1:16686 -> 16686
Forwarding from [::1]:16686 -> 16686
$ curl -s 'http://localhost:16686/api/services' | jq
Handling connection for 16686
{
  "data": [
    "err-service"
  ],
  "total": 1,
  "limit": 0,
  "offset": 0,
  "errors": null
}
$ curl -s 'http://localhost:16686/api/traces?service=err-service&limit=10' | jq '.data | length'
Handling connection for 16686
5
$ curl -s 'http://localhost:16686/api/traces?service=ok-service&limit=10' | jq '.data | length'
Handling connection for 16686
0
$ kill $PF1
$ # put the shared pipeline back: left in place, this drops every ordinary trace for the rest of the page
$ kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"processors":{"tail_sampling":null},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","batch"],"exporters":["otlp_grpc/jaeger"]}}}}}}'
opentelemetrycollector.opentelemetry.io/otel patched
$ kubectl -n tracing rollout status deploy otel-collector --timeout=180s
Waiting for deployment spec update to be observed...
Waiting for deployment spec update to be observed...
Waiting for deployment "otel-collector" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
deployment "otel-collector" successfully rolled out
verify: the error service's traces are in Jaeger and the clean ones are thinner or absent, depending on whether they tripped the latency policy. Say what decision_wait costs you and why a load balancer in front of two collectors breaks tail sampling.

The k8s_attributes processor is what turns a span into something you can join against a pod. It needs RBAC to do that, and without it the spans still arrive, just anonymous.

# the tail-sampling exercise above leaves the shared pipeline dropping ordinary traces
kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"processors":{"tail_sampling":null},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","batch"],"exporters":["otlp_grpc/jaeger"]}}}}}}'
# there is no ClusterRoleBinding to back up here: create the RBAC so there is something to take away
kubectl apply -f - <<'EOF'
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata: { name: otel-k8sattributes }
rules:
  - { apiGroups: [""], resources: [pods, namespaces, nodes], verbs: [get, list, watch] }
  - { apiGroups: ["apps"], resources: [replicasets], verbs: [get, list, watch] }
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: { name: otel-k8sattributes }
roleRef: { apiGroup: rbac.authorization.k8s.io, kind: ClusterRole, name: otel-k8sattributes }
subjects:
  - { kind: ServiceAccount, name: otel-collector, namespace: tracing }
EOF
kubectl -n tracing rollout restart deploy otel-collector
kubectl -n tracing rollout status deploy otel-collector --timeout=180s
kubectl -n tracing run gen-before --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service enriched --traces 3
sleep 20
kubectl -n tracing port-forward svc/jaeger 16686:16686 & PF1=$!
sleep 5
# the collector batches for 5s and Jaeger indexes after that
sleep 60
curl -s 'http://localhost:16686/api/traces?service=enriched&limit=1' | jq -r '[.data[]?.processes[]?.tags[]? | select(.key|startswith("k8s")) | .key] | unique'
kubectl delete clusterrolebinding otel-k8sattributes
kubectl -n tracing rollout restart deploy otel-collector
kubectl -n tracing rollout status deploy otel-collector --timeout=120s
kubectl -n tracing run gen-after --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service unenriched --traces 3
sleep 20
# the collector batches for 5s and Jaeger indexes after that
sleep 60
curl -s 'http://localhost:16686/api/traces?service=unenriched&limit=1' | jq -r '[.data[]?.processes[]?.tags[]? | select(.key|startswith("k8s")) | .key] | unique'
kubectl -n tracing logs deploy/otel-collector --tail=30 | grep -i -m3 forbidden
kubectl apply -f - <<'EOF'
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: { name: otel-k8sattributes }
roleRef: { apiGroup: rbac.authorization.k8s.io, kind: ClusterRole, name: otel-k8sattributes }
subjects:
  - { kind: ServiceAccount, name: otel-collector, namespace: tracing }
EOF
kubectl -n tracing rollout restart deploy otel-collector
kubectl -n tracing rollout status deploy otel-collector --timeout=180s
kill $PF1
outputcaptured 2026-11-18
$ # the tail-sampling exercise above leaves the shared pipeline dropping ordinary traces
$ kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"processors":{"tail_sampling":null},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","batch"],"exporters":["otlp_grpc/jaeger"]}}}}}}'
opentelemetrycollector.opentelemetry.io/otel patched (no change)
$ # there is no ClusterRoleBinding to back up here: create the RBAC so there is something to take away
$ kubectl apply -f - <<'EOF'
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata: { name: otel-k8sattributes }
rules:
  - { apiGroups: [""], resources: [pods, namespaces, nodes], verbs: [get, list, watch] }
  - { apiGroups: ["apps"], resources: [replicasets], verbs: [get, list, watch] }
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: { name: otel-k8sattributes }
roleRef: { apiGroup: rbac.authorization.k8s.io, kind: ClusterRole, name: otel-k8sattributes }
subjects:
  - { kind: ServiceAccount, name: otel-collector, namespace: tracing }
EOF
clusterrole.rbac.authorization.k8s.io/otel-k8sattributes unchanged
clusterrolebinding.rbac.authorization.k8s.io/otel-k8sattributes unchanged
$ kubectl -n tracing rollout restart deploy otel-collector
deployment.apps/otel-collector restarted
$ kubectl -n tracing rollout status deploy otel-collector --timeout=180s
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
deployment "otel-collector" successfully rolled out
$ kubectl -n tracing run gen-before --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service enriched --traces 3
2026-11-18T09:41:59.174Z	INFO	traces/traces.go:53	starting gRPC exporter
2026-11-18T09:41:59.176Z	INFO	grpclog/component.go:69	[core] original dial target is: "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:41:59.176Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel created for target "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:41:59.176Z	INFO	channelz/trace.go:200	[core] [Channel #1] parsed dial target is: resolver.Target{URL:url.URL{Scheme:"dns", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/otel-collector.tracing.svc:4317", Fragment:"", RawQuery:"", RawPath:"", RawFragment:"", ForceQuery:false, OmitHost:false}}	{"grpc_log": true}
2026-11-18T09:41:59.176Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel authority set to "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:41:59.177Z	INFO	traces/traces.go:125	generation of traces is limited	{"per-second": 1}
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
2026-11-18T09:42:01.178Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel Connectivity change to CONNECTING	{"grpc_log": true}
2026-11-18T09:42:01.178Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel exiting idle mode	{"grpc_log": true}
2026-11-18T09:42:01.485Z	INFO	channelz/trace.go:200	[core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "10.96.174.160:4317",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Metadata": null
    }
  ],
  "Endpoints": [
    {
      "Addresses": [
        {
          "Addr": "10.96.174.160:4317",
          "ServerName": "",
          "Attributes": null,
          "BalancerAttributes": null,
          "Metadata": null
        }
      ],
      "Attributes": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)	{"grpc_log": true}
2026-11-18T09:42:01.485Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel switches to new LB policy "pick_first"	{"grpc_log": true}
2026-11-18T09:42:01.485Z	INFO	grpclog/prefix_logger.go:42	[pick-first-leaf-lb] [pick-first-leaf-lb 0x1491b7a83340] Received new config {
  "shuffleAddressList": false
... 45 more lines
$ sleep 20
$ kubectl -n tracing port-forward svc/jaeger 16686:16686 & PF1=$!
$ sleep 5
Forwarding from 127.0.0.1:16686 -> 16686
Forwarding from [::1]:16686 -> 16686
$ # the collector batches for 5s and Jaeger indexes after that
$ sleep 60
$ curl -s 'http://localhost:16686/api/traces?service=enriched&limit=1' | jq -r '[.data[]?.processes[]?.tags[]? | select(.key|startswith("k8s")) | .key] | unique'
Handling connection for 16686
[
  "k8s.namespace.name",
  "k8s.node.name",
  "k8s.pod.name",
  "k8s.pod.start_time",
  "k8s.pod.uid"
]
$ kubectl delete clusterrolebinding otel-k8sattributes
clusterrolebinding.rbac.authorization.k8s.io "otel-k8sattributes" deleted
$ kubectl -n tracing rollout restart deploy otel-collector
deployment.apps/otel-collector restarted
$ kubectl -n tracing rollout status deploy otel-collector --timeout=120s
Waiting for deployment spec update to be observed...
Waiting for deployment "otel-collector" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
deployment "otel-collector" successfully rolled out
$ kubectl -n tracing run gen-after --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service unenriched --traces 3
2026-11-18T09:43:52.934Z	INFO	traces/traces.go:53	starting gRPC exporter
2026-11-18T09:43:52.934Z	INFO	grpclog/component.go:69	[core] original dial target is: "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:43:52.934Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel created for target "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:43:52.934Z	INFO	channelz/trace.go:200	[core] [Channel #1] parsed dial target is: resolver.Target{URL:url.URL{Scheme:"dns", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/otel-collector.tracing.svc:4317", Fragment:"", RawQuery:"", RawPath:"", RawFragment:"", ForceQuery:false, OmitHost:false}}	{"grpc_log": true}
2026-11-18T09:43:52.934Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel authority set to "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:43:52.935Z	INFO	traces/traces.go:125	generation of traces is limited	{"per-second": 1}
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
2026-11-18T09:43:54.938Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel Connectivity change to CONNECTING	{"grpc_log": true}
2026-11-18T09:43:54.940Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel exiting idle mode	{"grpc_log": true}
2026-11-18T09:43:54.956Z	INFO	channelz/trace.go:200	[core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "10.96.174.160:4317",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Metadata": null
    }
  ],
  "Endpoints": [
    {
      "Addresses": [
        {
          "Addr": "10.96.174.160:4317",
          "ServerName": "",
          "Attributes": null,
          "BalancerAttributes": null,
          "Metadata": null
        }
      ],
      "Attributes": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)	{"grpc_log": true}
2026-11-18T09:43:54.956Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel switches to new LB policy "pick_first"	{"grpc_log": true}
2026-11-18T09:43:54.957Z	INFO	grpclog/prefix_logger.go:42	[pick-first-leaf-lb] [pick-first-leaf-lb 0x2bea75d9f180] Received new config {
  "shuffleAddressList": false
... 45 more lines
$ sleep 20
$ # the collector batches for 5s and Jaeger indexes after that
$ sleep 60
$ curl -s 'http://localhost:16686/api/traces?service=unenriched&limit=1' | jq -r '[.data[]?.processes[]?.tags[]? | select(.key|startswith("k8s")) | .key] | unique'
Handling connection for 16686
[]
$ kubectl -n tracing logs deploy/otel-collector --tail=30 | grep -i -m3 forbidden
E1118 09:43:39.135150       1 reflector.go:227] "Failed to watch" err="failed to list *v1.Pod: pods is forbidden: User \"system:serviceaccount:tracing:otel-collector\" cannot list resource \"pods\" in API group \"\" at the cluster scope" logger="UnhandledError" reflector="k8s.io/client-go@v0.37.0/tools/cache/reflector.go:343" type="*v1.Pod"
E1118 09:43:40.588567       1 reflector.go:227] "Failed to watch" err="failed to list *v1.Pod: pods is forbidden: User \"system:serviceaccount:tracing:otel-collector\" cannot list resource \"pods\" in API group \"\" at the cluster scope" logger="UnhandledError" reflector="k8s.io/client-go@v0.37.0/tools/cache/reflector.go:343" type="*v1.Pod"
E1118 09:43:42.527479       1 reflector.go:227] "Failed to watch" err="failed to list *v1.Pod: pods is forbidden: User \"system:serviceaccount:tracing:otel-collector\" cannot list resource \"pods\" in API group \"\" at the cluster scope" logger="UnhandledError" reflector="k8s.io/client-go@v0.37.0/tools/cache/reflector.go:343" type="*v1.Pod"
$ kubectl apply -f - <<'EOF'
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata: { name: otel-k8sattributes }
roleRef: { apiGroup: rbac.authorization.k8s.io, kind: ClusterRole, name: otel-k8sattributes }
subjects:
  - { kind: ServiceAccount, name: otel-collector, namespace: tracing }
EOF
clusterrolebinding.rbac.authorization.k8s.io/otel-k8sattributes created
$ kubectl -n tracing rollout restart deploy otel-collector
deployment.apps/otel-collector restarted
$ kubectl -n tracing rollout status deploy otel-collector --timeout=180s
Waiting for deployment "otel-collector" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
deployment "otel-collector" successfully rolled out
$ kill $PF1
verify: the enriched spans carry k8s.pod.name and friends, the unenriched ones do not, and the collector log has a Forbidden line explaining why. Nothing fails; you lose the ability to ask "which pod".

The span_metrics connector derives RED metrics from traces you are already collecting, which gives you rate, errors and duration for a service that exports no metrics at all. It is the cheapest observability win on this page.

kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"connectors":{"span_metrics":{"histogram":{"explicit":{"buckets":["100ms","500ms","1s"]}}}},"exporters":{"prometheus":{"endpoint":"0.0.0.0:8889"}},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","batch"],"exporters":["otlp_grpc/jaeger","span_metrics"]},"metrics/span_metrics":{"receivers":["span_metrics"],"exporters":["prometheus"]}}}}}}'
kubectl -n tracing rollout status deploy otel-collector --timeout=180s
kubectl -n tracing run gen-metrics --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service metered --traces 20
sleep 30
kubectl -n tracing port-forward deploy/otel-collector 8889:8889 & PF1=$!
sleep 5
curl -s localhost:8889/metrics | grep -E '^(traces_span_metrics|calls)' | head -10
kill $PF1
outputcaptured 2026-11-18
$ kubectl -n tracing patch opentelemetrycollector otel --type merge -p '{"spec":{"config":{"connectors":{"span_metrics":{"histogram":{"explicit":{"buckets":["100ms","500ms","1s"]}}}},"exporters":{"prometheus":{"endpoint":"0.0.0.0:8889"}},"service":{"pipelines":{"traces":{"receivers":["otlp"],"processors":["k8s_attributes","batch"],"exporters":["otlp_grpc/jaeger","span_metrics"]},"metrics/span_metrics":{"receivers":["span_metrics"],"exporters":["prometheus"]}}}}}}'
opentelemetrycollector.opentelemetry.io/otel patched
$ kubectl -n tracing rollout status deploy otel-collector --timeout=180s
Waiting for deployment spec update to be observed...
Waiting for deployment spec update to be observed...
Waiting for deployment "otel-collector" rollout to finish: 0 out of 1 new replicas have been updated...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "otel-collector" rollout to finish: 1 old replicas are pending termination...
deployment "otel-collector" successfully rolled out
$ kubectl -n tracing run gen-metrics --rm -i --restart=Never --image=ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest -- traces --otlp-insecure --otlp-endpoint otel-collector.tracing.svc:4317 --service metered --traces 20
2026-11-18T09:45:55.909Z	INFO	traces/traces.go:53	starting gRPC exporter
2026-11-18T09:45:55.910Z	INFO	grpclog/component.go:69	[core] original dial target is: "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:45:55.910Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel created for target "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:45:55.911Z	INFO	channelz/trace.go:200	[core] [Channel #1] parsed dial target is: resolver.Target{URL:url.URL{Scheme:"dns", Opaque:"", User:(*url.Userinfo)(nil), Host:"", Path:"/otel-collector.tracing.svc:4317", Fragment:"", RawQuery:"", RawPath:"", RawFragment:"", ForceQuery:false, OmitHost:false}}	{"grpc_log": true}
2026-11-18T09:45:55.911Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel authority set to "otel-collector.tracing.svc:4317"	{"grpc_log": true}
2026-11-18T09:45:55.912Z	INFO	traces/traces.go:125	generation of traces is limited	{"per-second": 1}
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
2026-11-18T09:45:57.914Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel Connectivity change to CONNECTING	{"grpc_log": true}
2026-11-18T09:45:57.914Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel exiting idle mode	{"grpc_log": true}
2026-11-18T09:45:57.928Z	INFO	channelz/trace.go:200	[core] [Channel #1] Resolver state updated: {
  "Addresses": [
    {
      "Addr": "10.96.174.160:4317",
      "ServerName": "",
      "Attributes": null,
      "BalancerAttributes": null,
      "Metadata": null
    }
  ],
  "Endpoints": [
    {
      "Addresses": [
        {
          "Addr": "10.96.174.160:4317",
          "ServerName": "",
          "Attributes": null,
          "BalancerAttributes": null,
          "Metadata": null
        }
      ],
      "Attributes": null
    }
  ],
  "ServiceConfig": null,
  "Attributes": null
} (resolver returned new addresses)	{"grpc_log": true}
2026-11-18T09:45:57.928Z	INFO	channelz/trace.go:200	[core] [Channel #1] Channel switches to new LB policy "pick_first"	{"grpc_log": true}
2026-11-18T09:45:57.928Z	INFO	grpclog/prefix_logger.go:42	[pick-first-leaf-lb] [pick-first-leaf-lb 0xb94137fab60] Received new config {
  "shuffleAddressList": false
... 45 more lines
$ sleep 30
$ kubectl -n tracing port-forward deploy/otel-collector 8889:8889 & PF1=$!
$ sleep 5
Forwarding from 127.0.0.1:8889 -> 8889
Forwarding from [::1]:8889 -> 8889
$ curl -s localhost:8889/metrics | grep -E '^(traces_span_metrics|calls)' | head -10
Handling connection for 8889
traces_span_metrics_calls_total{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_CLIENT",span_name="lets-go",status_code="STATUS_CODE_UNSET"} 0
traces_span_metrics_calls_total{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_SERVER",span_name="okey-dokey-0",status_code="STATUS_CODE_UNSET"} 0
traces_span_metrics_duration_milliseconds_bucket{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_CLIENT",span_name="lets-go",status_code="STATUS_CODE_UNSET",le="100"} 20
traces_span_metrics_duration_milliseconds_bucket{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_CLIENT",span_name="lets-go",status_code="STATUS_CODE_UNSET",le="500"} 20
traces_span_metrics_duration_milliseconds_bucket{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_CLIENT",span_name="lets-go",status_code="STATUS_CODE_UNSET",le="1000"} 20
traces_span_metrics_duration_milliseconds_bucket{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_CLIENT",span_name="lets-go",status_code="STATUS_CODE_UNSET",le="+Inf"} 20
traces_span_metrics_duration_milliseconds_sum{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_CLIENT",span_name="lets-go",status_code="STATUS_CODE_UNSET"} 2.460000000000001
traces_span_metrics_duration_milliseconds_count{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_CLIENT",span_name="lets-go",status_code="STATUS_CODE_UNSET"} 20
traces_span_metrics_duration_milliseconds_bucket{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_SERVER",span_name="okey-dokey-0",status_code="STATUS_CODE_UNSET",le="100"} 20
traces_span_metrics_duration_milliseconds_bucket{collector_instance_id="a0715b49-d4ec-4fd8-9455-fb8ffdb2468a",job="metered",otel_scope_name="spanmetricsconnector",otel_scope_schema_url="",otel_scope_version="",service_name="metered",span_kind="SPAN_KIND_SERVER",span_name="okey-dokey-0",status_code="STATUS_CODE_UNSET",le="500"} 20
$ kill $PF1
verify: the collector's own metrics endpoint serves call counts and duration buckets labeled by service and span name.

Jaeger v2 is an OpenTelemetry Collector with storage and query extensions, which means its configuration reads like a collector's. Knowing that changes how you debug it: the pipeline is right there.

kubectl -n tracing port-forward svc/jaeger 16686:16686 & PF1=$!
sleep 5
curl -s http://localhost:16686/api/services | jq
curl -s 'http://localhost:16686/api/operations?service=err-service' | jq '.data[:5]'
kill $PF1
kubectl -n tracing get cm -o name
kubectl -n tracing get deploy jaeger -o jsonpath='{.spec.template.spec.containers[0].args}{"\n"}'
kubectl -n tracing get deploy jaeger -o jsonpath='{.spec.template.spec.containers[0].env}' | jq
outputcaptured 2026-09-12
$ kubectl -n tracing port-forward svc/jaeger 16686:16686 & PF1=$!
$ sleep 5
Forwarding from 127.0.0.1:16686 -> 16686
Forwarding from [::1]:16686 -> 16686
$ curl -s http://localhost:16686/api/services | jq
Handling connection for 16686
{
  "data": [
    "err-service",
    "jaeger",
    "metered"
  ],
  "total": 3,
  "limit": 0,
  "offset": 0,
  "errors": null
}
$ curl -s 'http://localhost:16686/api/operations?service=err-service' | jq '.data[:5]'
Handling connection for 16686
[
  {
    "name": "okey-dokey-0",
    "spanKind": "server"
  },
  {
    "name": "lets-go",
    "spanKind": "client"
  }
]
$ kill $PF1
$ kubectl -n tracing get cm -o name
configmap/kube-root-ca.crt
configmap/otel-collector-3a402bbd
configmap/otel-collector-a60f73e1
configmap/otel-collector-fa2c2caf
$ kubectl -n tracing get deploy jaeger -o jsonpath='{.spec.template.spec.containers[0].args}{"\n"}'
$ kubectl -n tracing get deploy jaeger -o jsonpath='{.spec.template.spec.containers[0].env}' | jq
[
  {
    "name": "COLLECTOR_OTLP_ENABLED",
    "value": "true"
  }
]
verify: the service list matches what you have sent, and you can say where this Jaeger keeps its spans. On the lab that is memory, which is why a restart loses everything; say what you would change for a cluster anyone depends on.

Self-check

answer before opening
Jaeger shows hundreds of one-span traces. Diagnosis?

Context propagation is broken, so every service starts its own orphan trace. Check for a proxy stripping traceparent, a propagator mismatch (W3C vs. B3), a hand-rolled HTTP client skipping header injection, or an uninstrumented async queue hop.

Head-based versus tail-based sampling: when does the difference bite?

Whenever rare failures matter most. Head sampling at 1% usually discards the exact 5-second timeout or 500 error you needed to debug. Tail sampling inspects finished traces so you keep every error and slow request, trading extra collector memory and trace-ID-aware routing across replicas.

Where should sampling and redaction be configured, and why there?

In the OpenTelemetry Collector. It's the platform's central control plane: one config edit updates sampling and PII redaction across the entire fleet without begging forty app teams to redeploy their SDKs.

You annotated a Deployment for auto-instrumentation and nothing changed. Two most likely reasons?

Either the annotation went on the Deployment's metadata instead of spec.template.metadata, or you haven't restarted the pods yet (webhook injection only fires at pod creation). Third check: verify the <namespace>/<name> value matches a real Instrumentation CR.

How do traces, metrics and logs tie together in practice?

Exemplars link histogram latency spikes straight to sample trace IDs, structured logs include the trace ID so you can pivot directly from a slow span into its exact log lines, and the Collector stamps shared Kubernetes resource attributes across all three signals.

Your tail-sampling collector runs three replicas behind a Service, and the sampling decisions look random. Why, and what fixes it?

A normal Kubernetes Service spreads spans from the same trace across different replicas, so no collector ever sees the full trace before decision_wait fires. Put a front-tier collector with a loadbalancing exporter (routing_key: traceID) ahead of a StatefulSet sampling tier, or run a single sampling replica.

What is Jaeger v2 architecturally, and where does the old jaeger-agent go?

Jaeger v2 is a distribution of the OpenTelemetry Collector: one binary configured in Collector YAML, running as collector, query, ingester, or all-in-one with Jaeger extensions for storage, query UI (16686), and remote sampling, ingesting standard OTLP on 4317/4318. The legacy jaeger-agent is gone; run a standard OpenTelemetry Collector as a DaemonSet or sidecar instead.

A pod has the injected init container and the right annotation, yet no spans appear. Two collector-side reasons and one network reason?

Collector/config: the Instrumentation endpoint uses the wrong port for the language agent's protocol (Python only speaks HTTP on 4318, while Java defaults to gRPC on 4317), or the Collector has no traces pipeline wired to that receiver. Network: a default-deny NetworkPolicy blocks egress to the collector namespace. Inspect OTEL_EXPORTER_OTLP_ENDPOINT inside the pod and test the port directly.

How does a metric panel jump to a trace, and what has to be enabled at each layer?

Through exemplars: the app or span_metrics connector attaches trace_id to histogram buckets, Prometheus retains them when --enable-feature=exemplar-storage is enabled, and Grafana maps trace_id to Jaeger or Tempo via exemplarTraceIdDestinations. Logs join the same loop through Loki's derivedFields.

Docs to know your way around

study time, not exam time
  • opentelemetry.io: the Concepts pages (signals, context propagation), the collector's receivers/processors/exporters reference, and the Kubernetes operator's Instrumentation injection docs.
  • jaegertracing.io: the UI is mostly self-explanatory; know that the HTTP API exists for scripted verification.
  • w3.org/TR/trace-context: one page, and it is the header everything agrees on.
  • opentelemetry.io/docs/collector/configuration: sections, connectors and pipelines; the processor READMEs in github.com/open-telemetry/opentelemetry-collector-contrib (tailsamplingprocessor, k8sattributesprocessor) hold the field defaults.
  • opentelemetry.io/docs/platforms/kubernetes/operator/automatic: annotation values, container-names, the Go and Python caveats; the troubleshooting page beside it is the injection diagnostic ladder.
  • jaegertracing.io/docs/latest/architecture: roles, storage backends and the "we recommend the OpenTelemetry Collector instead of the agent" statement.