KubeRusted
Spinning up your cluster…

OTCA exam prep — OpenTelemetry Certified Associate

Free OTCA (OpenTelemetry Certified Associate) practice: the 4 official domains, exam-style questions, a timed practice exam and more.

Play the OTCA map → · Official OTCA exam page

Fundamentals of Observability (18%)

Telemetry data, semantic conventions, instrumentation, analysis and outcomes

The OpenTelemetry API and SDK (46%)

Data model, composability, configuration, signals, SDK pipelines, context propagation, agents

The OpenTelemetry Collector (26%)

Configuration, deployment, scaling, pipelines, transforming data

Maintaining and Debugging Observability Pipelines (10%)

Context propagation, debugging pipelines, error handling, schema management

Practice questions

Which OpenTelemetry signals are stable across most language SDKs?

Answer: Traces; Metrics; Logs. Profiles are an emerging signal; dashboards and alerts are backend features, not signals.

What is OTLP?

Answer: The OpenTelemetry Protocol for sending telemetry between SDKs, Collectors and backends. OTLP runs over gRPC (port 4317) or HTTP (port 4318).

What does "vendor-neutral" mean for OpenTelemetry?

Answer: You instrument once and can send data to any compatible backend. Switching backends means changing exporter configuration, not code.

Which semantic convention attribute records the HTTP response status code?

Answer: http.response.status_code. Current HTTP semantic conventions use http.request.method and http.response.status_code.

Which resource attribute identifies the deployment environment, e.g. production?

Answer: deployment.environment.name. Resource semantic conventions define where telemetry comes from.

Code-based instrumentation means…

Answer: Using the OpenTelemetry API directly in your code to create spans and metrics. It captures business-specific operations that zero-code instrumentation cannot know about.

What is an instrumentation library?

Answer: A library that adds OpenTelemetry instrumentation to another library or framework (e.g. an HTTP client). Many are bundled into zero-code agents.

Which environment variable sets service.name for an SDK?

Answer: OTEL_SERVICE_NAME. OTEL_RESOURCE_ATTRIBUTES can set other resource attributes as key=value pairs.

What links a log record to the trace it happened in?

Answer: Trace ID and span ID on the log record. Log appenders/bridges add the active trace context automatically.

What is the main analysis benefit of correlated signals?

Answer: Jumping from a metric spike to example traces and their logs. Exemplars and shared trace context make the jump possible.

What does the OpenTelemetry Operator for Kubernetes provide?

Answer: Managing Collectors as custom resources; Injecting zero-code instrumentation into Pods. The OpenTelemetryCollector and Instrumentation CRDs.

Which statement about OpenTelemetry and storage is true?

Answer: OpenTelemetry does not store or visualize data; backends do. It covers generation, collection and export.

What is a span event?

Answer: A timestamped annotation inside a span, e.g. an exception. Exceptions are recorded as events with exception.* attributes.

What is a span link used for?

Answer: Relating a span to spans in other traces, e.g. a batch consumer processing many messages. Parent-child relationships use the parent span context, not links.

What does tracer.startActiveSpan (or the language equivalent) do?

Answer: Starts a span and makes it the current span in the context. Child spans created inside then use it as their parent.

A span is started but never ended. What happens?

Answer: It is not exported. Always end spans, e.g. in a finally block.

Which span kind fits an HTTP handler receiving a request?

Answer: SERVER. The outgoing call from the caller is CLIENT.

Which span kind fits sending a message to a queue?

Answer: PRODUCER. The process that receives it creates a CONSUMER span.

How should a span record that an operation failed?

Answer: Set status to Error (and record the exception as an event). Unset is the default; Ok is for explicitly confirmed success.

Which sampler keeps a fixed fraction of traces based on the trace ID?

Answer: TraceIdRatioBased. Wrapping it in ParentBased makes child spans follow the root’s decision.

Why wrap a ratio sampler in ParentBased?

Answer: So downstream services follow the upstream sampling decision and traces stay complete. Otherwise each service could drop different spans of the same trace.

Which environment variable selects the trace sampler?

Answer: OTEL_TRACES_SAMPLER. OTEL_TRACES_SAMPLER_ARG sets its argument, e.g. 0.1.

What is a SpanExporter responsible for?

Answer: Sending finished spans to a destination, e.g. OTLP or the console. Processors hand spans to exporters.

Which metric instrument records request durations so percentiles can be computed?

Answer: Histogram. The SDK aggregates histogram measurements into buckets.

Which instrument suits the current CPU temperature, read via a callback?

Answer: ObservableGauge (asynchronous gauge). Asynchronous instruments are observed on each collection.

Which instrument counts total bytes sent (only ever increasing)?

Answer: Counter. Counters are monotonic: they only accept non-negative increments.

What does a MeterProvider’s MetricReader do?

Answer: Collects metrics from the SDK, on a schedule or on demand. A PeriodicExportingMetricReader pushes on an interval; a pull reader serves a Prometheus endpoint.

