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

fix: add missing Registry types #626

Merged
merged 2 commits into from
Apr 16, 2024
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Enable `bun.js` by catching `NotImplemented` error (Fixes [#570](https://github.com/siimon/prom-client/issues/570))
- Add `Registry.PROMETHEUS_CONTENT_TYPE` and `Registry.OPENMETRICS_CONTENT_TYPE` constants to the TypeScript types

### Added

- Enable `bun.js` by catching `NotImplemented` error (Fixes [#570](https://github.com/siimon/prom-client/issues/570))

[unreleased]: https://github.com/siimon/prom-client/compare/v15.1.0...HEAD

## [15.1.1] - 2024-03-26
Expand Down
10 changes: 10 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ export class Registry<RegistryContentType = PrometheusContentType> {
* @param registers The registers you want to merge together
*/
static merge(registers: Registry[]): Registry;

/**
* HTTP Prometheus Content-Type for metrics response headers.
*/
static PROMETHEUS_CONTENT_TYPE: PrometheusContentType;

/**
* HTTP OpenMetrics Content-Type for metrics response headers.
*/
static OPENMETRICS_CONTENT_TYPE: OpenMetricsContentType;
}
export type Collector = () => void;

Expand Down
Loading