o11y 252.8.0 → 252.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/o11y/client/client.js +27 -27
- package/dist/modules/o11y/client/client.js.map +1 -1
- package/dist/modules/o11y/client/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/client/version.d.ts +1 -1
- package/dist/modules/o11y/collectors/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/collectors/version.d.ts +1 -1
- package/dist/modules/o11y/core_envelope/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/core_envelope/version.d.ts +1 -1
- package/dist/modules/o11y/shared/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/shared/version.d.ts +1 -1
- package/dist/modules/o11y/simple_collector/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/simple_collector/version.d.ts +1 -1
- package/dist/modules/o11y/web_vitals/library/InstrumentationImpl.d.ts +1 -0
- package/dist/modules/o11y/web_vitals/version.d.ts +1 -1
- package/dist/modules/o11y/web_vitals/web_vitals.js.map +1 -1
- package/package.json +1 -1
|
@@ -1690,6 +1690,27 @@ class InstrumentationImpl {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
}, { op: 'domEvent' });
|
|
1692
1692
|
}
|
|
1693
|
+
_siftTags(tags) {
|
|
1694
|
+
const modTags = Object.assign({}, tags);
|
|
1695
|
+
Object.entries(modTags).forEach(([key, value]) => {
|
|
1696
|
+
if (value === null) {
|
|
1697
|
+
modTags[key] = 'null';
|
|
1698
|
+
}
|
|
1699
|
+
else if (value === '') {
|
|
1700
|
+
modTags[key] = 'empty';
|
|
1701
|
+
}
|
|
1702
|
+
else if (Number.isNaN(value)) {
|
|
1703
|
+
modTags[key] = 'NaN';
|
|
1704
|
+
}
|
|
1705
|
+
else {
|
|
1706
|
+
const type = typeof value;
|
|
1707
|
+
if (['number', 'string', 'boolean'].indexOf(type) === -1) {
|
|
1708
|
+
modTags[key] = type;
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
});
|
|
1712
|
+
return modTags;
|
|
1713
|
+
}
|
|
1693
1714
|
incrementCounter(operation, increment = 1, hasError = false, tags = {}) {
|
|
1694
1715
|
this._safety.tryCatch(() => {
|
|
1695
1716
|
utility.requireArgument(operation, 'operation', 'string');
|
|
@@ -1698,14 +1719,7 @@ class InstrumentationImpl {
|
|
|
1698
1719
|
utility.requireArgument(increment, 'increment', 'number');
|
|
1699
1720
|
utility.requireArgument(hasError, 'hasError', 'boolean');
|
|
1700
1721
|
utility.requireArgument(tags, 'tags', 'object');
|
|
1701
|
-
|
|
1702
|
-
utility.requireArgument(entry[1], `Tag value for '${entry[0]}'`, [
|
|
1703
|
-
'string',
|
|
1704
|
-
'number',
|
|
1705
|
-
'boolean'
|
|
1706
|
-
]);
|
|
1707
|
-
});
|
|
1708
|
-
this._metrics.incrementCounter(operation, increment, hasError, tags);
|
|
1722
|
+
this._metrics.incrementCounter(operation, increment, hasError, this._siftTags(tags));
|
|
1709
1723
|
}, { op: 'incrementCounter' });
|
|
1710
1724
|
}
|
|
1711
1725
|
trackValue(operation, value, hasError = false, tags = {}) {
|
|
@@ -1716,14 +1730,7 @@ class InstrumentationImpl {
|
|
|
1716
1730
|
utility.requireArgument(value, 'value', 'number');
|
|
1717
1731
|
utility.requireArgument(hasError, 'hasError', 'boolean');
|
|
1718
1732
|
utility.requireArgument(tags, 'tags', 'object');
|
|
1719
|
-
|
|
1720
|
-
utility.requireArgument(entry[1], `Tag value for '${entry[0]}'`, [
|
|
1721
|
-
'string',
|
|
1722
|
-
'number',
|
|
1723
|
-
'boolean'
|
|
1724
|
-
]);
|
|
1725
|
-
});
|
|
1726
|
-
this._metrics.trackValue(operation, value, hasError, tags);
|
|
1733
|
+
this._metrics.trackValue(operation, value, hasError, this._siftTags(tags));
|
|
1727
1734
|
}, { op: 'trackValue' });
|
|
1728
1735
|
}
|
|
1729
1736
|
bucketValue(operation, value, buckets = [], hasError = false, tags = {}) {
|
|
@@ -1733,19 +1740,12 @@ class InstrumentationImpl {
|
|
|
1733
1740
|
utility.checkForReservedCharacters(operation, 'operation', reservedMetricCharacters);
|
|
1734
1741
|
utility.requireArgument(value, 'value', 'number');
|
|
1735
1742
|
utility.requireArgument(buckets, 'buckets', Array);
|
|
1736
|
-
Object.entries(buckets).forEach((
|
|
1737
|
-
utility.requireArgument(
|
|
1743
|
+
Object.entries(buckets).forEach(([key, value]) => {
|
|
1744
|
+
utility.requireArgument(value, `Bucket value for '${key}'`, 'number');
|
|
1738
1745
|
});
|
|
1739
1746
|
utility.requireArgument(hasError, 'hasError', 'boolean');
|
|
1740
1747
|
utility.requireArgument(tags, 'tags', 'object');
|
|
1741
|
-
|
|
1742
|
-
utility.requireArgument(entry[1], `Tag value for '${entry[0]}'`, [
|
|
1743
|
-
'string',
|
|
1744
|
-
'number',
|
|
1745
|
-
'boolean'
|
|
1746
|
-
]);
|
|
1747
|
-
});
|
|
1748
|
-
this._metrics.bucketValue(operation, value, buckets, hasError, tags);
|
|
1748
|
+
this._metrics.bucketValue(operation, value, buckets, hasError, this._siftTags(tags));
|
|
1749
1749
|
}, { op: 'bucketValue' });
|
|
1750
1750
|
}
|
|
1751
1751
|
getUpCounters() {
|
|
@@ -2655,7 +2655,7 @@ class ConsoleCollector {
|
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
2657
|
|
|
2658
|
-
const version = '252.
|
|
2658
|
+
const version = '252.9.0';
|
|
2659
2659
|
|
|
2660
2660
|
const idleDetector = new IdleDetectorImpl({
|
|
2661
2661
|
logThreshold: 300,
|