What is a metric View used for?

Answer: Changing how an instrument is aggregated or named, or dropping attributes. E.g. custom histogram buckets or removing a high-cardinality attribute.

What is aggregation temporality?

Answer: Whether exported values are cumulative since start or deltas since the last export. Prometheus expects cumulative; some backends prefer delta.

What is baggage in OpenTelemetry?

Answer: Key-value pairs propagated with the context to downstream services. Baggage is not added to spans automatically — you read it where needed.

Which propagators are configured by default in most SDKs?

Answer: W3C Trace Context and W3C Baggage. OTEL_PROPAGATORS=tracecontext,baggage is the default.

Your services use Zipkin-style headers. What do you change?

Answer: Configure the B3 propagator (OTEL_PROPAGATORS=b3 or b3multi). Propagators and exporters are independent choices.

What does context propagation inject into an outgoing HTTP request?

Answer: Headers such as traceparent (and tracestate, baggage). The receiver extracts them to continue the trace.

What is the Logs Bridge API for?

Answer: Letting existing logging libraries emit OpenTelemetry log records. Applications keep their logging library; an appender bridges to OTel.

Which component should libraries depend on: the API or the SDK?

Answer: The API. Only the final application should choose and configure the SDK.

What happens if two different SDK TracerProviders are registered globally?

Answer: Only one can be the global provider; registering should happen once at startup. Set the global provider once, early.

Which environment variable selects the trace exporter?

Answer: OTEL_TRACES_EXPORTER. Values include otlp (default), console and none.

Which OTLP port is the default for HTTP?

Answer: 4318. 4317 is gRPC; 9411 is Zipkin; 14268 legacy Jaeger HTTP.

What does OTEL_EXPORTER_OTLP_PROTOCOL choose?

Answer: grpc, http/protobuf or http/json for OTLP exports. The default varies by language SDK.

What do resource detectors do?

Answer: Discover attributes about the environment (host, container, Kubernetes, cloud) automatically. Their attributes are merged into the Resource.

How do you add a key-value to a span after it started?

Answer: span.setAttribute(key, value). Attributes describe the operation; prefer semantic convention names.

What limits protect against unbounded span attributes or events?

Answer: SDK span limits (e.g. OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT). Excess attributes are dropped and counted.

Which SimpleSpanProcessor use is appropriate?

Answer: Debugging or tests, where immediate export matters more than performance. It exports synchronously on span end.

What is the role of the Context in OpenTelemetry?

Answer: Carrying the active span and baggage across function calls and threads. Context is propagated in-process and serialized across processes.

When an instrumented async task runs on another thread, how does it keep the parent span?

Answer: The context is propagated to it (automatically by instrumentation or manually). Lost context causes broken, disconnected traces.

What is an exemplar?

Answer: A sample measurement linked to a trace ID, attached to a metric data point. It lets you jump from a histogram bucket to a trace.

Which is true of metric attribute cardinality?

Answer: Each unique attribute combination creates a separate time series. Avoid unbounded attributes such as user IDs.

What does shutdown()/forceFlush() on a provider do at application exit?

Answer: Exports buffered telemetry so it is not lost. Batch processors hold spans in memory until they flush.

Which statement about the SDK pipeline order for traces is correct?

Answer: Sampler decides at span start; processors receive finished spans; exporters send them. Non-sampled spans are not recorded or exported.

What does OTEL_METRIC_EXPORT_INTERVAL configure?

Answer: How often the periodic metric reader exports. It is in milliseconds; the spec default is 60000 (one minute).

Which Collector distribution includes the broad set of community components?

Answer: otelcol-contrib. You can also build a custom distribution with the OpenTelemetry Collector Builder (ocb).

What do Collector extensions provide?

Answer: Capabilities outside the data pipeline, e.g. health_check, pprof, zpages, auth. Extensions are listed under service.extensions.

Which processor adds Kubernetes metadata (Pod, namespace, deployment) to telemetry?

Answer: k8sattributes. It looks up the source Pod by IP or resource attributes.

Which processor drops spans or metrics matching conditions?

Answer: filter. Conditions are written in OTTL.

What is OTTL?

Answer: The OpenTelemetry Transformation Language used by processors like transform and filter. E.g. set(attributes["env"], "prod") where resource.attributes["k8s.namespace.name"] == "prod".

Which processor performs tail-based sampling?

Answer: tail_sampling. It buffers spans and decides per trace based on policies like errors or latency.

What does the probabilistic_sampler processor do?

Answer: Keeps a percentage of traces (head-style) inside the Collector. It hashes the trace ID so decisions are consistent.

In Kubernetes, why run the Collector as a DaemonSet agent?

Answer: One per node to receive local telemetry and collect node/host data. A gateway Deployment handles central processing.

How do you scale stateless gateway Collectors?

Answer: Run multiple replicas behind a load balancer. Stateful processing like tail sampling needs trace-ID-aware routing instead.

Which exporter routes spans to Collectors by trace ID?

