Skip to content

Prepare otel-collector and grafana with loki#51

Merged
n0str merged 2 commits intomasterfrom
loki-grafana
Feb 4, 2026
Merged

Prepare otel-collector and grafana with loki#51
n0str merged 2 commits intomasterfrom
loki-grafana

Conversation

@n0str
Copy link
Member

@n0str n0str commented Jan 30, 2026

No description provided.

Copy link
Contributor

Copilot AI left a 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 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.sample and README.md with 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>
@n0str n0str requested a review from slaveeks January 30, 2026 12:40
@n0str n0str merged commit 6d765af into master Feb 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants