Skip to content

Commit dde316c

Browse files
favxlawotelbot[bot]tiffany76mx-psi
authored
fix(collector/quick-start): clarify demo scope, explain ports, improve prerequisites (#9622)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> Co-authored-by: Tiffany Hrabusa <30397949+tiffany76@users.noreply.github.com> Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
1 parent a8c4abf commit dde316c

File tree

1 file changed

+65
-56
lines changed

1 file changed

+65
-56
lines changed

content/en/docs/collector/quick-start.md

Lines changed: 65 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,108 @@
11
---
22
title: Quick start
3-
description: Setup and collect telemetry in minutes!
3+
description: Set up and collect telemetry in minutes!
44
aliases: [getting-started]
55
weight: 1
66
cSpell:ignore: docker dokey gobin okey telemetrygen
77
---
88

99
<!-- markdownlint-disable ol-prefix blanks-around-fences -->
1010

11-
The OpenTelemetry Collector receives [traces](/docs/concepts/signals/traces/),
11+
The OpenTelemetry Collector receives telemetry such as
12+
[traces](/docs/concepts/signals/traces/),
1213
[metrics](/docs/concepts/signals/metrics/), and
13-
[logs](/docs/concepts/signals/logs/), processes the telemetry, and exports it to
14-
a wide variety of observability backends using its components. For a conceptual
15-
overview of the Collector, see [Collector](/docs/collector).
14+
[logs](/docs/concepts/signals/logs/), processes it, and forwards it to one or
15+
more observability backends through its component pipeline.
1616

17-
You are going to learn to do the following in less than five minutes:
17+
> [!NOTE]
18+
>
19+
> This quick start demo creates a basic local setup. The goal is to show you how
20+
> the Collector works, not to set up a production-ready environment.
1821
19-
- Set up and run the OpenTelemetry Collector.
20-
- Send telemetry and see it processed by the Collector.
22+
In this guide, you will:
23+
24+
- Start a local instance of the OpenTelemetry Collector
25+
- Generate trace data and send it to the Collector
26+
- Check that the Collector receives and processes the data
27+
28+
By the end, you will have a simple pipeline running on your machine and a
29+
clearer idea of how the Collector fits into an observability stack. If you want
30+
more context before getting started, see the [Collector](/docs/collector)
31+
overview.
2132

2233
## Prerequisites
2334

24-
Make sure that your developer environment has the following. This page assumes
25-
that you're using `bash`. Adapt configuration and commands as necessary for your
26-
preferred shell.
35+
Before you begin, make sure your environment has the following tools installed:
36+
37+
- [Docker](https://www.docker.com/) or any compatible container runtime — used
38+
to run the Collector
39+
- [Go](https://go.dev/), one of the latest two minor versions — used to install
40+
the telemetry generator
41+
- [`GOBIN` environment variable][gobin] set — ensures installed Go binaries are
42+
available in your PATH[^1]
2743

28-
- [Docker](https://www.docker.com/) or any compatible containers' runtime.
29-
- [Go](https://go.dev/) 1.20 or higher
30-
- [`GOBIN` environment variable][gobin] is set; if unset, initialize it
31-
appropriately, for example[^1]:
32-
```sh
33-
export GOBIN=${GOBIN:-$(go env GOPATH)/bin}
34-
```
44+
If `GOBIN` isn't set, run:
45+
46+
```sh
47+
export GOBIN=${GOBIN:-$(go env GOPATH)/bin}
48+
```
49+
50+
This guide uses `bash` commands. If you're using a different shell, you might
51+
need to adjust the command syntax.
3552

3653
[^1]:
3754
For more information, see
3855
[Your first program](https://go.dev/doc/code#Command).
3956

4057
## Set up the environment
4158

42-
1. Pull in the OpenTelemetry Collector core Docker image:
59+
1. Pull the Docker image of the OpenTelemetry Collector core
60+
[distribution](/docs/collector/distributions/):
4361

4462
```sh
4563
docker pull otel/opentelemetry-collector:{{% param vers %}}
4664
```
4765

48-
2. Install the [telemetrygen][] utility:
66+
2. Install [telemetrygen][], which we'll use to simulate a client that generates
67+
telemetry:
4968

5069
```sh
5170
go install github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen@latest
5271
```
5372

54-
This utility can simulate a client generating [traces][], [metrics][], and
55-
[logs][].
56-
5773
## Generate and collect telemetry
5874

59-
3. Launch the Collector, listening on ports 4317 (for OTLP gRPC), 4318 (for OTLP
60-
HTTP) and 55679 (for ZPages):
75+
3. Start the Collector:
6176

6277
```sh
6378
docker run \
6479
-p 127.0.0.1:4317:4317 \
6580
-p 127.0.0.1:4318:4318 \
6681
-p 127.0.0.1:55679:55679 \
6782
otel/opentelemetry-collector:{{% param vers %}} \
68-
2>&1 | tee collector-output.txt # Optionally tee output for easier search later
83+
2>&1 | tee collector-output.txt
6984
```
7085

71-
4. In a separate terminal window, generate a few sample traces:
86+
The previous command runs the Collector locally and opens three ports:
87+
- `4317` — OTLP over gRPC, the default for most SDKs
88+
- `4318` — OTLP over HTTP, for clients that don't support gRPC
89+
- `55679` — ZPages, a built-in debug UI you can open in the browser
90+
91+
4. In a separate terminal, generate some traces:
7292

7393
```sh
7494
$GOBIN/telemetrygen traces --otlp-insecure --traces 3
7595
```
7696

77-
Among the output generated by the utility, you should see a confirmation that
78-
traces were generated:
97+
You see output confirming the traces were sent:
7998

8099
```text
81100
2024-01-16T14:33:15.692-0500 INFO traces/worker.go:99 traces generated {"worker": 0, "traces": 3}
82101
2024-01-16T14:33:15.692-0500 INFO traces/traces.go:58 stop the batch span processor
83102
```
84103

85-
For an easier time seeing relevant output you can filter it:
86-
87-
```sh
88-
$GOBIN/telemetrygen traces --otlp-insecure \
89-
--traces 3 2>&1 | grep -E 'start|traces|stop'
90-
```
91-
92-
5. In the terminal window running the Collector container, you should see trace
93-
ingest activity similar to what is shown in the following example:
104+
5. Back in the Collector terminal, you should see trace ingest activity similar
105+
to the following:
94106

95107
```console
96108
$ grep -E '^Span|(ID|Name|Kind|time|Status \w+)\s+:' ./collector-output.txt
@@ -117,30 +129,27 @@ preferred shell.
117129
...
118130
```
119131

120-
6. Open <http://localhost:55679/debug/tracez> and select one of the samples in
121-
the table to see the traces you've just generated.
132+
6. To explore the traces visually, open <http://localhost:55679/debug/tracez> in
133+
your browser and select one of the traces from the table.
122134

123-
7. After you are done, shutdown the Collector container, for example, using
124-
<kbd>Control-C</kbd>.
135+
7. Press <kbd>Control-C</kbd> to stop the Collector.
125136

126137
## Next steps
127138

128-
In this tutorial you've started the OpenTelemetry Collector and sent telemetry
129-
to it. As next steps, consider doing the following:
139+
At this point, you've run the Collector locally and seen how it handles
140+
telemetry end to end. From here, you can start learning how it's used in real
141+
setups:
130142

131-
- Explore different ways to [install the Collector](/docs/collector/install/).
132-
- Learn about the different modes of the Collector in
133-
[Deployment Methods](/docs/collector/deploy/).
134-
- Familiarize yourself with the Collector
135-
[configuration](/docs/collector/configuration) files and structure.
136-
- Explore available components in the
137-
[registry](/ecosystem/registry/?language=collector).
138-
- Learn how to
139-
[build a custom Collector with the OpenTelemetry Collector Builder (OCB)](/docs/collector/extend/ocb/).
143+
- [Configuration](/docs/collector/configuration): Learn how the Collector's
144+
config file works and how to connect it to a real backend like Jaeger or
145+
Prometheus.
146+
- [Deployment patterns](/docs/collector/deploy/): Understand the difference
147+
between running the Collector as an agent versus a gateway.
148+
- [Install the Collector](/docs/collector/install/): Explore installation
149+
options beyond Docker, including binaries and Kubernetes.
150+
- [Component registry](/ecosystem/registry/?language=collector): Browse
151+
available receivers, processors, and exporters to extend your pipeline.
140152

141153
[gobin]: https://pkg.go.dev/cmd/go#hdr-Environment_variables
142-
[logs]: /docs/concepts/signals/logs/
143-
[metrics]: /docs/concepts/signals/metrics/
144154
[telemetrygen]:
145155
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/telemetrygen
146-
[traces]: /docs/concepts/signals/traces/

0 commit comments

Comments
 (0)