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

Fixes description for setToCurrentTime to seconds instead of milliseconds #585

Merged
merged 3 commits into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
avoid an unnecessarily complex regex.
- Cleanup code and refactor to be more efficient
- Correct TS types for working with OpenMetrics
- Updated Typescript and Readme docs for `setToCurrentTime()` to reflect units as seconds.

### Added

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ functions will not have the correct value for `this`.
##### Utility Functions

```js
// Set value to current time:
// Set value to current time in seconds:
gauge.setToCurrentTime();

// Record durations:
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export class Gauge<T extends string = string> {
get(): Promise<MetricObjectWithValues<MetricValue<T>>>;

/**
* Set gauge value to current epoch time in ms
* Set gauge value to current epoch time in seconds
* @param labels Object with label keys and values
*/
setToCurrentTime(labels?: LabelValues<T>): void;
Expand Down
Loading