> For the complete documentation index, see [llms.txt](https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/opentelemetry/from-missing-events-to-complete-visibility-tracing-enterprise-transactions-with-opentelemetry/day-23-34-security-considerations-in-opentelemetry-architecture-design.md).

# Day 23/34 Security Considerations in OpenTelemetry Architecture Design

The OpenTelemetry Collector plays a critical role in modern observability platforms. It collects traces, logs, and metrics from various systems and forwards them to a SaaS APM backend for monitoring and analysis.

Because this architecture handles highly sensitive operational data, security must be a first‑class design principle. A poorly secured observability pipeline can easily become an attack surface. Below are key areas to focus on when designing a secure OpenTelemetry implementation.

## 🧵 1. Trace & Log Content Control

According to the OpenTelemetry specification, applications can enrich spans with key‑value attributes. These attributes are extremely valuable for troubleshooting and diagnostics—but they also introduce security risks if misused.<br>

**❌ Avoid including sensitive information, such as:**\
System details (e.g., OS version, patch level)\
PII or customer-identifiable data\
Any data that could aid attackers if exposed

## 🌐 2. Network Architecture & DMZ Design

Most APM backends are SaaS-based, as they need to ingest telemetry from mobile clients and on‑prem systems.\
To minimize risk:\
Setup controlled network zone (DMZ) between the internet and internal networks\
Never expose internal systems directly to the SaaS backend\
Ensure all communication uses TLS/SSL to protect telemetry data in transit

## 🔑 3. SaaS Backend Authentication

Authentication to the APM backend should be machine‑to‑machine and zero‑trust friendly.\
Use API tokens or access keys\
Avoid username/password authentication

## ✅ Final Thought

Observability is powerful—but without proper security controls, it can become a liability. Designing OpenTelemetry with security in mind ensures you gain visibility without compromising trust or compliance.

<figure><img src="https://2617374589-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcQN1DZY6gJZPxlsQf9Re%2Fuploads%2FWSa4Qb80iFIsocISCyAv%2Fimage.png?alt=media&amp;token=a854a33d-b13b-4677-99f6-433eae629937" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://stephen-tsoi.gitbook.io/stephen-tsoi-docs/opentelemetry/from-missing-events-to-complete-visibility-tracing-enterprise-transactions-with-opentelemetry/day-23-34-security-considerations-in-opentelemetry-architecture-design.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
