prom-client
Advanced tools
Comparing version 10.0.0 to 10.0.1
@@ -9,2 +9,3 @@ # Changelog | ||
### Added | ||
- Metrics should be initialized to 0 when there are no labels | ||
### Changed | ||
@@ -11,0 +12,0 @@ |
@@ -70,2 +70,6 @@ /** | ||
if (this.labelNames.length === 0) { | ||
this.hashMap = createValue({}, 0); | ||
} | ||
this.help = config.help; | ||
@@ -72,0 +76,0 @@ |
@@ -68,2 +68,5 @@ /** | ||
this.hashMap = {}; | ||
if (this.labelNames.length === 0) { | ||
this.hashMap = createValue({}, 0, {}); | ||
} | ||
this.help = config.help; | ||
@@ -70,0 +73,0 @@ |
@@ -82,2 +82,11 @@ /** | ||
if (this.labelNames.length === 0) { | ||
this.hashMap = { | ||
[hashObject({})]: createBaseValues( | ||
{}, | ||
Object.assign({}, this.bucketValues) | ||
) | ||
}; | ||
} | ||
config.registers.forEach(registryInstance => | ||
@@ -84,0 +93,0 @@ registryInstance.registerMetric(this) |
@@ -73,2 +73,13 @@ /** | ||
if (this.labelNames.length === 0) { | ||
this.hashMap = { | ||
[hashObject({})]: { | ||
labels: {}, | ||
td: new TDigest(), | ||
count: 0, | ||
sum: 0 | ||
} | ||
}; | ||
} | ||
config.registers.forEach(registryInstance => | ||
@@ -75,0 +86,0 @@ registryInstance.registerMetric(this) |
{ | ||
"name": "prom-client", | ||
"version": "10.0.0", | ||
"version": "10.0.1", | ||
"description": "Client for prometheus", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86091
2133