Skip to content

[BUG] claude_code.active_time.total metric is not collected when using Claude Code in the VS Code extension #57545

@liuluwei

Description

@liuluwei

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When using Claude Code through the VS Code extension with OpenTelemetry / metrics collection enabled, the claude_code.active_time.total metric is not collected or exported.

Other Claude Code metrics appear to be collected normally, but claude_code.active_time.total is missing from the exported METRICS data when the session is started from VS Code.

What Should Happen?

The metric claude_code.active_time.total should be present and should increase according to the active time spent using Claude Code in the VS Code extension

Error Messages/Logs

Steps to Reproduce

  1. Enable OpenTelemetry / metrics collection for Claude Code.
  2. Open VS Code.
  3. Use Claude Code from the VS Code extension.
  4. Run an active Claude Code session for some time.
  5. Check the exported METRICS output.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

v2.1.137

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatform:vscodeIssue specifically occurs in VS Codeplatform:windowsIssue specifically occurs on Windows

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions