Skip to content

Commit bcd9de9

Browse files
first diagrams and many copy edits
1 parent 45fb9d4 commit bcd9de9

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

site/content/learn/opentelemetry/otel-collector.md

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ weight: 5
1616

1717
## Introduction to the OpenTelemetry Collector
1818

19-
The OpenTelemetry Collector is a stand-alone service designed to collect, process, and export telemetry data such as logs, metrics, and traces. It provides a vendor-neutral way to manage this data, offering flexibility in configuration and deployment.
19+
The OpenTelemetry Collector is a stand-alone service designed to collect, process, and export telemetry data such as logs, metrics, and traces. It provides a vendor-neutral way to manage this data, offering flexibility in configuration and deployment. The collector is extremely lightweight, and can run in almost any environment without significant infrastructure overhead.
2020

2121
## Setting Up Observability with OpenTelemetry
2222

@@ -26,20 +26,26 @@ To begin, you need to instrument your code with OpenTelemetry client libraries.
2626

2727
### Data Collection and Processing
2828

29-
Once the telemetry data is generated, it can be exported directly to a backend or processed through the OpenTelemetry Collector. Using a collector helps offload the responsibility of data management from the application, making it easier to handle different data pipelines.
29+
Once the telemetry data is generated, it can be exported directly to a backend or processed through the OpenTelemetry Collector. Using a collector helps offload the responsibility of data management from the application, making it easier to handle different data pipelines. To use the collector, after setting up your first collector instance, you'll configure your application's OpenTelemetry installation to send data to your collector, generally via the OpenTelemetry protocol or OTLP.
3030

31-
## Deployment Options
31+
### Deployment Options
3232

3333
The OpenTelemetry Collector can be deployed in multiple ways:
3434

35-
- **As an agent:** Installed on individual hosts to collect host metrics like CPU, memory, and I/O metrics.
36-
- **As a standalone service:** Runs independently, receiving telemetry from multiple sources.
35+
- **As an agent:** Installed on the same host as the application reporting data. Generally one collector per application
36+
![the agent model for the Otel collector](/learn/images/otel_collector_agent_model.png)
37+
- **As a standalone service with a gateway:** Runs independently, receiving telemetry from multiple sources, possibly with a load balancer.
38+
![the gateway model for the Otel collector](/learn/images/otel_collector_agent_model.png)
39+
*There may be a load balancer between all applications and multiple collectors, but this is the simplest version*
3740

3841
In larger deployments, a combination of agents and standalone services may be employed to manage scale.
3942

40-
## OpenTelemetry Architecture
43+
### Data Storage
44+
The OpenTelemetry collector is fully stateless, it produces no dashboards and stores no data. It doesn't even create an API endpoint to get status information. The collector is only useful when transmitting data, so your OpenTelemetry data needs somewhere to go. SaaS tools like Coralogix can receive your data, or you'll need to set up your own datastore with something like Prometheus.
4145

42-
The OpenTelemetry framework is part of the Cloud Native Computing Foundation (CNCF) and aims to standardize the handling of telemetry data. It provides a consistent interface to collect and export data across many programming languages.
46+
## OpenTelemetry and the CNCF
47+
48+
The OpenTelemetry framework is part of the Cloud Native Computing Foundation (CNCF) and aims to standardize the handling of telemetry data. It provides a consistent interface to collect and export data across many programming languages. The collector is an important part of this mission, since a standardized proxy for all OpenTelemetry data helps different teams in different languages form a shared understanding of how their data is collected, processed, and transmitted.
4349

4450
### Key Functions of the OpenTelemetry Collector
4551

@@ -76,12 +82,16 @@ receivers:
7682
protocols:
7783
grpc:
7884
http:
79-
jaeger:
80-
protocols:
81-
grpc:
82-
thrift_http:
85+
prometheus:
86+
config:
87+
scrape_configs:
88+
- job_name: 'otel-collector'
89+
scrape_interval: 5s
90+
static_configs:
91+
- targets: ['0.0.0.0:8888']
8392

8493
```
94+
There are a large number of receivers for multiple formats of data coming in to an OpenTelemetry system. Note that, sadly, not all Prometheus data can be translated 1:1 into OTLP. The Prometheus receiver on Github is [currently listed as a work in progress](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/prometheusreceiver/README.md).
8595

8696
### Processors
8797

@@ -97,8 +107,8 @@ processors:
97107
queued_retry:
98108
num_workers: 4
99109
retry_on_failure: true
100-
101110
```
111+
Processors are the most diverse component within a collector, with a processor doing anything from removing sensitive data, batching data for transmission, or filtering unwanted information. These examples are all about how data will be batched, the max memory to use (after which data will be thrown out in this reporting cycle), and retries for sending data.
102112
103113
### Exporters
104114
@@ -108,24 +118,23 @@ exporters:
108118
endpoint: "localhost:9090"
109119
jaeger:
110120
endpoint: "localhost:14250"
111-
112121
```
122+
At their most basic, exporters will contain where the data is headed.
113123
114-
### Service and Pipelines
124+
### Pipelines
115125
116126
```yaml
117-
service:
118-
pipelines:
119-
traces:
120-
receivers: [jaeger, otlp]
121-
processors: [batch, memory_limiter]
122-
exporters: [jaeger]
123-
metrics:
124-
receivers: [otlp]
125-
processors: [batch]
126-
exporters: [prometheus]
127-
127+
pipelines:
128+
traces:
129+
receivers: [jaeger, otlp]
130+
processors: [batch, memory_limiter]
131+
exporters: [jaeger]
132+
metrics:
133+
receivers: [otlp]
134+
processors: [batch]
135+
exporters: [prometheus]
128136
```
137+
Pipelines a path from receiver to exporter, and any data will go through the processors listed in order, left to right.
129138
130139
## Backend Options for OpenTelemetry Metrics and Traces
131140
@@ -151,15 +160,17 @@ You don't have to use a collector to gather OpenTelemetry data. In the simplest
151160
152161
### What is the difference between the OpenTelemetry Agent and Collector?
153162
154-
The agent is deployed close to the application to collect local data, while the collector is a centralized service that gathers telemetry data from multiple agents or systems.
163+
There isn't an 'agent' as such that's part of the OpenTelemetry model. As mentioned above the collector may be deployed in an 'agent' pattern where the collector is running on the same host as the application, but the term 'agent' is a little overloaded in observibility and requires brief disambugation. The other part of observability sometimes called an 'agent' is a process running within an application that receives data on the sytem. For example, automatic instrumentation of Java applications is made possible by the standard `javaagent` jvm argument. Using an agent to observe your application will depend on your language library's implementation.
164+
165+
The collector is not an 'agent' running within an application, it runs outside your application and collects and forwards data.
155166

156167
### How does OpenTelemetry compare with Prometheus?
157168

158169
Prometheus is focused on metrics, using a pull model for data collection. OpenTelemetry, on the other hand, is a broader framework that handles logs, metrics, and traces and supports multiple backends.
159170

160171
### What is OpenTelemetry's collector-contrib?
161172

162-
The `collector-contrib` repository offers community-contributed components that extend the capabilities of the core OpenTelemetry Collector. These additions provide more receivers, processors, and exporters to handle different telemetry scenarios.
173+
The `collector-contrib` repository offers [community-contributed components](https://github.com/open-telemetry/opentelemetry-collector-contrib) that extend the capabilities of the core OpenTelemetry Collector. These additions provide more receivers, processors, and exporters to handle different telemetry scenarios.
163174

164175
## Conclusion
165176

153 KB
Loading
94.1 KB
Loading

0 commit comments

Comments
 (0)