1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00

feat: node sdk with histogram

This commit is contained in:
kwasniew 2025-09-24 14:01:43 +02:00
parent e98b511bb2
commit 3d2d550fe0
No known key found for this signature in database
GPG Key ID: 43A7CBC24C119560
3 changed files with 12 additions and 6 deletions

View File

@ -129,7 +129,7 @@
"ts-toolbelt": "^9.6.0", "ts-toolbelt": "^9.6.0",
"type-is": "^2.0.0", "type-is": "^2.0.0",
"ulidx": "^2.4.1", "ulidx": "^2.4.1",
"unleash-client": "^6.7.0", "unleash-client": "^6.8.0-beta.0",
"uuid": "^11.0.0" "uuid": "^11.0.0"
}, },
"devDependencies": { "devDependencies": {

View File

@ -309,6 +309,7 @@ export interface IExternalFlagResolver {
export interface IImpactMetricsResolver { export interface IImpactMetricsResolver {
defineCounter(name: string, help: string); defineCounter(name: string, help: string);
defineGauge(name: string, help: string); defineGauge(name: string, help: string);
defineHistogram(name: string, help: string, buckets?: number[]);
incrementCounter( incrementCounter(
name: string, name: string,
value?: number, value?: number,
@ -319,4 +320,9 @@ export interface IImpactMetricsResolver {
value: number, value: number,
metricsFlagContext?: MetricFlagContext, metricsFlagContext?: MetricFlagContext,
): void; ): void;
observeHistogram(
name: string,
value: number,
metricsFlagContext?: MetricFlagContext,
): void;
} }

View File

@ -7545,9 +7545,9 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"unleash-client@npm:^6.7.0": "unleash-client@npm:^6.8.0-beta.0":
version: 6.7.0 version: 6.8.0-beta.0
resolution: "unleash-client@npm:6.7.0" resolution: "unleash-client@npm:6.8.0-beta.0"
dependencies: dependencies:
http-proxy-agent: "npm:^7.0.2" http-proxy-agent: "npm:^7.0.2"
https-proxy-agent: "npm:^7.0.5" https-proxy-agent: "npm:^7.0.5"
@ -7557,7 +7557,7 @@ __metadata:
murmurhash3js: "npm:^3.0.1" murmurhash3js: "npm:^3.0.1"
proxy-from-env: "npm:^1.1.0" proxy-from-env: "npm:^1.1.0"
semver: "npm:^7.6.2" semver: "npm:^7.6.2"
checksum: 10c0/ad7abccf855974f5af8eb40b81ae2d02f92d844e057ee9a91edc1f9ae2fd2b441e6ccbec5692274abbf5148f666432e88d33a0ddc5c4fd71a1834ae0133c0d01 checksum: 10c0/0243294dff8fcaff6932a21117211a649eed736a56be91b9854cef7fc64b91aadeffcab60e87d9951cc683b02a585a10386c0ac0e48b09b680764bcdff3934fa
languageName: node languageName: node
linkType: hard linkType: hard
@ -7674,7 +7674,7 @@ __metadata:
type-is: "npm:^2.0.0" type-is: "npm:^2.0.0"
typescript: "npm:5.8.3" typescript: "npm:5.8.3"
ulidx: "npm:^2.4.1" ulidx: "npm:^2.4.1"
unleash-client: "npm:^6.7.0" unleash-client: "npm:^6.8.0-beta.0"
uuid: "npm:^11.0.0" uuid: "npm:^11.0.0"
vite-node: "npm:^3.1.3" vite-node: "npm:^3.1.3"
vitest: "npm:^3.1.3" vitest: "npm:^3.1.3"