Skip to content

Metrics Output Plugin #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Metrics Output Plugin #213

wants to merge 17 commits into from

Conversation

kharrop
Copy link
Contributor

@kharrop kharrop commented May 7, 2025

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Release Notes

Added new metrics output LSP plugin, to use it:

service.addLSPPlugin(
    new MetricsOutput({
       fileName: "stats",
       stats: {
        complexity: extractFromDiagnostics(
          /Content complexity is (\d+)/,
          (value: string) => parseInt(value, 10),
        ),
        customStat: () => Math.random(),
      },
    })
📦 Published PR as canary version: 0.10.3--canary.213.4746

Try this version out locally by upgrading relevant packages to 0.10.3--canary.213.4746

Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 77.33333% with 34 lines in your changes missing coverage. Please review.

Project coverage is 67.74%. Comparing base (885daff) to head (4d83e8c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...nguage/metrics-output-plugin/src/metrics-output.ts 77.18% 34 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #213      +/-   ##
==========================================
+ Coverage   67.59%   67.74%   +0.15%     
==========================================
  Files          88       90       +2     
  Lines        9275     9425     +150     
  Branches     1294     1317      +23     
==========================================
+ Hits         6269     6385     +116     
- Misses       2981     3015      +34     
  Partials       25       25              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kharrop
Copy link
Contributor Author

kharrop commented May 7, 2025

/canary

@kharrop kharrop marked this pull request as ready for review May 7, 2025 16:16
@KetanReddy
Copy link
Member

Since this is a new feature I would probably call this a minor?


Determines the name of the file to write. Defaults to `metrics`.

### `rootProperties?`
Copy link
Member

Choose a reason for hiding this comment

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

Is this static metadata or can it be dynamic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intent is moreso where this data shows up (at the root level). It /should/ support whatever, theoretically.

@kharrop
Copy link
Contributor Author

kharrop commented May 27, 2025

/canary

@kharrop
Copy link
Contributor Author

kharrop commented May 28, 2025

/canary

@intuit-svc
Copy link
Collaborator

Build Info

Your PR was successfully deployed by CircleCI #4746 on Wed May 28 05:05:10 PM UTC 2025 with this version:

0.10.3--canary.213.4746

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.

3 participants