Skip to content
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

feat: add new metric helpers for counters and gauges #80

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

wsbrunson
Copy link
Member

No description provided.

@wsbrunson wsbrunson requested review from westeezy, dtjones404 and a team February 13, 2024 00:41
README.md Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.52%. Comparing base (46d94fd) to head (25c1346).
Report is 9 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #80      +/-   ##
==========================================
+ Coverage   86.39%   87.52%   +1.12%     
==========================================
  Files           6        6              
  Lines         522      569      +47     
==========================================
+ Hits          451      498      +47     
  Misses         71       71              

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


### `$logger.metricGauge(<event>, <payload>);`

Queues a gauge metric, helper wrapping `logger.metric`

Choose a reason for hiding this comment

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

Is gauge a standard term here because I think this could use a bit more detail (I can kind of intuit what it means but it's not obvious)

Copy link
Member Author

Choose a reason for hiding this comment

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

it is, that's what its called in the OpenTelemetry library: https://opentelemetry.io/docs/specs/otel/metrics/api/#gauge

Copy link

@jshawl jshawl left a comment

Choose a reason for hiding this comment

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

🚢 🇮🇹


### Deprecated - `$logger.metric(<event>, <payload>);`

Queues a metric. We suggest using the `metricCount` or `metricGauge` interface for better type safety and clearer intention in your code.
Copy link

Choose a reason for hiding this comment

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

nice!

@wsbrunson wsbrunson merged commit 57c29db into main Feb 13, 2024
1 check passed
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.

6 participants