[FEATURE] Include GitLab Merge Requests on OpenTelemetry metrics

Resolved 💬 4 comments Opened Sep 26, 2025 by gargravarr Closed Jan 10, 2026

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:

  1. Count also GitLab Merge Requests (using GitLab CLI) in claude_code.pull_request.count.
  2. Add an additional metric claude_code.merge_request.count for 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:

  1. Instrument Claude Code with:
  • OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://prometheus.example.com/opentelemetry/v1/metrics
  • OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
  • OTEL_METRICS_EXPORTER=otlp,
  1. Configure Claude Code to use glab CLI.
  2. Start Claude Code in a local repository with the remote in GitLab.
  3. Prompt some changes in the repository and prompt to crete a Merge Request.
  4. 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" />

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