Answer: loadbalancing. It keeps all spans of a trace on the same backend Collector.

Which receiver scrapes Prometheus endpoints?

Answer: prometheus. It accepts Prometheus scrape_configs.

Which receiver collects CPU, memory and disk metrics from the host?

Answer: hostmetrics. kubeletstats gives Pod/container stats from the kubelet.

Which receiver tails log files, e.g. container logs on a node?

Answer: filelog. Operators parse formats such as the container runtime log format.

A pipeline lists exporters: [otlp, debug]. What happens to the data?

Answer: It is sent to both exporters. Pipelines fan out to every listed exporter.

Can one receiver be used in several pipelines?

Answer: Yes — e.g. otlp in traces, metrics and logs pipelines. Each pipeline gets its own copy of the data.

How do you name two instances of the same component type?

Answer: type/name, e.g. otlp/backend1 and otlp/backend2. The suffix after / makes the ID unique.

How can Collector config pull a value from an environment variable?

Answer: ${env:API_KEY}. Confmap providers also support file: and others.

Which command validates a Collector configuration without starting pipelines?

Answer: otelcol validate --config=config.yaml. Distribution binaries such as otelcol-contrib have the same subcommand.

Which connector derives request, error and duration metrics from spans?

Answer: spanmetrics. Connectors are exporters in one pipeline and receivers in another — here traces in, metrics out.

What does the transform processor do?

Answer: Modifies telemetry with OTTL statements (set, delete, rename…). Use the spanmetrics connector to derive metrics from traces.

Why put batch near the end of a pipeline?

Answer: It compresses many items into fewer export calls after filtering and transforming. Batching before filtering would waste work on data you drop.

Spans from service A and service B show up as separate traces. Most likely cause?

Answer: Context is not propagated between them (missing or mismatched propagators). Check that the caller injects and the callee extracts the same header format.

Which Collector internal metric shows data an exporter failed to send?

Answer: otelcol_exporter_send_failed_spans (and _metric_points, _log_records). Compare with otelcol_exporter_sent_* to see loss.

The memory_limiter keeps refusing data. What does that mean?

Answer: The Collector is near its memory limit — scale out or reduce load. Refused data is reported to the sender, which may retry.

Which extension exposes live pipeline debug pages in the Collector?

Answer: zpages. pprof is for profiling; health_check for liveness.

How can the sending queue survive a Collector restart?

Answer: Configure it with persistent storage (e.g. the file_storage extension). In-memory queues are lost on restart.

Semantic conventions renamed http.method to http.request.method. How can consumers cope?

Answer: Schema URLs and schema transformations map old names to new. Telemetry schemas describe changes between versions.

An SDK appears to export nothing. A quick first check?

Answer: Switch the exporter to console/debug and verify spans are produced. Then check endpoint, protocol (gRPC vs HTTP) and sampling.

Which attribute should every service set so backends can group its telemetry?

Answer: service.name. service.name is a resource attribute; without it backends show "unknown_service".

Why do semantic conventions matter?

Answer: Common attribute names let any backend and dashboard interpret data from any library. Consistent names (http.request.method, db.system) make telemetry portable and comparable.

A library calls the OpenTelemetry API, but the application never installs an SDK. What happens?

Answer: The calls are no-ops — nothing is recorded or exported. The API ships with no-op implementations so library instrumentation costs nothing until an SDK is registered.

Which HTTP header carries W3C trace context between services?

Answer: traceparent. W3C Trace Context (traceparent, tracestate) is the default propagator; B3 is Zipkin’s format.

Which span processor should production services use?

Answer: BatchSpanProcessor. Batching amortizes export cost and keeps request latency independent of the backend.

Which instrument fits "number of active connections", which rises and falls?

Answer: UpDownCounter. Counters must be monotonic; UpDownCounter accepts increments and decrements.

Which environment variable points every SDK at your Collector?

Answer: OTEL_EXPORTER_OTLP_ENDPOINT. It is defined by the spec, so the same variable works for every language SDK.

You added a filelog receiver under receivers: but no logs arrive. Most likely reason?

Answer: It is not referenced in a pipeline under service.pipelines. Only components listed in a service pipeline are started.

Where should memory_limiter and batch sit in a processors list?

Answer: memory_limiter first, batch near the end. Refuse data early when memory is tight; batch after the transformations, right before export.

Tail sampling needs every span of a trace in one place. How do you deploy for it?

Answer: Agents forward to a gateway tier, load-balanced by trace ID (loadbalancing exporter). Routing by trace ID guarantees all spans of a trace reach the same gateway instance.

How do you quickly check what data the Collector is actually receiving?

Answer: Add the debug exporter (verbosity: detailed) to the pipeline. The debug exporter prints the telemetry the pipeline sees to the Collector logs.

The tracing backend was down for 5 minutes. What lets the Collector avoid dropping data?

Answer: Exporter retry_on_failure with a sending_queue (optionally persistent). Retries with backoff plus a queue buffer the data until the backend returns.