Why OTLP traffic needs TLS and when mTLS is worth the effort
Telemetry should be encrypted in transit whenever it leaves the process that produced it, and mutual TLS is worth the extra work when a receiver must know which workload is sending. OpenTelemetry is a framework and toolkit for generating, exporting and collecting traces, metrics and logs. It is not an observability back end, so the data it carries travels to a separate storage and visualization system, often across hosts, clusters or network zones. Spans, log bodies and resource attributes can contain user identifiers, internal hostnames, request paths and occasionally credentials, so plaintext OTLP on a shared network exposes more than performance numbers. The Collector sits in the middle of that path. It receives, processes and exports telemetry, and it runs either as an agent beside workloads or as a gateway that accepts data from many sources.
For traffic that stays on one host, such as an SDK exporting to a local agent over localhost, plaintext is usually an acceptable trade-off, provided the Collector receiver is bound only to the loopback interface. Since Collector v0.110.0, server components bind to localhost by default, which removes one common exposure. TLS alone is generally enough when the receiver must prove its identity to the sender and the sender's identity does not need to be checked, for example when a gateway in a controlled network accepts traffic from a limited set of services that already authenticate through other controls. mTLS becomes worth the effort when the gateway must reject unknown senders, when tenants or teams share a pipeline, or when a regulator or internal control asks you to show that every producer is authenticated. Confirm with your security team which network segments cross trust boundaries before deciding.
Where OTLP traffic crosses trust boundaries
Telemetry starts in an application SDK and usually reaches a Collector agent running on the same host, then travels to a gateway Collector and finally to a back end. Each hop may cross a different trust boundary: the localhost hop stays on one machine, while agent-to-gateway and gateway-to-back-end hops often cross network zones. Check which hops carry TLS only, which need mTLS in both directions, and which can stay plaintext on loopback, before you choose certificate scope.
OTLP hops and the trust boundaries they cross, from SDK to back end.
How server and client certificates work in OTLP receivers and exporters
A receiver that accepts OTLP over TLS presents a server certificate during the handshake, and the exporter on the other end decides whether to trust it. The exporter checks that the certificate chains to a certificate authority it has been configured to trust, that the certificate is within its validity period, and that the name it was dialing appears in the certificate's subject alternative names. If any of these checks fail, the connection never carries telemetry, so the failure appears as an export error rather than as missing data that someone has to chase. For each hop (SDK to agent, agent to gateway, gateway to back end), the team must decide which CA signs the receiver certificate and which CA file each exporter trusts. Plan these as separate trust decisions, because a single internal CA and a public CA for a managed back end usually need different trust configuration. Confirm the exact option names for CA files and server name checks in the Collector configuration documentation for your version, since they are not reproduced here.
In mTLS, the handshake runs in reverse as well: the receiver asks the exporter to present a client certificate, and the receiver verifies it against a CA it trusts. This is the mechanism that proves which workload is sending data, independent of any network address. The client certificate's identity fields, such as its subject or SAN entries, should map to a workload identity your team can audit, and the receiver's CA for client certificates should be separate from the CA used for server certificates where your policy requires it. Verify the setup by sending a request with no client certificate and confirming it is rejected, then sending one with a certificate from an unrelated CA and confirming that is also rejected.
Certificates are not the only way to establish client identity. The Collector configuration documentation describes authenticator extensions: an OIDC authenticator can verify tokens on incoming receiver connections, and the oauth2client extension can attach credentials to outgoing exporter requests. These suit cases where workloads already obtain tokens from an identity provider and rotating tokens is easier than rotating certificates. The two approaches can be combined, for example TLS for transport encryption with a token for caller identity. Decide which identity signal each receiver will trust, record that decision with the certificate plan, and confirm which authenticator types your chosen Collector distribution includes before you design around them.
Which transport option fits each hop
This table compares plaintext on localhost, TLS with server certificates, mTLS with client certificates, and authenticator extensions for each hop in an OTLP path. Read each row against the hop you operate, then confirm exact configuration keys in the Collector configuration docs for the version you deploy.
| Option | When it fits | What it protects | Operational cost |
|---|---|---|---|
| Plaintext on localhost | SDK to a Collector agent on the same host or pod network namespace, where no other process or network path can reach the listener | Little beyond the host boundary. Anything with local access can read or inject telemetry | Lowest. Confirm the receiver binds to localhost only, since server components bind to localhost by default from v0.110.0 |
| Plaintext across a network | Rarely acceptable. Only where an isolated, audited segment carries the traffic and an assessor has accepted that risk in writing | Nothing in transit. Telemetry can carry tokens, user identifiers and internal paths | Low to set up, high to justify later. Expect findings in most security reviews |
| TLS with server certificates | Agent to gateway or gateway to back end across a network, where the receiver must prove its identity to the sender | Confidentiality and integrity in transit, and the sender can verify the receiver's identity | Certificate issuance, distribution and renewal. Confirm the receiver's TLS keys in the Collector configuration docs for your version |
| mTLS with client certificates | Gateways that accept data from many agents or teams, and any hop that crosses a trust boundary | Adds proof of the sender's identity, so unknown workloads cannot push data | Highest certificate lifecycle work. Each sender needs a certificate, a rotation path and a revocation process |
| Authenticator extensions | When identity should come from an existing system, such as OIDC tokens or a credential the exporter adds to requests | Authenticates the caller at the receiver or adds credentials on outgoing exporter requests, and usually still needs TLS underneath | Token issuance, validation endpoints and token lifetimes. Confirm supported extensions and their stability per component README |
| Mixed approach across hops | Typical multi-hop designs: localhost plaintext at the SDK, mTLS from agents to gateways, TLS or authenticated TLS to the back end | Matches protection to the trust boundary at each hop rather than applying one setting everywhere | Requires an inventory of every hop, its trust boundary and its certificate owner before rollout |
Where plaintext on localhost is acceptable
Plaintext between an SDK and a local agent is a trust decision about the host, not a shortcut. The cards below cover when that decision holds, what changed when the Collector began binding to localhost by default, and the configurations that turn localhost traffic back into network traffic.
Localhost default since v0.110.0
Since Collector v0.110.0, server components bind to localhost by default rather than 0.0.0.0. Upgrades can therefore break SDKs that reach the agent from another container or host, because the listener no longer accepts those connections. Check the receiver endpoint in each configuration after upgrading, and confirm the bind address the release notes describe for your version before you rely on it.
Collector security practicesSame host, same trust boundary
Plaintext over the loopback interface is reasonable when the SDK process and the agent run on the same host under the same operator's control. Traffic on loopback never leaves the host's network stack, so network sniffing is not the threat. Confirm that no other user or workload on the host can read the agent's memory, its configuration or the telemetry in transit.
No untrusted local users
Loopback plaintext assumes that only trusted processes can open the local port. On multi-tenant hosts, shared build runners or bastion hosts, another user can often connect to localhost and inject or read spans. Ask who has shell access to the node, and restrict the agent's socket or port with host-level permissions where the platform allows it.
Shared network namespace limits
Containers in the same Kubernetes pod share a network namespace, so localhost is shared too. A sidecar that is shared with an untrusted or third-party container exposes its receiver to that container. Treat the pod as the trust boundary, and move the agent to a separate pod or node pool when the co-located workloads differ in trust level.
Wider bind addresses need TLS
Any receiver bound to 0.0.0.0, a pod IP, a node interface or a host-network address is reachable from the network, so localhost reasoning no longer applies. Set the endpoint explicitly in the receiver configuration and require TLS, with mTLS where senders are not fixed. Verify the listening addresses with a socket listing on each host after deployment.
Agents that forward to gateways
Plaintext on localhost ends at the local agent. The hop from agent to gateway or back end crosses a network and needs the TLS and certificate controls covered elsewhere on this page. Document each hop in the pipeline design so reviewers can see where encryption starts, and do not let the local hop be cited as protection for the forwarded traffic.
How to set up TLS and mTLS across the OTLP path
This sequence takes OTLP traffic from plaintext to encrypted, and where chosen, mutually authenticated, across every hop from SDKs to agents, gateways and back ends. Each step ends with a check so the team knows the hop works before moving on.
Inventory hops and trust boundaries
The platform or observability team lists every OTLP connection: SDK to local agent, agent to gateway, gateway to back end, and any path that crosses a network zone, cluster or tenant boundary. For each hop, they record the sender, the receiver, the network it crosses and who owns each side. They also mark which hops are loopback on the same host, since those may be acceptable in plaintext. The step is done when the hop list is reviewed by the security team and every connection has an owner and a decision recorded: encrypt only, or encrypt and authenticate the client.
Choose a private CA or existing PKI
The team decides whether OTLP certificates come from an existing internal certificate authority or from a private CA created for telemetry. Existing PKI is usually preferred where it already issues service certificates, supports automated renewal and has audit logs. Either way, the team confirms who holds the CA private key, how it is protected, and how revocation or re-issuance is handled. The output is a written trust model naming the root and intermediate CAs that OTLP components will trust. Check: the security team signs off on the trust model, and no OTLP component is configured to trust a public CA by default.
Issue server certificates with correct names
For each receiver or gateway, the team requests a server certificate whose subject alternative names match the exact host names or IP addresses that SDKs and agents use to connect. A certificate issued for one name will fail validation when a client connects through another, such as a Kubernetes service name or a load balancer address, so the list must be complete before issuance. Keys are generated on the host or in a secrets system and kept out of configuration files and Git. Check: each certificate is parsed with a standard tool, and the SAN list matches every endpoint in the hop inventory.
Configure TLS on receivers and exporters
The platform team enables TLS on each OTLP receiver and sets the matching TLS settings on each exporter. Receivers present the server certificate and key from files or injected secrets, and exporters set the CA file used to verify the server. Minimum protocol versions and cipher choices should follow the organization's cryptography policy and the Collector's documented options, which should be confirmed in the version in use. Exporters should not set certificate verification to skip. Check: the Collector starts without errors, and a test export over each hop completes with a verified handshake.
Enable client certificate checks for mTLS
For hops where the receiver must confirm which workload is sending telemetry, the team enables client certificate verification on the receiver and issues a client certificate to each exporting agent or SDK. The receiver is configured with the CA that signed client certificates, and the exporter presents its own certificate and key. Identity should map to a stable name, such as a service account or workload identity, so access can be reviewed and revoked. Where authenticator extensions are used instead, the team confirms which identity source they read. Check: a client with a valid certificate is accepted, and a client with no certificate is rejected.
Configure SDKs to trust the CA
Application teams configure each SDK or zero-code agent to send OTLP to the agent endpoint over TLS, with the private CA bundle available to the runtime. Language runtimes handle trust stores differently, so each language team confirms how its exporter loads a custom CA and, for mTLS, how it loads a client certificate and key. Localhost plaintext is kept only where the hop stays on the same host and the agent is bound to loopback, which should be confirmed against the Collector's current defaults. Check: each application service exports successfully in a non-production environment and the handshake is logged as verified.
Test success and failure paths
The team runs test traffic over every hop, then deliberately breaks each control to confirm it fails closed. Failure tests include an expired server certificate, a certificate signed by an untrusted CA, a client with no certificate on an mTLS hop, a client certificate from the wrong CA, and a hostname that is not in the SAN list. Each test should produce a rejected connection and a clear log entry, with no telemetry accepted. The results are recorded alongside the hop inventory. Check: every negative test is rejected, and every positive test is accepted, with the evidence stored for review.
Schedule rotation and renewal
The team sets up certificate renewal before the first certificate expires, using the same automation used for other internal services where possible. Rotation procedures cover reloading or restarting receivers, updating client bundles in SDKs and agents, and the overlap period when old and new CAs are both trusted. The owner, alert threshold and runbook are documented. Ask the vendor or the Collector's release notes which configuration changes apply without a restart in the version deployed. Check: a rotation is rehearsed in a test environment, and the expiry alert fires before the certificate is due to lapse.
How certificate rotation works for agents, gateways and SDKs
Collector receivers and exporters load TLS certificate and key files from paths set in the configuration. Whether a running Collector picks up new files without a restart depends on the component and the Collector version, so the reload behavior is something to confirm in the version you run rather than assume. Check the README for each receiver and exporter you use, and test the rotation on a non-production gateway before relying on it.
- Receiver certificates: Confirm whether the OTLP receiver's TLS settings reload when files change, or whether a restart is required to serve the new certificate.
- Exporter client certificates: Confirm how exporters handle a rotated client certificate and CA bundle, and whether in-flight connections are re-established.
- Reload triggers: Determine whether reloads happen on a file change, a signal, or only on a configuration update, since this affects how your rotation job is written.
- Gateway ordering: Rotate the trust side of downstream gateways before the serving side, so agents that present new client certificates are accepted.
- Version check: Record the Collector version and the reload behavior you observed in your change records.
Before each rotation, confirm in a staging environment that a handshake succeeds with the new certificate and that no data loss appears in the Collector's own metrics.
SDKs read certificate files when the exporter is created, and some language runtimes cache trust stores for the life of the process. A new certificate on disk therefore may not be used by an application until its exporter is recreated or the process restarts. Whether a restart is needed depends on the language SDK, the exporter library and how the application loads its trust store, so confirm this per service.
- Load time: Identify when each SDK reads the certificate and key files, typically at startup or exporter initialization.
- Restart requirement: Test with a staging copy of the service whether rotating files alone is enough or whether a rolling restart is needed.
- Environment variables: Check which trust store environment variables or CA bundle settings the SDK honors, and whether they apply to OTLP exporters specifically.
- Rolling restarts: Plan restarts across replicas so that telemetry from the service keeps flowing during rotation.
- Local agent hop: Where the SDK sends to a local agent over localhost, decide whether that hop needs TLS at all, as covered in the localhost tab.
Confirm with the vendor or SDK documentation for your language version that the rotated certificate is actually presented on the next export.
Exporters from the Collector to a back end trust the back end's server certificate and, in mutual TLS, present a client certificate. Back-end operators often rotate their own server certificates on a separate schedule, so the Collector must trust the issuing CA and handle chain changes. Coordinate with the back-end team and verify the behavior against their actual endpoint, not only a test instance.
- Trust bundle changes: Ask the back-end owner for the new CA before their server certificate changes, so the Collector trusts the new chain in advance.
- Client identity: For mutual TLS, confirm how the back end maps client certificates to identities and whether a rotated certificate keeps the same identity.
- Retry behavior: Confirm how exporters retry and buffer when a handshake fails, since a bad rotation can cause queued data to back up.
- Credential sources: If client credentials come from an authenticator extension, check whether that extension refreshes them on its own schedule.
- Rotation intervals: Set how often certificates rotate from your own security policy and the back end's requirements, not from a default in this guide.
After each change, confirm that the exporter's sent-data metrics continue to rise and that no failed-export counters grow.
The safest rotations keep the old and new certificate authorities trusted together for a period, so that every component can finish moving before the old trust is removed. Without an overlap, a single component that has not reloaded can fail its handshakes while the rest of the pipeline works. The length of the overlap should follow from how long your slowest component takes to reload, which you measure in your own environment.
- Dual trust bundles: Add the new CA to every trust store first, then issue new leaf certificates signed by it.
- Phase order: Move trust, then serving certificates, then client certificates, then remove the old CA last.
- Inventory: Keep a list of every agent, gateway, SDK service and exporter that holds a certificate, so none is missed when the old CA is removed.
- Expiry monitoring: Alert on expiry for each leaf certificate and each CA, so an overlap is not extended by accident.
- Rollback path: Keep the old certificate and key available until verification passes.
Before removing the old CA, confirm with handshake tests and export metrics from every tier that no connection still presents the old chain.
Security and operational risks to plan for
TLS and mTLS for OTLP traffic rarely fail at the moment of setup. They fail later, when keys leak, certificates expire, hostnames stop matching or a debug endpoint is reachable from a network it was never meant for. The cards below cover the risks to plan for before the first certificate is issued, and the checks that catch each one.
Private key storage and handling
Every collector, agent and SDK-facing receiver holds a private key that proves its identity. Keys stored in configuration files or copied into Git repositories turn a single leak into impersonation of a gateway. Decide where each key is generated, who can read it at runtime and how it is delivered to the pod or host. Keep the mechanics of storage and rotation in your secrets planning, and check here that no key appears in rendered configuration, container images or logs.
Collector security guidanceCA scope and name constraints
A single internal certificate authority that signs both client and server certificates for all telemetry paths is a wide trust boundary. Any certificate it issues can be presented to your gateway. Split authorities by environment or trust zone where practical, and restrict what each intermediate may sign. Confirm the constraints your PKI supports, such as limiting permitted DNS names, before you rely on them, since not every tool exposes them the same way.
Revocation approach
Revoking a stolen client certificate only works if your receivers check revocation at all. Short-lived certificates reduce the need for revocation lists, but they raise the importance of reliable rotation. Decide whether you will publish a CRL, use OCSP, or rely on short lifetimes, and test that a revoked SDK or agent is actually refused. Confirm how your chosen receiver and exporter versions handle revocation before writing the runbook.
Certificate expiry monitoring
An expired certificate stops telemetry without stopping the application, so the gap can go unnoticed for days. Track the expiry date of every server and client certificate in the pipeline, and alert well before it lapses. Include certificates that sit on localhost-facing agents and in sidecars, since those are often forgotten during rotation. Make sure the alert reaches the team that owns the collector, not only the platform team that issued the certificate.
Hostname mismatches that fail silently
When the name in a gateway certificate does not match the address an exporter dials, the TLS handshake fails and the exporter retries and drops data. The application keeps running, and the only sign may be a rising count of refused or dropped exports in the collector's own telemetry. Verify subject alternative names against every service address, including Kubernetes service DNS names, before rollout. Confirm how your collector version surfaces handshake errors so you can alert on them.
Debug endpoints on encrypted listeners
Adding TLS to a receiver does not make the rest of the collector private. Diagnostic surfaces such as zPages, pprof and internal metrics can remain on an address that is reachable from outside the trust zone, even when OTLP traffic is encrypted. Keep these bound to localhost or an administrative network, and confirm each listener's address in the rendered configuration. Review the collector's network exposure guidance together with its TLS settings, not separately.
Verifying releases before deployment
The certificate tooling you deploy alongside the collector is part of the supply chain. Before rolling out a collector build, check the signature, checksum and SBOM of the release artifact, and mirror the verified image into your private registry. Record the exact component versions so a later vulnerability notice can be matched against your fleet. Ask your team which release channel the collector and any helper images come from, and confirm that the process is written down.
Collector release artifactsQuestions teams ask before encrypting OTLP traffic
Is mTLS required on every OTLP hop?
No. mTLS is a choice you make per hop, based on who can reach each endpoint and how much you trust the network between them. TLS on the server side protects the data in transit and lets clients verify the receiver. mTLS adds client certificates so the receiver can also verify the sender, which matters most where telemetry crosses a trust boundary, such as from a shared gateway to a back end you do not operate, or from a cluster network that other teams can reach. Plaintext on localhost between an SDK and a local agent is often acceptable when only the same host process can reach that port. Document each hop, its trust boundary and the decision, then confirm the choice with your security team. Use the Collector's TLS settings in the receiver and exporter configuration, and check the Collector configuration docs for the exact keys your version supports.
How long does OTLP encryption setup take, and what drives it?
Duration depends mainly on four factors: the number of hops, how mature your PKI is, the language mix of your services, and how many environments you must test. Each hop needs a certificate chain, trust configuration and a tested failure path, so a pipeline with an SDK, an agent and a gateway has three places to get wrong. A mature internal CA with automated issuance shortens the work considerably. A team that has to design its certificate authority first lengthens it. Language mix matters because each SDK and exporter has its own TLS and client certificate options, and some need custom CA bundle handling. Ask any partner to break the estimate into hops, environments and PKI prerequisites, and to state which of those they assume you have already in place.
Can our team encrypt OTLP traffic without outside help?
Often yes, if you already run an internal CA, have someone who can write Collector configuration, and have non-production environments that mirror production. The work is well bounded: issue certificates, configure receivers and exporters, set trust stores, and verify each hop. Teams usually struggle in three places: agreeing who owns certificate issuance and rotation, testing failure modes such as an expired certificate or a wrong CA, and keeping keys out of configuration files and Git. If one of those is unclear, an outside partner can help with the design and testing while your team keeps operational ownership. Be clear in any engagement about which hops are in scope and who approves the final configuration.
What do we need to provide for an OTLP encryption project?
Three groups of inputs matter most. The first is a PKI owner who can approve the certificate authority, issuance process, validity periods and the rotation method. The second is platform access: permission to change Collector configuration, the deployment pipeline, and the place where private keys are stored, such as a Kubernetes secret or an external secret store. The third is test environments where you can break certificates on purpose, including a staging path that matches production hop by hop. You also need an inventory of every SDK, agent and gateway, their languages and versions, and the back ends they export to. Without that inventory, hop coverage tends to be incomplete.
Where does the cost of TLS for OTLP come from?
Cost comes from three places. The first is one-time internal time: design, configuration, testing and documentation across each hop and language. The second is PKI tooling, which may be an existing internal CA, a managed certificate service or a new deployment you need to buy or operate. The third is recurring work: rotating certificates, renewing the CA chain, updating trust bundles when a CA changes, and retesting after Collector upgrades. Costs rise with the number of hops, the number of languages and the lack of automation. They fall when issuance and rotation are automated and when the same configuration pattern is reused across services. Ask any quote to separate design, implementation, handover and ongoing rotation, and to say who is responsible for each.
What happens when an OTLP certificate expires?
The affected connection fails the TLS handshake, and telemetry stops flowing on that hop. The SDK or Collector typically keeps retrying and may drop or queue data depending on its exporter settings and buffer capacity, so the loss can be silent unless you monitor it. Expiry is usually caught late because the failure shows up as missing data, not as an error in the application. Prevent it with rotation that runs well before expiry, alerts on certificate age and on exporter failures, and a tested procedure for reissuing a certificate on a live pipeline. Check the exporter queue and retry settings for your Collector version and confirm how your monitoring surfaces refused connections before you rely on them.
How do we rotate OTLP certificates without losing telemetry?
Rotate in an overlap window. Issue the new certificate from the same trusted chain, deploy it to receivers, and confirm handshakes succeed before retiring the old one. Where the CA itself changes, trust both the old and new roots during the transition so clients accept either. Reload behavior differs by component, so confirm in your version whether the Collector picks up new certificate files without a restart, and whether SDK exporters need one. Automate the steps, keep the rotation log, and rehearse the process in staging so the first rotation in production is not the first test.
Is plaintext OTLP on localhost acceptable?
Often yes, when the receiver binds only to the loopback interface and only processes on the same host can reach it. Since Collector v0.110.0, server components bind to localhost by default, which reduces the exposure of plaintext receivers. Plaintext stops being acceptable once the receiver listens on a network interface, a container network shared with other workloads, or a path that leaves the host. Treat any change to the bind address as a trigger to review encryption on that hop. Confirm the bind address in your deployment manifests, since a Kubernetes service or a host network setting can expose a receiver you intended to keep local.
How DeployOpen scopes and delivers OTLP encryption work
DeployOpen plans, implements, tests and documents self-hosted OpenTelemetry pipelines inside your own infrastructure, including the TLS and mTLS settings described on this page. The work runs in your cloud accounts, data centers or controlled networks, so certificate authorities, private keys, Collector configuration and the resulting evidence stay under your control. Before any work starts, the written scope should name every hop to be encrypted, such as SDK to agent, agent to gateway and gateway to back end, along with the components that terminate TLS and the systems that will hold the certificates.
Most engagements are fixed-scope. The written scope, deliverables and timelines are agreed before work begins, and the quote follows from that scope rather than from a published price list. Ask for the deliverables to be listed explicitly: receiver and exporter configuration per pipeline, certificate issuance and rotation procedure, a verification record showing that plaintext is refused on non-local paths, and runbooks for certificate renewal. Also confirm which items are one-time work, such as initial build and testing, and which recur, such as renewals, Collector upgrades and retesting after configuration changes.
Ongoing support is available as a retainer for teams that want help after handover. A retainer typically covers Collector version upgrades, certificate rotation support, retesting after new pipelines are added and review of changes to receivers and exporters. Confirm with DeployOpen during scoping which of these items your team will own, which will be shared and what response expectations apply, since those terms are written into the agreement rather than assumed. Your security and platform teams should also confirm which certificate authority and rotation tooling they already operate, so the delivered design fits existing controls.

