
OpenTelemetry (OTel) has become the default way to instrument applications for traces, metrics and logs, and most observability vendors now accept its data. That shows up in interviews for DevOps, SRE, platform engineering, backend and observability roles in India: panels ask how context propagation works, why the Collector exists, how tail sampling scales, and what you would check when spans stop reaching the backend. Many candidates know Prometheus and Grafana but cannot explain OTLP, resource attributes or why a trace breaks at a message queue.
This guide has 50 OpenTelemetry questions in seven sections: fundamentals, intermediate, advanced, scenario-based, architecture and design, troubleshooting and hands-on. Each answer explains the idea, gives a configuration or code example where it helps, and says what the interviewer is listening for. Facts were checked against the OpenTelemetry specification, the opentelemetry.io documentation and the Collector repositories on 5 December 2026. Component stability changes release by release, so check the status page and each component's README before relying on a detail.
Observability rounds usually include metrics and SRE questions too. Pair this guide with our Prometheus and Grafana interview questions and SRE interview questions, and browse the DevOps interview questions hub for the rest of the toolchain.
Fundamentals
1. What is OpenTelemetry, and what is it not?
OpenTelemetry is an open-source, vendor-neutral observability framework under the CNCF. It provides language APIs and SDKs for generating telemetry, instrumentation libraries for common frameworks, a wire protocol (OTLP), semantic conventions for naming, and the OpenTelemetry Collector for receiving, processing and exporting data.
It is not a storage or visualisation backend. You still need something to store and query the data: Jaeger or Tempo for traces, Prometheus or Mimir for metrics, Loki or Elasticsearch for logs, or a commercial platform. The value is that you instrument once and can change backends without re-instrumenting.
What the interviewer wants to hear: standard instrumentation plus a pipeline, not a backend, and the vendor-lock-in argument.
2. Which signals does OpenTelemetry support, and how mature is each?
Traces, metrics and logs are the main signals. Baggage is a context propagation mechanism rather than a telemetry signal. Profiles are the newest signal and are still in development. Maturity varies by language: the opentelemetry.io status page, checked on 5 December 2026, listed traces as stable in most major languages (Java, Go, Python, .NET, JavaScript, C++ and others), metrics as stable in most, and logs as stable in some (for example Java, Go, .NET, C++) but still in development in others (for example Python and JavaScript). Profiles were in development, with Java the only language listed.
What the interviewer wants to hear: you check per-language status rather than assuming everything is stable everywhere.
3. Explain a trace, a span and the main span fields.
A trace is the full path of one request through a system, made of spans that share a trace ID. Each span represents one operation and has a span ID, a parent span ID (except the root), a name, start and end timestamps, a span kind (SERVER, CLIENT, PRODUCER, CONSUMER or INTERNAL), attributes (key-value pairs), events (timestamped annotations such as exceptions), links to spans in other traces, and a status (Unset, Ok or Error).
What the interviewer wants to hear: parent-child structure, span kinds, and that links are used when one span relates to several traces, such as batch consumers.
4. Why are the OpenTelemetry API and SDK separate?
The API defines how code creates spans, metrics and logs. The SDK implements it: sampling, processors, exporters and resource detection. Libraries depend only on the API, so a library can be instrumented without forcing an SDK on its users. If the application never installs an SDK, API calls become no-ops with minimal overhead. The application owner chooses and configures the SDK once.
What the interviewer wants to hear: library authors depend on the API; applications configure the SDK.
5. What is a Resource, and why is service.name so important?
A Resource describes the entity producing telemetry: service.name, service.version, deployment.environment.name, host, container, Kubernetes pod and namespace, cloud region and so on. It is attached to every span, metric and log from that process. service.name is how backends group data into services; if it is missing, SDKs fall back to a placeholder such as unknown_service and everything lands in one bucket.
export OTEL_SERVICE_NAME=checkout
export OTEL_RESOURCE_ATTRIBUTES=service.version=1.4.2,deployment.environment.name=prod
OTEL_SERVICE_NAME takes precedence over a service.name set in OTEL_RESOURCE_ATTRIBUTES.
What the interviewer wants to hear: resource attributes identify the source, and service naming is the first thing you standardise.
6. How does context propagation work across services?
When service A calls service B, A's SDK injects the current trace context into the outgoing request, and B's SDK extracts it and creates a child span. By default OpenTelemetry uses the W3C Trace Context traceparent header (and tracestate) plus the W3C Baggage header; OTEL_PROPAGATORS defaults to tracecontext,baggage.
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
version-trace_id(32 hex)-parent_id(16 hex)-flags(01 = sampled)
HTTP and gRPC instrumentation handle this automatically. For message queues and custom transports you often inject and extract context into message headers yourself.
What the interviewer wants to hear: inject and extract, W3C traceparent format and where propagation commonly breaks.
7. What is baggage, and how is it different from span attributes?
Baggage is a set of key-value pairs carried in the request context and propagated to every downstream service, for example a tenant ID or a feature flag. Span attributes live only on one span. Baggage is not automatically added to spans; you copy values into attributes (some SDKs offer a baggage span processor for that). Because baggage travels in headers to every service, including third parties, never put secrets or personal data in it and keep it small.
What the interviewer wants to hear: propagation versus recording, and the privacy risk.
8. Compare zero-code (automatic) and code-based instrumentation.
Zero-code instrumentation attaches to an application without code changes: the Java agent (-javaagent), opentelemetry-instrument for Python, the Node.js auto-instrumentations package, .NET automatic instrumentation, or the Kubernetes Operator injecting these. It captures HTTP, database, messaging and framework spans quickly.
Code-based instrumentation uses the API directly to add business spans, attributes (order ID, payment provider) and custom metrics. Most production setups use both: auto-instrumentation for the plumbing, manual spans for business meaning.
What the interviewer wants to hear: you start with zero-code for coverage and add manual spans where the business logic matters.
9. What is OTLP, and which ports does it use?
OTLP (OpenTelemetry Protocol) is the native protocol for sending traces, metrics, logs and profiles between SDKs, Collectors and backends. It runs over gRPC (default port 4317) or HTTP (default port 4318). Over HTTP, data is POSTed to /v1/traces, /v1/metrics or /v1/logs as binary protobuf (application/x-protobuf) or JSON (application/json).
What the interviewer wants to hear: the two transports, ports, paths and encodings, because mixing them up is the most common setup bug.
Intermediate
10. Explain the OpenTelemetry Collector's architecture.
The Collector is a single binary configured with YAML. Its component types are:
- Receivers: get data in (OTLP, Prometheus scrape, filelog, hostmetrics, Kafka and many more).
- Processors: transform data in flight (memory limiting, attribute changes, filtering, sampling, Kubernetes metadata).
- Exporters: send data out (OTLP, Prometheus remote write, vendor exporters, debug).
- Connectors: act as an exporter for one pipeline and a receiver for another, for example generating metrics from spans.
- Extensions: capabilities outside pipelines, such as health checks, authentication and storage for persistent queues.
The service section wires components into pipelines per signal. A component defined but not referenced in a pipeline is not used.
What the interviewer wants to hear: the five component types and that pipelines are per signal.
11. What are Collector distributions, and how do you build a custom one?
The project publishes several distributions: a core distribution with a small set of components, a contrib distribution with a large set of community components, and a Kubernetes-oriented distribution. Vendors also ship their own. Each component has its own stability level (development, alpha, beta, stable) per signal, shown in its README.
For production, many teams build a custom distribution with only the components they need using the OpenTelemetry Collector Builder (ocb) and a manifest file. That reduces binary size and attack surface.
What the interviewer wants to hear: contrib is convenient but large; a custom build is the hardened option, and component stability matters.
12. Compare the agent and gateway deployment patterns.
In the agent pattern, a Collector runs next to the workload, typically as a Kubernetes DaemonSet or sidecar. Applications send to localhost or the node, and the agent adds host and Kubernetes metadata, collects node logs and host metrics, and forwards data.
In the gateway pattern, one or more Collector instances behind a single OTLP endpoint (per cluster, data centre or region) receive data from agents or apps, then apply central policy (sampling, redaction, routing) and hold backend credentials. The opentelemetry.io docs list the gateway trade-offs: easier central credential and policy management, but another component to run, extra latency and more resource cost.
Most mature setups use both: agents for collection and enrichment, gateways for policy and export.
What the interviewer wants to hear: what runs where, and why tail sampling forces a gateway tier.
13. Why must the memory limiter be the first processor, and how should batching be configured now?
The memory_limiter processor checks memory usage on an interval (one second is recommended). Above the soft limit (limit_mib minus spike_limit_mib) it refuses incoming data so receivers return a retryable error; above the hard limit it also forces garbage collection. Placing it first means backpressure reaches the receivers before other processors allocate memory.
Batching has changed. The batch processor's README now marks it deprecated for traces, metrics and logs (deprecation date 24 November 2026) and recommends exporter-level batching through sending_queue with a batch section on exporters that support it. The new queue_batch processor covers cases where you need to batch before another processor.
processors:
memory_limiter:
check_interval: 1s
limit_mib: 1500
spike_limit_mib: 300
exporters:
otlp_grpc:
endpoint: gateway.observability.svc:4317
sending_queue:
batch: {}
What the interviewer wants to hear: memory limiter first, and awareness that batching moved to exporters in recent releases.
Follow-up: Why did the exporter in that snippet use otlp_grpc? (The Collector renamed the otlp exporter to otlp_grpc and otlphttp to otlp_http in v0.144.0, keeping the old names as deprecated aliases. The OTLP receiver is still otlp.)
14. What metric instruments does OpenTelemetry define?
| Instrument | Type | Example |
|---|---|---|
| Counter | Synchronous, monotonic | Requests served |
| UpDownCounter | Synchronous, can decrease | Items in a queue |
| Histogram | Synchronous, distribution | Request duration |
| Gauge | Synchronous, last value | Current temperature setting |
| Asynchronous Counter, UpDownCounter, Gauge | Observed via callback at collection time | CPU time, memory in use |
Use a Histogram for latency, not a Gauge or average, so you can compute percentiles. Asynchronous instruments are for values you read rather than increment.
What the interviewer wants to hear: correct instrument choice, especially Histogram for latency.
15. What is aggregation temporality, and why does it matter?
A sum or histogram can be exported as cumulative (total since start) or delta (change since the last export). Prometheus expects cumulative values. Some vendor backends prefer delta. A mismatch produces nonsense graphs, such as rates that reset or double. You set temporality preference in the SDK exporter, and Collector components exist to convert between them where needed. The default metric export interval in the SDK is 60 seconds (OTEL_METRIC_EXPORT_INTERVAL is 60000 ms).
What the interviewer wants to hear: cumulative versus delta and matching it to the backend.
16. What are exemplars?
Exemplars are sample measurements attached to metric data points that carry the trace ID and span ID of a request that produced them. In a latency histogram, an exemplar lets you click from a slow bucket straight to an example trace. The SDK exemplar filter defaults to trace_based, meaning exemplars are recorded only for measurements made inside a sampled span.
What the interviewer wants to hear: exemplars link metrics to traces, and they depend on sampling.
17. How does OpenTelemetry handle logs?
OpenTelemetry does not ask you to rewrite log statements. You keep your logging library (Log4j, Logback, Python logging, Serilog and so on) and add a log appender or bridge that sends records to the OpenTelemetry Logs SDK. The docs state the Logs Bridge API is meant for logging library authors, not application code. When an SDK or auto-instrumentation is active, log records are automatically correlated with the active trace and span IDs. For existing log files, the Collector's filelog receiver reads and parses them.
What the interviewer wants to hear: bridge existing loggers, automatic trace correlation, and filelog for files.
18. What are semantic conventions, and why do they matter?
Semantic conventions define standard names and meanings for attributes, span names and metrics, so that data from different services and languages looks the same and backends can build dashboards automatically. For HTTP, the conventions are stable: attributes such as http.request.method, http.response.status_code, url.full, url.path, server.address and http.route. Span names should be {method} {target} with a low-cardinality target such as the route template, never the raw URL path.
Instrumentations that predate the stable HTTP conventions use OTEL_SEMCONV_STABILITY_OPT_IN: http emits the stable conventions and http/dup emits both old and new during migration. Generative AI conventions have moved to a separate OpenTelemetry GenAI semantic conventions repository and are still evolving.
What the interviewer wants to hear: consistent naming, low-cardinality span names, and a migration path for convention changes.
19. Explain head sampling and the built-in SDK samplers.
Head sampling decides at the start of a trace whether to record it, so the decision is cheap and propagates through the sampled flag. SDK samplers include always_on, always_off, traceidratio (keep a fraction based on the trace ID) and the parentbased_* variants, which follow the parent's decision when there is one. The default is parentbased_always_on.
export OTEL_TRACES_SAMPLER=parentbased_traceidratio
export OTEL_TRACES_SAMPLER_ARG=0.1 # 10% of new root traces
The limitation is that the decision is made before you know if the trace will error or be slow.
What the interviewer wants to hear: parent-based sampling keeps traces complete, and head sampling cannot target errors.
Advanced
20. How does tail sampling work, and how do you scale it?
Tail sampling decides after seeing most or all spans of a trace, so you can keep every error and every slow trace and sample the rest. The contrib tail_sampling processor buffers spans for decision_wait (default 30 seconds), holds up to num_traces traces in memory (default 50,000), then applies policies such as status_code, latency, probabilistic, string_attribute, rate_limiting and composite. It is beta for traces.
All spans of a trace must reach the same Collector instance. To scale, run two tiers: a first tier with the load_balancing exporter routing by traceID, and a second tier running tail sampling. The opentelemetry.io docs also note that tail samplers are stateful, need monitoring, and that rules must evolve with the system.
What the interviewer wants to hear: the trace-affinity requirement, the two-tier design and the memory cost.
21. What are connectors? Give an example.
A connector joins two pipelines: it is an exporter at the end of one and a receiver at the start of another, possibly of a different signal type. The spanmetrics connector turns spans into request count and duration metrics (RED metrics) per service and operation. The count connector counts telemetry items, and the routing connector sends data to different pipelines based on attributes, for example per tenant.
If you run spanmetrics behind a load balancer, route by service so all spans for a service hit the same instance; otherwise each instance produces partial metrics.
What the interviewer wants to hear: connectors link pipelines, and spanmetrics needs consistent routing.
22. How do you control metric cardinality?
Cardinality is the number of unique attribute combinations per metric. Adding user IDs, full URLs, request IDs or pod UIDs to metric attributes can create millions of series, which raises cost and can break the backend. Controls: use bounded attributes (route templates, status code classes), drop or rewrite high-cardinality attributes with views in the SDK or with transform, attributes or filter processors in the Collector, and monitor series counts. Put high-cardinality identifiers on spans or logs instead, where they are expected.
What the interviewer wants to hear: what drives cardinality, where to cut it, and that traces are the place for per-request detail.
23. How does the Collector add Kubernetes metadata?
The k8sattributes processor looks up the pod that sent the data (by connection IP or by a pod UID or IP resource attribute) and adds attributes such as k8s.namespace.name, k8s.pod.name, k8s.deployment.name and k8s.node.name, plus selected labels and annotations. It needs a ServiceAccount with RBAC to read pods, namespaces and, for some fields, ReplicaSets. In an agent DaemonSet, filter to the local node to limit API server load. The resourcedetection processor adds host and cloud attributes.
What the interviewer wants to hear: metadata enrichment, the RBAC requirement and node filtering.
24. What does the OpenTelemetry Operator for Kubernetes do?
The Operator manages Collectors through an OpenTelemetryCollector custom resource (deployment is the default mode; other modes such as DaemonSet, StatefulSet and sidecar exist) and injects auto-instrumentation through an Instrumentation resource. You define the exporter endpoint, propagators and sampler once, then annotate workloads:
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: demo-instrumentation
spec:
exporter:
endpoint: http://demo-collector:4318
propagators:
- tracecontext
- baggage
sampler:
type: parentbased_traceidratio
argument: "1"
# on the Deployment pod template
metadata:
annotations:
instrumentation.opentelemetry.io/inject-java: "true"
There are equivalent annotations for inject-python, inject-nodejs, inject-dotnet and inject-go (Go also needs the target executable path annotation). Pods must be restarted for injection to happen.
What the interviewer wants to hear: two CRDs, annotation-driven injection and the restart requirement.
25. How do you make a telemetry pipeline reliable?
- Exporters have
retry_on_failure(defaults: initial 5s, max interval 30s, give up after 300s) and asending_queue(default 10 consumers, queue size 1000 requests). - Use a persistent queue by pointing
sending_queue.storageat afile_storageextension so data survives Collector restarts. - OTLP clients must retry only retryable errors: for HTTP that is 408, 429, 502, 503 and 504; for gRPC codes such as UNAVAILABLE. A 400 is not retried. On a partial success response the client must not retry.
- Run several gateway replicas behind a load balancer, set memory limits, and alert on the Collector's own metrics for refused, dropped and failed exports.
What the interviewer wants to hear: queues, retries, persistence and monitoring the pipeline itself.
26. How do you secure an OpenTelemetry pipeline?
Enable TLS (mTLS between agents and gateways where possible), use authenticator extensions for incoming OTLP so random clients cannot write data, and never expose 4317 or 4318 to the internet without authentication. Keep backend API keys only on gateways, ideally from a secrets store. Remove or hash sensitive data before export with the attributes, transform or redaction processors, and avoid capturing request bodies, SQL parameters or authorisation headers in instrumentation. Run Collectors as non-root with minimal components.
What the interviewer wants to hear: transport security, ingest authentication and PII redaction.
27. What is OTTL?
The OpenTelemetry Transformation Language is a small language used by processors such as transform and filter (and some connectors and sampling policies) to express conditions and edits on telemetry. Examples: set an attribute, delete keys matching a pattern, truncate long values, or drop spans whose route is a health check.
processors:
transform:
trace_statements:
- context: span
statements:
- delete_key(attributes, "http.request.header.authorization")
- truncate_all(attributes, 256)
What the interviewer wants to hear: declarative in-flight transformation without writing a custom processor.
28. How does OpenTelemetry work with Prometheus?
In both directions. The Collector's prometheus receiver can scrape existing /metrics endpoints using standard scrape configs, and the prometheusremotewrite or prometheus exporters send OTel metrics to Prometheus-compatible backends. Recent Prometheus versions can also ingest OTLP directly when that feature is enabled. Watch for naming translation (dots to underscores, unit and _total suffixes) and for temporality, since Prometheus expects cumulative values.
What the interviewer wants to hear: coexistence rather than replacement, plus the naming and temporality gotchas.
29. How is OpenTelemetry used to observe LLM and AI applications?
The same tracing model applies: a request span with child spans for retrieval, the model call and tool calls, with attributes for model name, token counts and latency. The GenAI semantic conventions (now maintained in a separate OpenTelemetry repository and still evolving) standardise these names. Be careful with prompt and completion content, which may contain personal data; capture it only if policy allows, and redact it in the Collector. Our LLM evaluation interview questions cover how teams use such traces for evaluation.
What the interviewer wants to hear: standard spans and attributes for AI workloads, with the privacy caveat and awareness that the conventions are not final.
Scenario-based
30. Traces show the API gateway and the order service, but the payment worker that consumes from Kafka appears as a separate trace. Why?
Context was not propagated across the message boundary. Either the producer did not inject traceparent into message headers, the consumer did not extract it, or a custom serialisation layer dropped the headers. Check that messaging instrumentation is enabled on both sides and that both use the same propagators. For batch consumers that process many messages at once, messaging conventions often use span links to each producer's context rather than a single parent.
What the interviewer wants to hear: inject and extract on both sides, propagator mismatch, and links for batch consumption.
31. The tracing bill doubled after rolling OpenTelemetry out to 150 services. What do you do?
Measure first: span volume per service and per span name. Then cut noise (drop health check and readiness probe spans, reduce chatty internal spans), apply head sampling for high-volume, low-value services with parentbased_traceidratio, and add tail sampling at the gateway to keep 100% of errors and slow traces while sampling routine successes. Generate RED metrics from all spans before sampling with the spanmetrics connector, so dashboards stay accurate even when only some traces are stored.
What the interviewer wants to hear: measure, remove noise, sample intelligently and keep metrics unsampled.
32. Your company wants to move from a proprietary APM agent to OpenTelemetry. How would you migrate?
Run them in parallel for a period. Deploy Collectors first, exporting to the existing vendor (most accept OTLP) so dashboards keep working. Migrate service by service to OTel auto-instrumentation, checking that span names, attributes and metrics match what alerts and dashboards expect; semantic convention differences are the usual surprise. Make sure propagation is compatible during the transition (both W3C Trace Context, or configure the vendor format as an extra propagator). Remove the old agents only after alert parity is confirmed.
What the interviewer wants to hear: Collector first, parallel run, propagation compatibility and alert parity.
33. The gateway Collector keeps getting OOMKilled during traffic peaks. How do you fix it?
Check that memory_limiter is first in every pipeline and its limit_mib is set below the container memory limit with headroom (the README notes total process memory usually runs about 50 MiB above the heap limit). Look for unbounded buffers: tail sampling with a high num_traces or long decision_wait, large in-memory sending queues, or a slow backend causing queues to fill. Scale horizontally (with load-balancing by trace ID if tail sampling), reduce data earlier with filtering, and alert on refused data so you know when backpressure starts.
What the interviewer wants to hear: memory limiter set relative to the container limit, buffer sizing and horizontal scaling.
34. p99 latency on checkout jumped from 300 ms to 2 s. Walk through the investigation.
Start with the latency histogram for the checkout route and click an exemplar in the slow bucket to open a real slow trace. In the trace, find the span with the largest self-time: for example a database span with a slow query, a downstream payment call with retries, or a gap indicating time spent waiting for a connection pool. Compare with a normal trace. Then filter traces by attributes such as service.version or a node name to see whether the slowdown correlates with a deployment or an infrastructure change, and check correlated logs for that trace ID.
What the interviewer wants to hear: metrics to exemplar to trace to logs, and correlation with versions or infrastructure.
35. The business requires that every failed payment trace is kept, but you can only afford to store 5% of traces. Design the sampling.
Use head sampling at 100% (or a high rate) for the payment path so spans are produced, then tail sampling at the gateway with a composite policy: keep everything with status Error, keep everything above a latency threshold, keep traces with a specific attribute such as payment.outcome=failed, and keep a probabilistic sample of the rest sized to hit the 5% storage budget. Route by trace ID across gateway instances. Keep span-derived metrics from 100% of data for accurate error rates.
What the interviewer wants to hear: tail sampling with policies, trace-ID routing and unsampled metrics.
36. A legacy service cannot be modified or restarted with an agent. How do you still get visibility?
Capture telemetry around it rather than inside it: the calling services' CLIENT spans already show its latency and errors from the outside; an ingress controller, API gateway or service mesh that supports OpenTelemetry can emit spans and propagate context for traffic in and out; and its logs can be collected with the filelog receiver and correlated by request ID. Be explicit that this gives edge visibility, not internal spans.
What the interviewer wants to hear: pragmatic options and honesty about their limits.
Architecture and design
37. Design the telemetry pipeline for a 200-service Kubernetes platform.
- SDKs and auto-instrumentation injected by the Operator, exporting OTLP to a node-local agent.
- Agent DaemonSet: OTLP receiver,
filelogfor container logs,hostmetricsandkubeletstats,memory_limiter,k8sattributesfiltered to the node,resourcedetection; exports to the gateway. - Gateway tier 1:
load_balancingexporter by trace ID. Tier 2: tail sampling, spanmetrics connector, redaction, routing to backends, persistent queues. - Backends chosen per signal; credentials only on gateways.
- Collector self-monitoring with alerts on refused, dropped and failed exports.
- Configuration in Git, rolled out through GitOps.
What the interviewer wants to hear: clear responsibilities per tier and observability of the observability pipeline.
38. Two business units want their telemetry in different backends, and security wants audit logs in a third. How do you design it?
Tag data with a resource attribute identifying the tenant or business unit at the source (or derive it from the Kubernetes namespace with k8sattributes). At the gateway, use the routing connector to send each tenant's data to its own pipeline and exporter, and route audit log records to the security backend with a filter on a log attribute. Keep a default route for unmatched data so nothing silently disappears, and monitor per-route volume.
What the interviewer wants to hear: attribute-based routing with a safe default.
39. How would you build SLOs on OpenTelemetry data?
Define service level indicators from metrics, not from sampled traces: for availability, the ratio of non-5xx server responses to total, using http.server.request.duration (a histogram that carries count) with http.response.status_code; for latency, the fraction of requests below a threshold from the same histogram. Choose histogram bucket boundaries that include your threshold. Compute error budgets and burn-rate alerts in the metrics backend. Use traces and exemplars to investigate when the budget burns.
What the interviewer wants to hear: SLIs from unsampled metrics, histogram buckets aligned to targets, and burn-rate alerting.
40. Where should processing happen: in the SDK, the agent or the gateway?
In the SDK: things that need application context, such as sampling decisions at the root, custom attributes and metric views that drop high-cardinality attributes before they are aggregated. In the agent: local enrichment (host and Kubernetes metadata), log collection and early filtering of obvious noise to save network. In the gateway: anything that needs a global view or central control, such as tail sampling, cross-service span metrics, redaction policy, routing and backend credentials.
What the interviewer wants to hear: a principled split based on what context each layer has.
Troubleshooting
41. An application is instrumented but no traces reach the backend. Give your checklist.
- Is the SDK actually enabled? Check
OTEL_SDK_DISABLEDand that the agent or SDK initialised (startup logs,OTEL_LOG_LEVEL=debug). - Endpoint, port and protocol: gRPC on 4317 versus HTTP on 4318 is the classic mismatch, and some HTTP exporters need the full
/v1/tracespath when you set a signal-specific endpoint. - TLS: is the exporter using https against a plaintext receiver or the reverse?
- Sampling: is the sampler
always_off, or a ratio of zero, or is the parent unsampled? - Collector: is the receiver in the traces pipeline? Add the
debugexporter to see whether data arrives, then check exporter errors in Collector logs and its internal metrics. - Backend: authentication headers, tenant ID and rejected-data responses (partial success counts).
What the interviewer wants to hear: work from the source towards the backend and use the debug exporter to split the problem.
42. Many spans in the backend have no parent ("orphan" spans). What causes that?
The parent span was never exported (sampled out by a sampler that is not parent-based, dropped because a queue was full, or the process crashed before flushing), the parent service is not instrumented but forwards a traceparent anyway, the spans were split across tail-sampling instances without trace-ID routing, or clock skew makes the UI misplace them. Check sampler configuration across services, SDK dropped-span counts, and the load-balancing setup.
What the interviewer wants to hear: inconsistent sampling, drops and routing as the main causes.
43. Your metrics backend suddenly reports a huge jump in active series. How do you find the cause?
Query series counts per metric name and then per attribute to find which attribute exploded. Typical culprits are a new deployment adding a request ID, user ID or raw URL as a metric attribute, a library upgrade that changed attribute names (producing both old and new series), or pod churn when pod names are metric attributes. Fix it at the source with a metric view that drops the attribute, or in the Collector with a transform or attributes processor while the code fix ships.
What the interviewer wants to hear: find the attribute, fix at source, and a Collector-side stopgap.
44. The SDK logs that spans are being dropped. What is happening?
The batch span processor queue is full. Its defaults are a queue of 2,048 spans, export batches of 512 and a 5-second schedule delay (OTEL_BSP_MAX_QUEUE_SIZE, OTEL_BSP_MAX_EXPORT_BATCH_SIZE, OTEL_BSP_SCHEDULE_DELAY). If the exporter cannot keep up because the Collector is slow, unreachable or refusing data under memory pressure, the queue fills and new spans are dropped. Check exporter errors and latency first; raising the queue size only buys time. Also check that the process isn't creating far more spans than expected, for example inside a tight loop.
What the interviewer wants to hear: queue mechanics, defaults, and fixing the downstream bottleneck first.
45. Logs and traces are both in the backend, but you cannot jump from a trace to its logs. Why?
The log records lack trace_id and span_id. Either logs are written to files without a log bridge or MDC injection, so they carry no trace context, or the log pipeline parses them without mapping the trace ID field into the log record's trace context. Fix by enabling the log bridge or the logging instrumentation that injects trace IDs, or configure the filelog receiver's parser to extract trace and span IDs from the log line. Check the backend's correlation settings too.
What the interviewer wants to hear: correlation depends on trace IDs being present and mapped, not just stored side by side.
Hands-on
46. Write a minimal production-style Collector configuration for traces, metrics and logs.
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: 1500
spike_limit_mib: 300
k8sattributes: {}
resourcedetection:
detectors:
- env
- system
exporters:
otlp_grpc:
endpoint: gateway.observability.svc:4317
sending_queue:
batch: {}
debug:
verbosity: basic
extensions:
health_check: {}
service:
extensions:
- health_check
pipelines:
traces:
receivers:
- otlp
processors:
- memory_limiter
- k8sattributes
- resourcedetection
exporters:
- otlp_grpc
metrics:
receivers:
- otlp
processors:
- memory_limiter
- k8sattributes
- resourcedetection
exporters:
- otlp_grpc
logs:
receivers:
- otlp
processors:
- memory_limiter
- k8sattributes
- resourcedetection
exporters:
- otlp_grpc
Add debug to a pipeline's exporters temporarily when troubleshooting. Older Collector versions use otlp as the exporter name and the batch processor instead of exporter batching.
What the interviewer wants to hear: memory limiter first, enrichment, exporter-level queueing and a health check.
47. Add a manual span with attributes and error handling in Python.
from opentelemetry import trace
from opentelemetry.trace import Status, StatusCode
tracer = trace.get_tracer("checkout.payments")
def charge(order_id: str, amount: float):
with tracer.start_as_current_span("charge_card") as span:
span.set_attribute("order.id", order_id)
span.set_attribute("payment.amount", amount)
try:
return gateway_call(order_id, amount)
except Exception as exc:
span.record_exception(exc)
span.set_status(Status(StatusCode.ERROR))
raise
Run it with zero-code instrumentation for the HTTP and database layers:
pip install opentelemetry-distro opentelemetry-exporter-otlp
opentelemetry-bootstrap -a install
OTEL_SERVICE_NAME=checkout opentelemetry-instrument python app.py
What the interviewer wants to hear: context-managed spans, attributes, recording exceptions and setting status.
48. Configure the Java agent entirely through environment variables.
export JAVA_TOOL_OPTIONS="-javaagent:/otel/opentelemetry-javaagent.jar"
export OTEL_SERVICE_NAME=orders
export OTEL_RESOURCE_ATTRIBUTES=service.version=2.3.0,deployment.environment.name=prod
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_TRACES_SAMPLER=parentbased_traceidratio
export OTEL_TRACES_SAMPLER_ARG=0.2
java -jar orders.jar
The exporters for traces, metrics and logs default to otlp; set OTEL_METRICS_EXPORTER=none or OTEL_LOGS_EXPORTER=none to turn a signal off.
What the interviewer wants to hear: standard OTEL_* variables work across languages, and the protocol must match the port.
49. Write the first-tier configuration for two-tier tail sampling.
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
load_balancing:
routing_key: traceID
protocol:
otlp:
tls:
insecure: true
resolver:
dns:
hostname: otel-sampler-headless.observability.svc.cluster.local
service:
pipelines:
traces:
receivers:
- otlp
exporters:
- load_balancing
The second tier runs tail_sampling with policies such as:
processors:
tail_sampling:
decision_wait: 10s
policies:
- name: keep-errors
type: status_code
status_code:
status_codes:
- ERROR
- name: keep-slow
type: latency
latency:
threshold_ms: 1000
- name: sample-rest
type: probabilistic
probabilistic:
sampling_percentage: 5
Use TLS rather than insecure: true outside a lab, and a headless Service so DNS returns every sampler pod.
What the interviewer wants to hear: trace-ID routing, DNS resolver with a headless Service, and sensible policies.
50. Enable auto-instrumentation for a Node.js deployment with the Operator.
kubectl apply -f instrumentation.yaml # Instrumentation resource from question 24
kubectl patch deployment web -n shop --type merge -p \
'{"spec":{"template":{"metadata":{"annotations":{"instrumentation.opentelemetry.io/inject-nodejs":"true"}}}}}'
kubectl rollout status deployment/web -n shop
kubectl describe pod -n shop -l app=web | grep -i otel
Check that an init container copied the instrumentation and that OTEL_* environment variables are set. The opentelemetry.io example for Node.js points the exporter at the gRPC port 4317 rather than 4318, so match the endpoint to the language's default exporter protocol.
What the interviewer wants to hear: annotation plus rollout, and verifying injection rather than assuming it.
How to prepare for an OpenTelemetry interview
- Run the OpenTelemetry demo application or a small two-service app locally, send data to a Collector with the debug exporter, then to Jaeger and Prometheus.
- Break propagation deliberately (remove the propagator on one side) and see what the traces look like.
- Write a tail sampling configuration and test that error traces survive.
- Read the stability levels on the status page and in the component READMEs you use, and be ready to say what is stable.
- Practise the incident story: metric alert, exemplar, trace, logs, root cause.
Kubernetes knowledge is assumed in most of these roles; revise with our Kubernetes interview questions and the Kubernetes interview questions hub.
Sources
- OpenTelemetry status (checked 5 December 2026)
- OpenTelemetry Collector documentation (checked 5 December 2026)
- Collector gateway deployment pattern (checked 5 December 2026)
- OTLP specification (checked 5 December 2026)
- Sampling concepts (checked 5 December 2026)
- SDK environment variables (checked 5 December 2026)
- Metrics API specification (checked 5 December 2026)
- Logs concepts (checked 5 December 2026)
- Semantic conventions (checked 5 December 2026)
- HTTP span semantic conventions (checked 5 December 2026)
- Operator auto-instrumentation (checked 5 December 2026)
- W3C Trace Context Recommendation (checked 5 December 2026)
- Memory limiter processor README (checked 5 December 2026)
- Batch processor README (deprecation notice) (checked 5 December 2026)
- Exporter helper README (sending_queue, retry_on_failure) (checked 5 December 2026)
- Collector changelog (otlp_grpc and otlp_http rename) (checked 5 December 2026)
- Tail sampling processor README (checked 5 December 2026)
Prepare with Cloud Soft Solutions
Cloud Soft Solutions teaches DevOps, SRE and Kubernetes in our Ameerpet, Hyderabad classroom and online. Observability sessions include hands-on labs with OpenTelemetry SDKs, the Collector, tail sampling, Prometheus and Grafana on Kubernetes, followed by mock interviews built around incident scenarios like the ones in this guide. You practise explaining how you would find a root cause, step by step, the way interview panels ask.
📞 Call +91 96660 19191 · +91 99496 16388 · WhatsApp
Cloud Soft Solutions, 513, 5th Floor, Aditya Enclave, Nilagiri Block, beside Ameerpet Metro Station, Ameerpet, Hyderabad 500016, Telangana, India
Frequently Asked Questions
What are the default OTLP ports?
OTLP over gRPC uses port 4317 by default and OTLP over HTTP uses port 4318. Over HTTP, data is sent to /v1/traces, /v1/metrics and /v1/logs.
Is OpenTelemetry an observability backend?
No. OpenTelemetry provides APIs, SDKs, instrumentation, the OTLP protocol and the Collector. You still need a backend to store and query traces, metrics and logs.
What is the default trace sampler in OpenTelemetry SDKs?
The default OTEL_TRACES_SAMPLER value is parentbased_always_on, which records every new root trace and follows the parent's decision for child spans.
What is the difference between head and tail sampling?
Head sampling decides at the start of a trace, which is cheap but cannot target errors. Tail sampling decides after seeing most or all spans of a trace, so it can keep errors and slow traces, but it is stateful and needs all spans of a trace on the same Collector.
Which header does OpenTelemetry use for context propagation by default?
By default OpenTelemetry uses the W3C Trace Context traceparent and tracestate headers together with the W3C Baggage header. OTEL_PROPAGATORS defaults to tracecontext,baggage.
Why should memory_limiter be the first Collector processor?
The memory_limiter processor refuses data when memory crosses its soft limit. Placing it first means backpressure reaches the receivers before other processors allocate memory, which reduces the risk of the Collector running out of memory.



