otel-collector

command module
v0.0.0-...-aaf4c57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

README

database/sql instrumentation OpenTelemetry Collector example

This is an adapted example of https://github.com/open-telemetry/opentelemetry-go/tree/main/example/otel-collector to provide a one-stop place to play with this instrumentation and see the results visually.

A MySQL client using database/sql with instrumentation. This example shows the trace data on Jaeger and the metrics data on Prometheus server.

The complete data flow is:

                                             -----> Jaeger (trace)
MySQL client ---> OpenTelemetry Collector ---|
                                             -----> Prometheus (metrics)

These instructions expect you have Docker Compose V2 installed.

Bring up all services to run the example:

docker compose up -d

Then check the logs of client service to make ensure it is finished:

docker compose logs client

Access the Jaeger UI at http://localhost:16686 and the Prometheus UI at http://localhost:9090 to see the results.

Shut down the services when you are finished with the example:

docker compose down

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL