[FEATURE] Include GitLab Merge Requests on OpenTelemetry metrics
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When configured, Claude Code pushes OTel metrics, including claude_code.pull_request.count (see docs).
Unfortunately, this metric only accounts for GitHub Pull Requests (using the GitHub CLI gh), and not for GitLab Merge Requests, which is the Source Control Manager I use in my company.
Proposed Solution
I propose either:
- Count also GitLab Merge Requests (using GitLab CLI) in
claude_code.pull_request.count. - Add an additional metric
claude_code.merge_request.countfor GitLab Merge Requests using the GitLab CLI.
With one of the above options instrumented, all Claude Code users using GitLab could also benefit from this OTel metric, both for the public gitlab.com and self-hosted GitLab instances.
Alternative Solutions
Unfortunately I couldn't find any useful workaround for this issue.
Priority
High - Significant impact on productivity
Feature Category
Other
Use Case Example
Example scenario:
- Instrument Claude Code with:
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://prometheus.example.com/opentelemetry/v1/metricsOTEL_EXPORTER_OTLP_PROTOCOL=http/protobufOTEL_METRICS_EXPORTER=otlp,
- Configure Claude Code to use
glabCLI. - Start Claude Code in a local repository with the remote in GitLab.
- Prompt some changes in the repository and prompt to crete a Merge Request.
- Verify that Claude code increments
claude_code.merge_request.count.
Additional Context
With this feature implemented, a user could create a chart like the one below:
<img width="370" height="394" alt="Image" src="https://github.com/user-attachments/assets/0ed61ec7-1817-4a5f-97b4-3ffcf2297750" />
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