Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a local Loki + Grafana + OpenTelemetry Collector stack for centralized log collection and visualization, with optional Grafana Cloud Loki support. It wires the services into docker-compose, provides Loki and Grafana configuration, and documents how to enable/use the logging pipeline.
Changes:
- Add an OpenTelemetry Collector configuration to receive OTLP logs, enrich them with IDs and resource labels, and export them to Loki (local or Grafana Cloud).
- Add Loki and Grafana services (with provisioning for a Loki datasource and a “Collector Logs” dashboard) to
docker-compose.yml, plus data directories and ignore rules. - Extend
.env.sampleandREADME.mdwith Loki/Grafana-related environment variables and setup instructions for both local Loki and Grafana Cloud Loki.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
loki/otel-collector/config.yml |
Defines OTEL Collector pipeline for logs, adding log_id and resource labels and exporting to Loki with optional Grafana Cloud auth. |
loki/grafana/provisioning/datasources/loki.yml |
Provisions a default Grafana Loki datasource pointing at the local Loki service. |
loki/grafana/provisioning/dashboards/dashboards.yml |
Configures Grafana to load dashboards from the mounted dashboards directory. |
loki/grafana/provisioning/dashboards/collector-logs.json |
Adds a prebuilt “Collector Logs” Grafana dashboard with table and log detail panels driven by Loki queries and a log_id filter. |
loki/grafana/data/.gitkeep |
Ensures the Grafana data directory is versioned while remaining empty by default. |
loki/grafana/.gitignore |
Ignores Grafana runtime data while keeping the .gitkeep placeholder. |
loki/data/.gitkeep |
Ensures Loki’s data directory exists in the repo. |
loki/config/loki.yml |
Adds a single-node Loki configuration using filesystem storage, TSDB schema v13, WAL, and basic retention settings. |
loki/.gitignore |
Ignores Loki runtime data while keeping the .gitkeep placeholder. |
docker-compose.yml |
Adds loki, otel-collector, and grafana services, wiring configs, ports, and volumes into the existing stack. |
README.md |
Documents the new logging stack, including local Loki vs Grafana Cloud Loki setup instructions and access details for Grafana. |
.env.sample |
Introduces Loki/Grafana-related environment variables and example values for local and Grafana Cloud Loki setups. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.