Skip to content

Commit

Permalink
src: fix type of collectDefaultMetrics.metricsList
Browse files Browse the repository at this point in the history
Fixes #583
  • Loading branch information
zbjornson committed Nov 25, 2023
1 parent 2ffd316 commit 68ae662
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ project adheres to [Semantic Versioning](http://semver.org/).

- remove unnecessary loop from `osMemoryHeapLinux`
- Improve performance of `hashObject` by using pre-sorted array of label names
- Fix type of `collectDefaultMetrics.metricsList`

### Added

Expand Down
15 changes: 5 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,18 +750,13 @@ export interface DefaultMetricsCollectorConfiguration<
labels?: Object;
}

/**
* Configure default metrics
* @param config Configuration object for default metrics collector
*/
export function collectDefaultMetrics<T extends RegistryContentType>(
config?: DefaultMetricsCollectorConfiguration<T>,
): void;

export interface defaultMetrics {
export const collectDefaultMetrics: {
/**
* All available default metrics
* Configure default metrics
* @param config Configuration object for default metrics collector
*/
<T extends RegistryContentType>(config?: DefaultMetricsCollectorConfiguration<T>): void;
/** All available default metrics */
metricsList: string[];
}

Expand Down

0 comments on commit 68ae662

Please sign in to comment.