Skip to content

Commit ed8ea55

Browse files
authored
Merge pull request #168 from MovieStoreGuy/msg/add-rulers
Include ninja entry for extension
2 parents 6613c19 + 489a68a commit ed8ea55

File tree

6 files changed

+107
-49
lines changed

6 files changed

+107
-49
lines changed

content/en/conf/opentelemetry-collector/1-installation.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ Obtain the `.deb` package for your platform from the [OpenTelemetry Collector Co
1414
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.75.0/otelcol-contrib_0.75.0_linux_amd64.deb
1515
```
1616

17-
{{%expand "🥷 Ninja: Build your own collector using _Open Telemetry Collector Builder (ocb)_"%}}
17+
***
18+
{{%expand "🥷 Ninja: Build your own collector using Open Telemetry Collector Builder (ocb)"%}}
1819
For this part we will require the following installed on your system:
1920

2021
- Golang (latest version)
2122
- ocb installed
2223
- Most recent from the [project releases](https://github.com/open-telemetry/opentelemetry-collector/releases)
23-
- Install using go by `go install go.opentelemetry.io/collector/cmd/builder@latest`
24+
- Install using go by `go install go.opentelemetry.io/collector/cmd/builder@v0.75.0`
2425
- (Optional) Docker
2526

2627
## Why build your own collector?
@@ -80,7 +81,7 @@ exporters:
8081
- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.75.0
8182
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.75.0
8283
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.75.0
83-
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.75.0
84+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.75.0
8485

8586
processors:
8687
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.75.0
@@ -119,6 +120,7 @@ Which leave you with the following directory structure:
119120

120121
1. https://opentelemetry.io/docs/collector/custom-collector/
121122
{{% /expand%}}
123+
***
122124

123125
## 2. Installing the OpenTelemetry Collector Contrib distribution
124126

@@ -204,9 +206,9 @@ cat /etc/otelcol-contrib/config.yaml
204206
extensions:
205207
health_check:
206208
pprof:
207-
endpoint: 0.0.0.0:1777
209+
endpoint: 127.0.0.1:1777
208210
zpages:
209-
endpoint: 0.0.0.0:55679
211+
endpoint: 127.0.0.1:55679
210212

211213
receivers:
212214
otlp:
@@ -223,7 +225,7 @@ receivers:
223225
- job_name: 'otel-collector'
224226
scrape_interval: 10s
225227
static_configs:
226-
- targets: ['0.0.0.0:8888']
228+
- targets: ['127.0.0.1:8888']
227229

228230
jaeger:
229231
protocols:

content/en/conf/opentelemetry-collector/2-extensions.md

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sudo vi /etc/otelcol-contrib/config.yaml
2020
```yaml {hl_lines=[3]}
2121
extensions:
2222
health_check:
23-
endpoint: 0.0.0.0:13133
23+
endpoint: "127.0.0.0:13133"
2424
```
2525
2626
{{% /tab %}}
@@ -29,11 +29,11 @@ extensions:
2929
```yaml {hl_lines=[3]}
3030
extensions:
3131
health_check:
32-
endpoint: 0.0.0.0:13133
32+
endpoint: 127.0.0.0:13133
3333
pprof:
34-
endpoint: 0.0.0.0:1777
34+
endpoint: 127.0.0.0:1777
3535
zpages:
36-
endpoint: 0.0.0.0:55679
36+
endpoint: 127.0.0.0:55679
3737

3838
receivers:
3939
otlp:
@@ -50,7 +50,7 @@ receivers:
5050
- job_name: 'otel-collector'
5151
scrape_interval: 10s
5252
static_configs:
53-
- targets: ['0.0.0.0:8888']
53+
- targets: ['127.0.0.0:8888']
5454

5555
jaeger:
5656
protocols:
@@ -94,6 +94,61 @@ Restart the collector:
9494
sudo systemctl restart otelcol-contrib
9595
```
9696

97+
***
98+
99+
{{% expand "🥷 Ninja: Improve data durability with storage extension" %}}
100+
For this, we will need to validate our distrobution has the `file_storage` extension installed,
101+
this can be down by running the command `otelcol-contrib components` and it should so something like:
102+
103+
```yaml
104+
# ... truncated for clarity
105+
extensions:
106+
- file_storage
107+
```
108+
109+
This extension provides exporters the ability to queue data to disk in the event that exporter is unable
110+
to send data to the configured endpoint.
111+
112+
In order to configure the extension, you will need to update to include the following information:
113+
114+
```yaml
115+
extensions:
116+
file_storage:
117+
directory: /tmp/otel-data
118+
timeout: 10s
119+
compaction:
120+
directory: /tmp/otel-data
121+
on_start: true
122+
on_rebound: true
123+
rebound_needed_threshold_mib: 5
124+
rebound_trigger_threshold_mib: 3
125+
126+
# ... truncated for clarity
127+
128+
service:
129+
extension:
130+
# Additiona extensions here
131+
- file_storage
132+
```
133+
134+
## Why queue data to disk?
135+
136+
This allows the collector to queue data (and even restart) to ensure data is sent
137+
the upstream provider.
138+
139+
## Considerations for queuing data to disk?
140+
141+
There is a potential that this could impact data throughput performance due disk performance.
142+
143+
#### References
144+
145+
1. https://community.splunk.com/t5/Community-Blog/Data-Persistence-in-the-OpenTelemetry-Collector/ba-p/624583
146+
1. https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/storage/filestorage
147+
148+
{{% /expand %}}
149+
150+
***
151+
97152
## Health Check
98153
99154
This extension enables an HTTP url that can be probed to check the status of the OpenTelemetry Collector. This extension can be used as a liveness and/or readiness probe on Kubernetes. To learn more about the curl command, check out the [curl man page.](https://curl.se/docs/manpage.html)
@@ -150,4 +205,5 @@ Example URL: [http://localhost:55679/debug/extensionz](http://localhost:55679/de
150205

151206
![ExtensionZ](../images/extensionz.png)
152207

153-
Now that we have reviewed extensions, lets dive into the data pipeline portion of the workshop. The data pipeline in the OpenTelemetry Collector is made up of receivers, processors, and exporters. We will first start with receivers.
208+
Now that we have reviewed extensions, lets dive into the data pipeline portion of the workshop. The data pipeline in the OpenTelemetry Collector is made up of receivers, processors, and exporters. We will first start with receivers.
209+

content/en/conf/opentelemetry-collector/3-receivers.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ receivers:
4848
```yaml {hl_lines=["9-30"]}
4949
extensions:
5050
health_check:
51-
endpoint: 0.0.0.0:13133
51+
endpoint: 127.0.0.1:13133
5252
pprof:
53-
endpoint: 0.0.0.0:1777
53+
endpoint: 127.0.0.1:1777
5454
zpages:
55-
endpoint: 0.0.0.0:55679
55+
endpoint: 127.0.0.1:55679
5656

5757
receivers:
5858
hostmetrics:
@@ -90,7 +90,7 @@ receivers:
9090
- job_name: 'otel-collector'
9191
scrape_interval: 10s
9292
static_configs:
93-
- targets: ['0.0.0.0:8888']
93+
- targets: ['127.0.0.1:8888']
9494

9595
jaeger:
9696
protocols:
@@ -142,7 +142,7 @@ prometheus/internal:
142142
- job_name: 'otel-collector'
143143
scrape_interval: 10s
144144
static_configs:
145-
- targets: ['0.0.0.0:8888']
145+
- targets: ['127.0.0.1:8888']
146146
```
147147

148148
{{% /tab %}}
@@ -151,11 +151,11 @@ prometheus/internal:
151151
```yaml {hl_lines=[39]}
152152
extensions:
153153
health_check:
154-
endpoint: 0.0.0.0:13133
154+
endpoint: 127.0.0.1:13133
155155
pprof:
156-
endpoint: 0.0.0.0:1777
156+
endpoint: 127.0.0.1:1777
157157
zpages:
158-
endpoint: 0.0.0.0:55679
158+
endpoint: 127.0.0.1:55679
159159
160160
receivers:
161161
hostmetrics:
@@ -193,7 +193,7 @@ receivers:
193193
- job_name: 'otel-collector'
194194
scrape_interval: 10s
195195
static_configs:
196-
- targets: ['0.0.0.0:8888']
196+
- targets: ['127.0.0.1:8888']
197197
198198
jaeger:
199199
protocols:

content/en/conf/opentelemetry-collector/4-processors.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ processors:
3434
``` yaml
3535
extensions:
3636
health_check:
37-
endpoint: 0.0.0.0:13133
37+
endpoint: 127.0.0.1:13133
3838
pprof:
39-
endpoint: 0.0.0.0:1777
39+
endpoint: 127.0.0.1:1777
4040
zpages:
41-
endpoint: 0.0.0.0:55679
41+
endpoint: 127.0.0.1:55679
4242

4343
receivers:
4444
hostmetrics:
@@ -76,7 +76,7 @@ receivers:
7676
- job_name: 'otel-collector'
7777
scrape_interval: 10s
7878
static_configs:
79-
- targets: ['0.0.0.0:8888']
79+
- targets: ['127.0.0.1:8888']
8080

8181
jaeger:
8282
protocols:

content/en/conf/opentelemetry-collector/6-service.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ service:
9696
``` yaml
9797
extensions:
9898
health_check:
99-
endpoint: 0.0.0.0:13133
99+
endpoint: 127.0.0.1:13133
100100
pprof:
101-
endpoint: 0.0.0.0:1777
101+
endpoint: 127.0.0.1:1777
102102
zpages:
103-
endpoint: 0.0.0.0:55679
103+
endpoint: 127.0.0.1:55679
104104

105105
receivers:
106106
hostmetrics:
@@ -138,7 +138,7 @@ receivers:
138138
- job_name: 'otel-collector'
139139
scrape_interval: 10s
140140
static_configs:
141-
- targets: ['0.0.0.0:8888']
141+
- targets: ['127.0.0.1:8888']
142142

143143
jaeger:
144144
protocols:

content/en/conf/opentelemetry-collector/_index.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ Vanilla/Contrib/Vendor
9797
extensions:
9898
health_check:
9999
pprof:
100-
endpoint: 0.0.0.0:1777
100+
endpoint: 127.0.0.1:1777
101101
zpages:
102-
endpoint: 0.0.0.0:55679
102+
endpoint: 127.0.0.1:55679
103103

104104
receivers:
105105
otlp:
@@ -116,7 +116,7 @@ receivers:
116116
- job_name: 'otel-collector'
117117
scrape_interval: 10s
118118
static_configs:
119-
- targets: ['0.0.0.0:8888']
119+
- targets: ['127.0.0.1:8888']
120120

121121
jaeger:
122122
protocols:
@@ -169,10 +169,10 @@ service:
169169

170170
extensions:
171171
health_check:
172-
endpoint: 0.0.0.0:13133
172+
endpoint: 127.0.0.1:13133
173173
http_forwarder:
174174
ingress:
175-
endpoint: 0.0.0.0:6060
175+
endpoint: 127.0.0.1:6060
176176
egress:
177177
endpoint: "${SPLUNK_API_URL}"
178178
# Use instead when sending to gateway
@@ -182,7 +182,7 @@ extensions:
182182
collectd:
183183
configDir: "${SPLUNK_COLLECTD_DIR}"
184184
zpages:
185-
#endpoint: 0.0.0.0:55679
185+
#endpoint: 127.0.0.1:55679
186186
memory_ballast:
187187
# In general, the ballast should be set to 1/3 of the collector's memory, the limit
188188
# should be 90% of the collector's memory.
@@ -211,19 +211,19 @@ receivers:
211211
jaeger:
212212
protocols:
213213
grpc:
214-
endpoint: 0.0.0.0:14250
214+
endpoint: 127.0.0.1:14250
215215
thrift_binary:
216-
endpoint: 0.0.0.0:6832
216+
endpoint: 127.0.0.1:6832
217217
thrift_compact:
218-
endpoint: 0.0.0.0:6831
218+
endpoint: 127.0.0.1:6831
219219
thrift_http:
220-
endpoint: 0.0.0.0:14268
220+
endpoint: 127.0.0.1:14268
221221
otlp:
222222
protocols:
223223
grpc:
224-
endpoint: 0.0.0.0:4317
224+
endpoint: 127.0.0.1:4317
225225
http:
226-
endpoint: 0.0.0.0:4318
226+
endpoint: 127.0.0.1:4318
227227
# This section is used to collect the OpenTelemetry Collector metrics
228228
# Even if just a Splunk APM customer, these metrics are included
229229
prometheus/internal:
@@ -232,23 +232,23 @@ receivers:
232232
- job_name: 'otel-collector'
233233
scrape_interval: 10s
234234
static_configs:
235-
- targets: ['0.0.0.0:8888']
235+
- targets: ['127.0.0.1:8888']
236236
metric_relabel_configs:
237237
- source_labels: [ __name__ ]
238238
regex: '.*grpc_io.*'
239239
action: drop
240240
smartagent/signalfx-forwarder:
241241
type: signalfx-forwarder
242-
listenAddress: 0.0.0.0:9080
242+
listenAddress: 127.0.0.1:9080
243243
smartagent/processlist:
244244
type: processlist
245245
signalfx:
246-
endpoint: 0.0.0.0:9943
246+
endpoint: 127.0.0.1:9943
247247
# Whether to preserve incoming access token and use instead of exporter token
248248
# default = false
249249
#access_token_passthrough: true
250250
zipkin:
251-
endpoint: 0.0.0.0:9411
251+
endpoint: 127.0.0.1:9411
252252

253253
processors:
254254
batch:
@@ -356,11 +356,11 @@ End goal for metrics only:
356356
```yaml
357357
extensions:
358358
health_check:
359-
endpoint: 0.0.0.0:13133
359+
endpoint: 127.0.0.1:13133
360360
pprof:
361-
endpoint: 0.0.0.0:1777
361+
endpoint: 127.0.0.1:1777
362362
zpages:
363-
endpoint: 0.0.0.0:55679
363+
endpoint: 127.0.0.1:55679
364364

365365
receivers:
366366
hostmetrics:
@@ -387,7 +387,7 @@ receivers:
387387
- job_name: 'otel-collector'
388388
scrape_interval: 10s
389389
static_configs:
390-
- targets: ['0.0.0.0:8888']
390+
- targets: ['127.0.0.1:8888']
391391

392392
processors:
393393
batch:

0 commit comments

Comments
 (0)