Skip to content

Conversation

@trevorwhitney
Copy link
Collaborator

What this PR does / why we need it:

Add a shared launch config for debugging with VS Code and like editors.

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

Copilot AI review requested due to automatic review settings December 3, 2025 18:24
@trevorwhitney trevorwhitney requested a review from a team as a code owner December 3, 2025 18:24
Copilot finished reviewing on behalf of trevorwhitney December 3, 2025 18:27
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 shared VS Code launch configuration to help developers debug Loki and its tests. The PR includes an exception to .gitignore to allow the .vscode/launch.json file to be committed to version control. Additionally, it includes an unrelated update to the benchmark configuration file, changing the query engine configuration from the nested querier.engine_v2 structure to the top-level query_engine structure.

Key changes:

  • New VS Code launch.json with debug configurations for tests, Loki application, and remote debugging
  • Updated .gitignore to allow .vscode/launch.json to be tracked
  • Configuration structure update in bench config file (unrelated to main PR purpose)

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
.vscode/launch.json New file adding VS Code debug configurations for testing, debugging Loki locally and with custom configs, attaching to processes, and remote debugging via dlv
.gitignore Added exception to allow .vscode/launch.json to be committed while ignoring other VS Code files
pkg/logql/bench/config.yaml Updated query engine configuration from nested querier.engine_v2 to top-level query_engine structure (appears unrelated to PR purpose)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +83
query_engine:
enable: true
batch_size: 8192
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This configuration change from querier.engine_v2 to query_engine appears unrelated to the PR's stated purpose of adding a VS Code launch configuration. According to the Loki configuration documentation, query_engine is a top-level configuration block, not nested under querier.

While this change appears to be a valid configuration update (moving from the deprecated nested structure to the current top-level structure), it should ideally be in a separate PR or mentioned in the PR description to clarify why it's included. This helps maintain clear change history and makes reviews easier.

Copilot uses AI. Check for mistakes.
"id": "port",
"type": "promptString",
"description": "Port to connect to",
"default": 18001
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value for the port input should be a string, not an integer. VS Code's promptString type expects string values. Change "default": 18001 to "default": "18001".

Suggested change
"default": 18001
"default": "18001"

Copilot uses AI. Check for mistakes.
@rfratto rfratto merged commit 8156f80 into main Dec 5, 2025
75 checks passed
@rfratto rfratto deleted the twhitney/vscode-launch-config branch December 5, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants