OpenTelemetry as a single collection layer: standardizing telemetry across the entire company
Semantic conventions, resource attributes, the Collector's agent + gateway pattern, auto-instrumentation with the Operator, and a plan to migrate off proprietary agents without a visibility blackout.
Observability$ otelcol-contrib --config gateway.yaml▍At many companies, observability grew in layers: an APM agent on some services, a different log collector in each cluster, Prometheus exporters here, a homegrown metrics library there. Each tool has its own format, its own names, and its own commercial contract. Switching vendors means re-instrumenting everything, so nobody switches.
OpenTelemetry (OTel) has become the industry’s answer to this: an open standard for generating, collecting, and transporting telemetry, supported by virtually every backend on the market. In another article we showed how to instrument your first service. Here the goal is bigger: turning OTel into the company’s single collection layer.
What “single layer” means in practice
- One way to instrument: OTel SDKs and auto-instrumentation in every language.
- One protocol: everything travels over OTLP (gRPC or HTTP).
- One control point: all data passes through the OTel Collector before reaching any backend.
- One vocabulary: the same attribute names across every service, thanks to the semantic conventions.
With that in place, the backend becomes a configuration detail. Want to try another tool? Add an exporter to the Collector and send data to both at the same time.
Signals: what’s mature
Traces, metrics, and logs are stable signals in the specification. The fourth signal, profiling, is still in development and evolving quickly; we cover it in the article on correlating signals. For the first three, you can standardize everything today.
Semantic conventions: the shared vocabulary
The biggest win from standardization isn’t technical, it’s semantic. If one service calls the HTTP status status, another http_status, and a third code, no dashboard or alert works for all of them. The OTel semantic conventions define names such as:
| Concept | Standardized attribute |
|---|---|
| Service name | service.name |
| Deployed version | service.version |
| Environment | deployment.environment.name |
| HTTP method | http.request.method |
| HTTP response status | http.response.status_code |
| Route (template) | http.route |
The conventions evolve (some names have changed between versions), so pin the version your company uses and upgrade in a planned way.
Resource attributes: the glue between signals
Resource attributes describe who generated the telemetry and are attached to every signal from that process. Define them in a standardized way, for example via environment variables in the deployment manifest:
OTEL_SERVICE_NAME=checkout
OTEL_RESOURCE_ATTRIBUTES=service.version=1.42.0,deployment.environment.name=prod,team=payments
An identical service.name across metrics, logs, and traces is what lets you jump from one signal to another during an incident.
Collector architecture: agent + gateway
The most common pattern on Kubernetes combines two tiers:
- Agent (DaemonSet, one per node): receives OTLP from local applications, collects container logs and node metrics, and enriches them with Kubernetes metadata.
- Gateway (Deployment with multiple replicas): receives from the agents, applies central policies (sampling, filtering, sensitive-data removal), and exports to the backends.
A minimal gateway configuration:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
limit_percentage: 80
spike_limit_percentage: 20
k8sattributes: {}
resourcedetection:
detectors: [env, system]
batch: {}
exporters:
otlphttp/backend:
endpoint: https://otlp.your-backend.example.com
headers:
authorization: "Bearer ${env:BACKEND_TOKEN}"
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, k8sattributes, resourcedetection, batch]
exporters: [otlphttp/backend]
metrics:
receivers: [otlp]
processors: [memory_limiter, k8sattributes, resourcedetection, batch]
exporters: [otlphttp/backend]
logs:
receivers: [otlp]
processors: [memory_limiter, k8sattributes, resourcedetection, batch]
exporters: [otlphttp/backend]
Two precautions that prevent incidents in the Collector itself: memory_limiter comes first in the processor list, and the gateway has replicas and resources sized for peak load (telemetry grows precisely during incidents).
About distributions: the core distribution has few components; contrib has hundreds. In production, many companies build their own distribution with the OpenTelemetry Collector Builder containing only the components they use, which means a smaller image and less attack surface.
Auto-instrumentation at scale with the Operator
Instrumenting hundreds of services one by one doesn’t scale. The OpenTelemetry Operator for Kubernetes injects auto-instrumentation via an annotation:
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: default
namespace: observability
spec:
exporter:
endpoint: http://otel-agent.observability:4318
propagators: [tracecontext, baggage]
sampler:
type: parentbased_traceidratio
argument: "1"
# in the application's Deployment
metadata:
annotations:
instrumentation.opentelemetry.io/inject-java: "observability/default"
There are injectors for Java, .NET, Node.js, Python, and Go. Auto-instrumentation covers HTTP frameworks, database clients, and queues; after that, each team adds business spans and attributes where they matter.
Migrating off proprietary agents without losing visibility
- Inventory: list the current agents, libraries, and exporters per service.
- Collector first: deploy the OTel agents and gateway sending to your current backend (most of them accept OTLP natively).
- Temporary dual shipping: during the transition, critical services send through both the old and the new path; compare dashboards and alerts.
- Migrate service by service, starting with the least critical ones, and rebuild dashboards using the semantic-convention names.
- Turn off the old agent only once dashboards, alerts, and runbooks have been validated.
Governing the standard
- A base library or image per language with the SDK and default configuration already in place;
- A list of required attributes (
service.name,service.version, environment, team), checked in CI or rejected at the gateway; - Collector configuration versioned in Git, reviewed in PRs like any other code;
- A health dashboard for the pipeline itself: data received, refused, and exported per service.
Checklist
- OTLP as the default protocol for every service
- Tiered Collector (agent + gateway) with
memory_limiter - Standardized, required resource attributes
- Semantic conventions version defined
- Auto-instrumentation via the Operator in the clusters
- Per-service migration plan with a dual-shipping period
- Monitoring of the telemetry pipeline itself
Standardizing collection is what turns observability from a set of tools into a platform, and gives the company back the power to choose its backend.