Skip to content

Commit 6613c19

Browse files
authored
Merge pull request #167 from MovieStoreGuy/msg/add-ninja-section-1
Adding ninja section as expands to help keep with the flow of content
2 parents ba61d4b + 92371dd commit 6613c19

File tree

2 files changed

+109
-1
lines changed

2 files changed

+109
-1
lines changed

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

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,112 @@ 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)_"%}}
18+
For this part we will require the following installed on your system:
19+
20+
- Golang (latest version)
21+
- ocb installed
22+
- 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+
- (Optional) Docker
25+
26+
## Why build your own collector?
27+
28+
The default distrobutions of the collector (core and contrib) either container too much or too little in what they have to offer.
29+
It is also not advised to run the contrib collector in your production environments due to the amount of components installed
30+
which more than likely are not needed by your deployment.
31+
32+
## Benefits of building your own collector?
33+
34+
When creating your own collector binaries, (commonly referred to as distrobutions), means you build what you need.
35+
The benefits of this are:
36+
37+
1. Small binaries sizes
38+
1. Can use existing go scanners for vulnerabilites
39+
1. Include internal components that can tie in with your organisation
40+
41+
## Considerations for building your own collector?
42+
43+
Now, this would not be a 🥷 ninja zone if it didn't come with some draw backs:
44+
45+
1. Go experience is recommended if not required
46+
1. No splunk support
47+
1. Responsibiliy of distrobution and lifecycle management
48+
49+
It is important to note that project is working towards stability but it does not mean
50+
changes made will not break your workflow. The team at Splunk provide increased support
51+
and a higher level of stability so they can provide a curated experience helping you
52+
with your deployment needs.
53+
54+
## The Ninja Zone
55+
56+
Once you have all the required tools installed to get started, you will need to create a
57+
new file named `otelcol-builder.yaml` and we will follow this directory structure:
58+
59+
```
60+
.
61+
└── otelcol-builder.yaml
62+
```
63+
64+
Once we have the file created, we need to add a list of components for it to install with some additional metadata.
65+
For this example, we are going to create a builder manifest that will install only the components we need for the introduction config:
66+
```yaml
67+
dist:
68+
name: otelcol-ninja
69+
description: A custom build of the Open Telemetry Collector
70+
output_path: ./dist
71+
72+
extensions:
73+
- gomod: go.opentelemetry.io/collector/extension/ballastextension v0.75.0
74+
- gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.75.0
75+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarder v0.75.0
76+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.75.0
77+
78+
exporters:
79+
- gomod: go.opentelemetry.io/collector/exporter/loggingexporter v0.75.0
80+
- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.75.0
81+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter v0.75.0
82+
- 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+
85+
processors:
86+
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.75.0
87+
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.75.0
88+
89+
receivers:
90+
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.75.0
91+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.75.0
92+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.75.0
93+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.75.0
94+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.75.0
95+
```
96+
97+
Once the yaml file has been updated for the _ocb_, then run the following command:
98+
99+
```shell
100+
> ocb --config=otelcol-builder.yaml
101+
```
102+
103+
Which leave you with the following directory structure:
104+
105+
```
106+
├── dist
107+
│   ├── components.go
108+
│   ├── components_test.go
109+
│   ├── go.mod
110+
│   ├── go.sum
111+
│   ├── main.go
112+
│   ├── main_others.go
113+
│   ├── main_windows.go
114+
│   └── otelcol-ninja
115+
└── otelcol-builder.yaml
116+
```
117+
118+
### References:
119+
120+
1. https://opentelemetry.io/docs/collector/custom-collector/
121+
{{% /expand%}}
122+
17123
## 2. Installing the OpenTelemetry Collector Contrib distribution
18124

19125
Install the `.deb` package using `dpkg`. Not we are installing as root. Take a look at the Output tab in the box below to see what the exmple output of a successful install will look like:
@@ -163,4 +269,4 @@ Splunk does provide its own, fully supported, distribution of the OpenTelemetry
163269
164270
- The Splunk Distribution of the OpenTelemetry Collector is production tested; it is in use by a number of customers in their production environments.
165271
- Customers that use our distribution can receive direct help from official Splunk support within SLA's.
166-
- Customers can use or migrate to the Splunk Distribution of the OpenTelemetry Collector without worrying about future breaking changes to its core configuration experience for metrics and traces collection (OpenTelemetry logs collection configuration is in beta). There may be breaking changes to the Collector's own metrics.
272+
- Customers can use or migrate to the Splunk Distribution of the OpenTelemetry Collector without worrying about future breaking changes to its core configuration experience for metrics and traces collection (OpenTelemetry logs collection configuration is in beta). There may be breaking changes to the Collector's own metrics.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ alwaysopen: false
1010

1111
Adopting OpenTelemetry within your organisation can bring issues such as dealing with metric naming changes, rollout, and where to start. In this workshop, we will be focusing on using the OpenTelemetry collector and starting with the fundamentals of configuring the receivers, processors, and exporters ready to use with Splunk Cloud. The journey will take attendees from novices to being able to start adding custom components to help solve for their business observability needs for their distributed platform.
1212

13+
Throughout the workshop there will be **🥷 Ninja** sections that will be more hands on and go into further technical detail that you can explore within the workshop or in your own time. Please note that the content in these sections may go out of date due to the frequent development being made to the Open Telemetry project. Links will be provided in the event details are out of sync, please let us know if you spot something that needs updating.
14+
1315
### Target Audience
1416

1517
This talk is for developers and system administrators who are interested in learning more about architecture and deployment of the OpenTelemetry Collector.

0 commit comments

Comments
 (0)