1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-03 22:52:30 +02:00
opentelemetry-go/example/otel-collector
renovate[bot] 6c495ea870
chore(deps): update google.golang.org/genproto/googleapis/rpc digest to 573a115 (#5698)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[google.golang.org/genproto/googleapis/rpc](https://togithub.com/googleapis/go-genproto)
| indirect | digest | `2c9e96a` -> `573a115` |
|
[google.golang.org/genproto/googleapis/rpc](https://togithub.com/googleapis/go-genproto)
| require | digest | `2c9e96a` -> `573a115` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-go).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-08 16:43:41 -07:00
..
docker-compose.yaml chore(deps): update jaegertracing/all-in-one docker tag to v1.60 (#5675) 2024-08-06 19:34:47 -07:00
go.mod chore(deps): update google.golang.org/genproto/googleapis/rpc digest to 573a115 (#5698) 2024-08-08 16:43:41 -07:00
go.sum chore(deps): update google.golang.org/genproto/googleapis/rpc digest to 573a115 (#5698) 2024-08-08 16:43:41 -07:00
main.go Update example instrumentation names (#5612) 2024-07-12 11:53:18 -07:00
otel-collector.yaml Use docker compose in otel collector example (#5244) 2024-05-02 07:44:54 -07:00
prometheus.yaml Use docker compose in otel collector example (#5244) 2024-05-02 07:44:54 -07:00
README.md [chore] example/otel-collector: Fix README title (#5404) 2024-05-22 15:23:37 +02:00

OpenTelemetry Collector Example

This example illustrates how to export trace and metric data from the OpenTelemetry-Go SDK to the OpenTelemetry Collector. From there, we bring the trace data to Jaeger and the metric data to Prometheus The complete flow is:

                                          -----> Jaeger (trace)
App + SDK ---> OpenTelemetry Collector ---|
                                          -----> Prometheus (metrics)

Prerequisites

You will need Docker Compose V2 installed for this demo.

Deploying to docker compose

This command will bring up the OpenTelemetry Collector, Jaeger, and Prometheus, and expose the necessary ports for you to view the data.

docker compose up -d

Running the code

You can find the complete code for this example in the main.go file. To run it, ensure you have a somewhat recent version of Go (preferably >= 1.13) and do

go run main.go

The example simulates an application, hard at work, computing for ten seconds then finishing.

Viewing instrumentation data

Now the exciting part! Let's check out the telemetry data generated by our sample application

Jaeger UI

The Jaeger UI is available at http://localhost:16686. Navigate there in your favorite web-browser to view the generated traces.

Prometheus

The Prometheus UI is available at http://localhost:9090. Navigate there in your favorite web-browser to view the generated metrics, for instance, testapp_run_total.

Shutting down

To shut down and clean the example, run

docker compose down