-
Notifications
You must be signed in to change notification settings - Fork 872
[Examples] Simplify Docker Compose setup by using otel-lgtm Docker image #6879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Examples] Simplify Docker Compose setup by using otel-lgtm Docker image #6879
Conversation
Use grafana/otel-lgtm to simplify maintenance of Docker Compose setup for OTLP back-end and UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR simplifies the Docker Compose setup for the ASP.NET Core example by replacing the custom configuration with the grafana/otel-lgtm all-in-one Docker image. This change reduces maintenance overhead by delegating the configuration and testing of the observability stack to Grafana's team, and makes it easier to replicate this setup for other examples (such as the F# example in PR #6875).
Changes:
- Replaced five separate Docker services (otel-collector, tempo, prometheus, loki, grafana) with a single grafana/otel-lgtm container
- Removed five configuration files (otel-collector.yaml, tempo.yaml, prometheus.yaml, loki.yaml, grafana-datasources.yaml) that are no longer needed
- Updated README.md to reflect the simplified setup and improved formatting
- Removed gitignore entries for loki-data/ and tempo-data/ directories that are no longer generated
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/AspNetCore/docker-compose.yaml | Replaced multi-service configuration with single otel-lgtm image, exposing ports 3000, 4040, 4317, 4318, and 9090 |
| examples/AspNetCore/README.md | Updated documentation to reflect simplified setup, fixed formatting and grammar |
| examples/AspNetCore/otel-collector.yaml | Removed (now handled by otel-lgtm image) |
| examples/AspNetCore/tempo.yaml | Removed (now handled by otel-lgtm image) |
| examples/AspNetCore/prometheus.yaml | Removed (now handled by otel-lgtm image) |
| examples/AspNetCore/loki.yaml | Removed (now handled by otel-lgtm image) |
| examples/AspNetCore/grafana-datasources.yaml | Removed (now handled by otel-lgtm image) |
| .gitignore | Removed entries for loki-data/ and tempo-data/ directories that are no longer generated |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix typo - Comment ports - Remove unneeded 4040 port for profiles.
| - "4317" # otlp grpc | ||
| - "4318" # otlp http | ||
| # plus a UI to query logs, traces and metrics and visualize them. | ||
| otel-lgtm: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you confirm if Exemplars would continue to work? (It took me a lot of time years ago to get to a working setup! Exemplars were pretty new then. Just want to make sure we still have a working Exemplars demo here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should, yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/docs/metrics/exemplars the exemplar tutorial is here, and it uses a different setup. Probably fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test it out to verify next time I'm at a computer, but AFAIR the container image should be preconfigured to work with exemplars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - "4317" # otlp grpc | ||
| - "4318" # otlp http | ||
| # plus a UI to query logs, traces and metrics and visualize them. | ||
| otel-lgtm: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some discussions in the past about what "tool" to use... @open-telemetry/dotnet-maintainers Please confirm if you are okay with grafana/lgtm stack. (we were already using it piece by piece, so not a new thing)


Changes
Use grafana/otel-lgtm to simplify maintenance of Docker Compose setup for OTLP back-end and UI.
The team I'm part of at Grafana maintains this Docker image. The image contains the OTel Collector, Prometheus, Loki, Tempo (+ Pyroscope), so is effectively the same as the existing setup here for the ASP.NET Core example.
The advantage in switching is that it removes the need to maintain the configuration/setup here, and instead delegates the maintenance (and testing) of that image outside of this repository.
It also makes it less to duplicate for other examples (e.g. #6875).
Merge requirement checklist
Unit tests added/updatedAppropriateCHANGELOG.mdfiles updated for non-trivial changesChanges in public API reviewed (if applicable)