@opentelemetry/core
Advanced tools
Comparing version 0.16.0 to 0.16.1-alpha.10
@@ -59,3 +59,5 @@ "use strict"; | ||
_getKeyPairs(baggage) { | ||
return Object.keys(baggage).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(baggage[key].value)}`); | ||
return baggage | ||
.getAllEntries() | ||
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`); | ||
} | ||
@@ -74,3 +76,7 @@ extract(context, carrier, getter) { | ||
if (keyPair) { | ||
baggage[keyPair.key] = { value: keyPair.value }; | ||
const entry = { value: keyPair.value }; | ||
if (keyPair.metadata) { | ||
entry.metadata = keyPair.metadata; | ||
} | ||
baggage[keyPair.key] = entry; | ||
} | ||
@@ -81,3 +87,3 @@ }); | ||
} | ||
return api_1.setBaggage(context, baggage); | ||
return api_1.setBaggage(context, api_1.createBaggage(baggage)); | ||
} | ||
@@ -95,8 +101,8 @@ _parsePairKeyValue(entry) { | ||
const key = decodeURIComponent(keyPair[0].trim()); | ||
let value = decodeURIComponent(keyPair[1].trim()); | ||
const value = decodeURIComponent(keyPair[1].trim()); | ||
let metadata; | ||
if (valueProps.length > 0) { | ||
value = | ||
value + PROPERTIES_SEPARATOR + valueProps.join(PROPERTIES_SEPARATOR); | ||
metadata = api_1.baggageEntryMetadataFromString(valueProps.join(PROPERTIES_SEPARATOR)); | ||
} | ||
return { key, value }; | ||
return { key, value, metadata }; | ||
} | ||
@@ -103,0 +109,0 @@ fields() { |
@@ -1,4 +0,4 @@ | ||
import { AttributeValue, Attributes } from '@opentelemetry/api'; | ||
export declare function sanitizeAttributes(attributes: unknown): Attributes; | ||
export declare function isAttributeValue(val: unknown): val is AttributeValue; | ||
import { SpanAttributeValue, SpanAttributes } from '@opentelemetry/api'; | ||
export declare function sanitizeAttributes(attributes: unknown): SpanAttributes; | ||
export declare function isAttributeValue(val: unknown): val is SpanAttributeValue; | ||
//# sourceMappingURL=attributes.d.ts.map |
@@ -34,3 +34,3 @@ "use strict"; | ||
*/ | ||
exports.globalErrorHandler = (ex) => { | ||
const globalErrorHandler = (ex) => { | ||
try { | ||
@@ -41,2 +41,3 @@ delegateHandler(ex); | ||
}; | ||
exports.globalErrorHandler = globalErrorHandler; | ||
//# sourceMappingURL=global-error-handler.js.map |
@@ -14,3 +14,2 @@ export * from './common/attributes'; | ||
export * from './platform'; | ||
export * from './trace/NoRecordingSpan'; | ||
export * from './trace/Plugin'; | ||
@@ -17,0 +16,0 @@ export * from './trace/sampler/AlwaysOffSampler'; |
@@ -25,3 +25,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -42,3 +42,2 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./platform"), exports); | ||
__exportStar(require("./trace/NoRecordingSpan"), exports); | ||
__exportStar(require("./trace/Plugin"), exports); | ||
@@ -45,0 +44,0 @@ __exportStar(require("./trace/sampler/AlwaysOffSampler"), exports); |
@@ -25,3 +25,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -28,0 +28,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -10,3 +10,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -13,0 +13,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -25,3 +25,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -28,0 +28,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -1,2 +0,2 @@ | ||
import { Attributes, Context, Link, Sampler, SamplingResult, SpanKind } from '@opentelemetry/api'; | ||
import { SpanAttributes, Context, Link, Sampler, SamplingResult, SpanKind } from '@opentelemetry/api'; | ||
/** | ||
@@ -13,3 +13,3 @@ * A composite sampler that either respects the parent span's sampling decision | ||
constructor(config: ParentBasedSamplerConfig); | ||
shouldSample(context: Context, traceId: string, spanName: string, spanKind: SpanKind, attributes: Attributes, links: Link[]): SamplingResult; | ||
shouldSample(context: Context, traceId: string, spanName: string, spanKind: SpanKind, attributes: SpanAttributes, links: Link[]): SamplingResult; | ||
toString(): string; | ||
@@ -16,0 +16,0 @@ } |
{ | ||
"name": "@opentelemetry/core", | ||
"version": "0.16.0", | ||
"version": "0.16.1-alpha.10+cacbbdca", | ||
"description": "OpenTelemetry Core provides default and no-op implementations of the OpenTelemetry types for trace and metrics", | ||
@@ -60,3 +60,3 @@ "main": "build/src/index.js", | ||
"codecov": "3.8.1", | ||
"gts": "2.0.2", | ||
"gts": "3.1.0", | ||
"istanbul-instrumenter-loader": "3.0.1", | ||
@@ -76,3 +76,3 @@ "karma": "5.2.3", | ||
"ts-node": "9.1.1", | ||
"typescript": "3.9.7", | ||
"typescript": "4.1.3", | ||
"webpack": "4.46.0" | ||
@@ -85,3 +85,3 @@ }, | ||
}, | ||
"gitHead": "e68863f8e63854b08ad13fb54677294ac6d6b681" | ||
"gitHead": "cacbbdca0e89d31e2e0b10a8ff5fb86d7a714906" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
157756
129
2537
1