@neo-one/utils
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -5,2 +5,14 @@ { | ||
{ | ||
"version": "3.2.1", | ||
"tag": "@neo-one/utils_v3.2.1", | ||
"date": "Sat, 02 Oct 2021 20:01:20 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Add metrics and tracing" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "3.2.0", | ||
@@ -7,0 +19,0 @@ "tag": "@neo-one/utils_v3.2.0", |
# Change Log - @neo-one/utils | ||
This log was last generated on Thu, 23 Sep 2021 21:28:34 GMT and should not be manually modified. | ||
This log was last generated on Sat, 02 Oct 2021 20:01:20 GMT and should not be manually modified. | ||
## 3.2.1 | ||
Sat, 02 Oct 2021 20:01:20 GMT | ||
### Patches | ||
- Add metrics and tracing | ||
## 3.2.0 | ||
@@ -6,0 +13,0 @@ Thu, 23 Sep 2021 21:28:34 GMT |
@@ -51,1 +51,12 @@ export declare enum Labels { | ||
} | ||
export declare const labelToTag: (label: string) => { | ||
name: string; | ||
}; | ||
export declare const labelsToTags: (labels: readonly string[]) => { | ||
name: string; | ||
}[]; | ||
interface Span { | ||
readonly addAttribute: (key: string, value: string | number | boolean) => void; | ||
} | ||
export declare const addAttributesToSpan: (span: Span, attributes: Record<string, string | number | boolean>) => void; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Labels = void 0; | ||
exports.addAttributesToSpan = exports.labelsToTags = exports.labelToTag = exports.Labels = void 0; | ||
var Labels; | ||
@@ -55,3 +55,12 @@ (function (Labels) { | ||
})(Labels = exports.Labels || (exports.Labels = {})); | ||
exports.labelToTag = (label) => ({ | ||
name: label.replace(/\./g, '_'), | ||
}); | ||
exports.labelsToTags = (labels) => labels.map(exports.labelToTag); | ||
exports.addAttributesToSpan = (span, attributes) => { | ||
Object.entries(attributes).forEach(([key, value]) => { | ||
span.addAttribute(key, value); | ||
}); | ||
}; | ||
//# sourceMappingURL=labels.js.map |
@@ -51,1 +51,12 @@ export declare enum Labels { | ||
} | ||
export declare const labelToTag: (label: string) => { | ||
name: string; | ||
}; | ||
export declare const labelsToTags: (labels: readonly string[]) => { | ||
name: string; | ||
}[]; | ||
interface Span { | ||
readonly addAttribute: (key: string, value: string | number | boolean) => void; | ||
} | ||
export declare const addAttributesToSpan: (span: Span, attributes: Record<string, string | number | boolean>) => void; | ||
export {}; |
@@ -52,3 +52,12 @@ export var Labels; | ||
})(Labels || (Labels = {})); | ||
export const labelToTag = (label) => ({ | ||
name: label.replace(/\./g, '_'), | ||
}); | ||
export const labelsToTags = (labels) => labels.map(labelToTag); | ||
export const addAttributesToSpan = (span, attributes) => { | ||
Object.entries(attributes).forEach(([key, value]) => { | ||
span.addAttribute(key, value); | ||
}); | ||
}; | ||
//# sourceMappingURL=labels.js.map |
{ | ||
"name": "@neo-one/utils", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "NEO•ONE shared utils.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index", |
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
115267
1743