@opentelemetry/otlp-transformer
Advanced tools
Comparing version 0.34.0 to 0.35.0
@@ -42,6 +42,10 @@ var __read = (this && this.__read) || function (o, n) { | ||
if (t === 'object' && value != null) | ||
return { kvlistValue: { values: Object.entries(value).map(function (_a) { | ||
return { | ||
kvlistValue: { | ||
values: Object.entries(value).map(function (_a) { | ||
var _b = __read(_a, 2), k = _b[0], v = _b[1]; | ||
return toKeyValue(k, v); | ||
}) } }; | ||
}), | ||
}, | ||
}; | ||
return {}; | ||
@@ -48,0 +52,0 @@ } |
@@ -18,9 +18,9 @@ /** Properties of an InstrumentationScope. */ | ||
/** AnyValue stringValue */ | ||
stringValue?: (string | null); | ||
stringValue?: string | null; | ||
/** AnyValue boolValue */ | ||
boolValue?: (boolean | null); | ||
boolValue?: boolean | null; | ||
/** AnyValue intValue */ | ||
intValue?: (number | null); | ||
intValue?: number | null; | ||
/** AnyValue doubleValue */ | ||
doubleValue?: (number | null); | ||
doubleValue?: number | null; | ||
/** AnyValue arrayValue */ | ||
@@ -27,0 +27,0 @@ arrayValue?: IArrayValue; |
import { toResourceMetrics } from './internal'; | ||
export function createExportMetricsServiceRequest(resourceMetrics) { | ||
return { | ||
resourceMetrics: resourceMetrics.map(function (metrics) { return toResourceMetrics(metrics); }) | ||
resourceMetrics: resourceMetrics.map(function (metrics) { return toResourceMetrics(metrics); }), | ||
}; | ||
} | ||
//# sourceMappingURL=index.js.map |
@@ -18,3 +18,3 @@ /* | ||
import { hrTimeToNanoseconds } from '@opentelemetry/core'; | ||
import { AggregationTemporality, DataPointType } from '@opentelemetry/sdk-metrics'; | ||
import { AggregationTemporality, DataPointType, } from '@opentelemetry/sdk-metrics'; | ||
import { toAttributes } from '../common/internal'; | ||
@@ -25,6 +25,6 @@ export function toResourceMetrics(resourceMetrics) { | ||
attributes: toAttributes(resourceMetrics.resource.attributes), | ||
droppedAttributesCount: 0 | ||
droppedAttributesCount: 0, | ||
}, | ||
schemaUrl: undefined, | ||
scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics) | ||
scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics), | ||
}; | ||
@@ -40,3 +40,3 @@ } | ||
metrics: metrics.metrics.map(function (metricData) { return toMetric(metricData); }), | ||
schemaUrl: metrics.scope.schemaUrl | ||
schemaUrl: metrics.scope.schemaUrl, | ||
}; | ||
@@ -57,3 +57,3 @@ return scopeMetrics; | ||
isMonotonic: metricData.isMonotonic, | ||
dataPoints: toSingularDataPoints(metricData) | ||
dataPoints: toSingularDataPoints(metricData), | ||
}; | ||
@@ -64,3 +64,3 @@ } | ||
out.gauge = { | ||
dataPoints: toSingularDataPoints(metricData) | ||
dataPoints: toSingularDataPoints(metricData), | ||
}; | ||
@@ -71,3 +71,3 @@ } | ||
aggregationTemporality: aggregationTemporality, | ||
dataPoints: toHistogramDataPoints(metricData) | ||
dataPoints: toHistogramDataPoints(metricData), | ||
}; | ||
@@ -74,0 +74,0 @@ } |
@@ -57,3 +57,3 @@ import { IInstrumentationScope, IKeyValue } from '../common/types'; | ||
/** Sum isMonotonic */ | ||
isMonotonic?: (boolean | null); | ||
isMonotonic?: boolean | null; | ||
} | ||
@@ -88,3 +88,3 @@ /** Properties of a Histogram. */ | ||
/** NumberDataPoint asDouble */ | ||
asDouble?: (number | null); | ||
asDouble?: number | null; | ||
/** NumberDataPoint asInt */ | ||
@@ -91,0 +91,0 @@ asInt?: number; |
@@ -32,3 +32,3 @@ var __values = (this && this.__values) || function(o) { | ||
return { | ||
resourceSpans: spanRecordsToResourceSpans(spans, useHex) | ||
resourceSpans: spanRecordsToResourceSpans(spans, useHex), | ||
}; | ||
@@ -80,7 +80,9 @@ } | ||
var _b = scopeSpans[0].instrumentationLibrary, name_1 = _b.name, version = _b.version, schemaUrl = _b.schemaUrl; | ||
var spans = scopeSpans.map(function (readableSpan) { return sdkSpanToOtlpSpan(readableSpan, useHex); }); | ||
var spans = scopeSpans.map(function (readableSpan) { | ||
return sdkSpanToOtlpSpan(readableSpan, useHex); | ||
}); | ||
scopeResourceSpans.push({ | ||
scope: { name: name_1, version: version }, | ||
spans: spans, | ||
schemaUrl: schemaUrl | ||
schemaUrl: schemaUrl, | ||
}); | ||
@@ -97,3 +99,3 @@ } | ||
scopeSpans: scopeResourceSpans, | ||
schemaUrl: undefined | ||
schemaUrl: undefined, | ||
}; | ||
@@ -100,0 +102,0 @@ out.push(transformedSpans); |
@@ -7,3 +7,7 @@ import { hrTimeToNanoseconds } from '@opentelemetry/core'; | ||
var status = span.status; | ||
var parentSpanId = useHex ? span.parentSpanId : span.parentSpanId != null ? core.hexToBase64(span.parentSpanId) : undefined; | ||
var parentSpanId = useHex | ||
? span.parentSpanId | ||
: span.parentSpanId != null | ||
? core.hexToBase64(span.parentSpanId) | ||
: undefined; | ||
return { | ||
@@ -34,4 +38,8 @@ traceId: useHex ? ctx.traceId : core.hexToBase64(ctx.traceId), | ||
attributes: link.attributes ? toAttributes(link.attributes) : [], | ||
spanId: useHex ? link.context.spanId : core.hexToBase64(link.context.spanId), | ||
traceId: useHex ? link.context.traceId : core.hexToBase64(link.context.traceId), | ||
spanId: useHex | ||
? link.context.spanId | ||
: core.hexToBase64(link.context.spanId), | ||
traceId: useHex | ||
? link.context.traceId | ||
: core.hexToBase64(link.context.traceId), | ||
droppedAttributesCount: 0, | ||
@@ -42,3 +50,5 @@ }; | ||
return { | ||
attributes: timedEvent.attributes ? toAttributes(timedEvent.attributes) : [], | ||
attributes: timedEvent.attributes | ||
? toAttributes(timedEvent.attributes) | ||
: [], | ||
name: timedEvent.name, | ||
@@ -45,0 +55,0 @@ timeUnixNano: hrTimeToNanoseconds(timedEvent.time), |
@@ -24,3 +24,3 @@ import { IInstrumentationScope, IKeyValue } from '../common/types'; | ||
/** IScopeSpans schemaUrl */ | ||
schemaUrl?: (string | null); | ||
schemaUrl?: string | null; | ||
} | ||
@@ -34,3 +34,3 @@ /** Properties of a Span. */ | ||
/** Span traceState */ | ||
traceState?: (string | null); | ||
traceState?: string | null; | ||
/** Span parentSpanId */ | ||
@@ -69,22 +69,22 @@ parentSpanId?: string; | ||
/** Indicates that the span represents an internal operation within an application, | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
SPAN_KIND_INTERNAL = 1, | ||
/** Indicates that the span covers server-side handling of an RPC or other | ||
* remote network request. | ||
*/ | ||
* remote network request. | ||
*/ | ||
SPAN_KIND_SERVER = 2, | ||
/** Indicates that the span describes a request to some remote service. | ||
*/ | ||
*/ | ||
SPAN_KIND_CLIENT = 3, | ||
/** Indicates that the span describes a producer sending a message to a broker. | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
SPAN_KIND_PRODUCER = 4, | ||
/** Indicates that the span describes consumer receiving a message from a broker. | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
SPAN_KIND_CONSUMER = 5 | ||
@@ -91,0 +91,0 @@ } |
@@ -25,24 +25,24 @@ /* | ||
/** Indicates that the span represents an internal operation within an application, | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_INTERNAL"] = 1] = "SPAN_KIND_INTERNAL"; | ||
/** Indicates that the span covers server-side handling of an RPC or other | ||
* remote network request. | ||
*/ | ||
* remote network request. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_SERVER"] = 2] = "SPAN_KIND_SERVER"; | ||
/** Indicates that the span describes a request to some remote service. | ||
*/ | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_CLIENT"] = 3] = "SPAN_KIND_CLIENT"; | ||
/** Indicates that the span describes a producer sending a message to a broker. | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_PRODUCER"] = 4] = "SPAN_KIND_PRODUCER"; | ||
/** Indicates that the span describes consumer receiving a message from a broker. | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_CONSUMER"] = 5] = "SPAN_KIND_CONSUMER"; | ||
})(ESpanKind || (ESpanKind = {})); | ||
//# sourceMappingURL=types.js.map |
@@ -26,3 +26,7 @@ export function toAttributes(attributes) { | ||
if (t === 'object' && value != null) | ||
return { kvlistValue: { values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)) } }; | ||
return { | ||
kvlistValue: { | ||
values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)), | ||
}, | ||
}; | ||
return {}; | ||
@@ -29,0 +33,0 @@ } |
@@ -18,9 +18,9 @@ /** Properties of an InstrumentationScope. */ | ||
/** AnyValue stringValue */ | ||
stringValue?: (string | null); | ||
stringValue?: string | null; | ||
/** AnyValue boolValue */ | ||
boolValue?: (boolean | null); | ||
boolValue?: boolean | null; | ||
/** AnyValue intValue */ | ||
intValue?: (number | null); | ||
intValue?: number | null; | ||
/** AnyValue doubleValue */ | ||
doubleValue?: (number | null); | ||
doubleValue?: number | null; | ||
/** AnyValue arrayValue */ | ||
@@ -27,0 +27,0 @@ arrayValue?: IArrayValue; |
import { toResourceMetrics } from './internal'; | ||
export function createExportMetricsServiceRequest(resourceMetrics) { | ||
return { | ||
resourceMetrics: resourceMetrics.map(metrics => toResourceMetrics(metrics)) | ||
resourceMetrics: resourceMetrics.map(metrics => toResourceMetrics(metrics)), | ||
}; | ||
} | ||
//# sourceMappingURL=index.js.map |
@@ -18,3 +18,3 @@ /* | ||
import { hrTimeToNanoseconds } from '@opentelemetry/core'; | ||
import { AggregationTemporality, DataPointType } from '@opentelemetry/sdk-metrics'; | ||
import { AggregationTemporality, DataPointType, } from '@opentelemetry/sdk-metrics'; | ||
import { toAttributes } from '../common/internal'; | ||
@@ -25,6 +25,6 @@ export function toResourceMetrics(resourceMetrics) { | ||
attributes: toAttributes(resourceMetrics.resource.attributes), | ||
droppedAttributesCount: 0 | ||
droppedAttributesCount: 0, | ||
}, | ||
schemaUrl: undefined, | ||
scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics) | ||
scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics), | ||
}; | ||
@@ -40,3 +40,3 @@ } | ||
metrics: metrics.metrics.map(metricData => toMetric(metricData)), | ||
schemaUrl: metrics.scope.schemaUrl | ||
schemaUrl: metrics.scope.schemaUrl, | ||
}; | ||
@@ -57,3 +57,3 @@ return scopeMetrics; | ||
isMonotonic: metricData.isMonotonic, | ||
dataPoints: toSingularDataPoints(metricData) | ||
dataPoints: toSingularDataPoints(metricData), | ||
}; | ||
@@ -64,3 +64,3 @@ } | ||
out.gauge = { | ||
dataPoints: toSingularDataPoints(metricData) | ||
dataPoints: toSingularDataPoints(metricData), | ||
}; | ||
@@ -71,3 +71,3 @@ } | ||
aggregationTemporality, | ||
dataPoints: toHistogramDataPoints(metricData) | ||
dataPoints: toHistogramDataPoints(metricData), | ||
}; | ||
@@ -74,0 +74,0 @@ } |
@@ -57,3 +57,3 @@ import { IInstrumentationScope, IKeyValue } from '../common/types'; | ||
/** Sum isMonotonic */ | ||
isMonotonic?: (boolean | null); | ||
isMonotonic?: boolean | null; | ||
} | ||
@@ -88,3 +88,3 @@ /** Properties of a Histogram. */ | ||
/** NumberDataPoint asDouble */ | ||
asDouble?: (number | null); | ||
asDouble?: number | null; | ||
/** NumberDataPoint asInt */ | ||
@@ -91,0 +91,0 @@ asInt?: number; |
@@ -5,3 +5,3 @@ import { toAttributes } from '../common/internal'; | ||
return { | ||
resourceSpans: spanRecordsToResourceSpans(spans, useHex) | ||
resourceSpans: spanRecordsToResourceSpans(spans, useHex), | ||
}; | ||
@@ -46,3 +46,3 @@ } | ||
spans: spans, | ||
schemaUrl: schemaUrl | ||
schemaUrl: schemaUrl, | ||
}); | ||
@@ -59,3 +59,3 @@ } | ||
scopeSpans: scopeResourceSpans, | ||
schemaUrl: undefined | ||
schemaUrl: undefined, | ||
}; | ||
@@ -62,0 +62,0 @@ out.push(transformedSpans); |
@@ -7,3 +7,7 @@ import { hrTimeToNanoseconds } from '@opentelemetry/core'; | ||
const status = span.status; | ||
const parentSpanId = useHex ? span.parentSpanId : span.parentSpanId != null ? core.hexToBase64(span.parentSpanId) : undefined; | ||
const parentSpanId = useHex | ||
? span.parentSpanId | ||
: span.parentSpanId != null | ||
? core.hexToBase64(span.parentSpanId) | ||
: undefined; | ||
return { | ||
@@ -34,4 +38,8 @@ traceId: useHex ? ctx.traceId : core.hexToBase64(ctx.traceId), | ||
attributes: link.attributes ? toAttributes(link.attributes) : [], | ||
spanId: useHex ? link.context.spanId : core.hexToBase64(link.context.spanId), | ||
traceId: useHex ? link.context.traceId : core.hexToBase64(link.context.traceId), | ||
spanId: useHex | ||
? link.context.spanId | ||
: core.hexToBase64(link.context.spanId), | ||
traceId: useHex | ||
? link.context.traceId | ||
: core.hexToBase64(link.context.traceId), | ||
droppedAttributesCount: 0, | ||
@@ -42,3 +50,5 @@ }; | ||
return { | ||
attributes: timedEvent.attributes ? toAttributes(timedEvent.attributes) : [], | ||
attributes: timedEvent.attributes | ||
? toAttributes(timedEvent.attributes) | ||
: [], | ||
name: timedEvent.name, | ||
@@ -45,0 +55,0 @@ timeUnixNano: hrTimeToNanoseconds(timedEvent.time), |
@@ -24,3 +24,3 @@ import { IInstrumentationScope, IKeyValue } from '../common/types'; | ||
/** IScopeSpans schemaUrl */ | ||
schemaUrl?: (string | null); | ||
schemaUrl?: string | null; | ||
} | ||
@@ -34,3 +34,3 @@ /** Properties of a Span. */ | ||
/** Span traceState */ | ||
traceState?: (string | null); | ||
traceState?: string | null; | ||
/** Span parentSpanId */ | ||
@@ -69,22 +69,22 @@ parentSpanId?: string; | ||
/** Indicates that the span represents an internal operation within an application, | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
SPAN_KIND_INTERNAL = 1, | ||
/** Indicates that the span covers server-side handling of an RPC or other | ||
* remote network request. | ||
*/ | ||
* remote network request. | ||
*/ | ||
SPAN_KIND_SERVER = 2, | ||
/** Indicates that the span describes a request to some remote service. | ||
*/ | ||
*/ | ||
SPAN_KIND_CLIENT = 3, | ||
/** Indicates that the span describes a producer sending a message to a broker. | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
SPAN_KIND_PRODUCER = 4, | ||
/** Indicates that the span describes consumer receiving a message from a broker. | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
SPAN_KIND_CONSUMER = 5 | ||
@@ -91,0 +91,0 @@ } |
@@ -25,24 +25,24 @@ /* | ||
/** Indicates that the span represents an internal operation within an application, | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_INTERNAL"] = 1] = "SPAN_KIND_INTERNAL"; | ||
/** Indicates that the span covers server-side handling of an RPC or other | ||
* remote network request. | ||
*/ | ||
* remote network request. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_SERVER"] = 2] = "SPAN_KIND_SERVER"; | ||
/** Indicates that the span describes a request to some remote service. | ||
*/ | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_CLIENT"] = 3] = "SPAN_KIND_CLIENT"; | ||
/** Indicates that the span describes a producer sending a message to a broker. | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_PRODUCER"] = 4] = "SPAN_KIND_PRODUCER"; | ||
/** Indicates that the span describes consumer receiving a message from a broker. | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_CONSUMER"] = 5] = "SPAN_KIND_CONSUMER"; | ||
})(ESpanKind || (ESpanKind = {})); | ||
//# sourceMappingURL=types.js.map |
@@ -31,3 +31,7 @@ "use strict"; | ||
if (t === 'object' && value != null) | ||
return { kvlistValue: { values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)) } }; | ||
return { | ||
kvlistValue: { | ||
values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)), | ||
}, | ||
}; | ||
return {}; | ||
@@ -34,0 +38,0 @@ } |
@@ -18,9 +18,9 @@ /** Properties of an InstrumentationScope. */ | ||
/** AnyValue stringValue */ | ||
stringValue?: (string | null); | ||
stringValue?: string | null; | ||
/** AnyValue boolValue */ | ||
boolValue?: (boolean | null); | ||
boolValue?: boolean | null; | ||
/** AnyValue intValue */ | ||
intValue?: (number | null); | ||
intValue?: number | null; | ||
/** AnyValue doubleValue */ | ||
doubleValue?: (number | null); | ||
doubleValue?: number | null; | ||
/** AnyValue arrayValue */ | ||
@@ -27,0 +27,0 @@ arrayValue?: IArrayValue; |
@@ -7,3 +7,3 @@ "use strict"; | ||
return { | ||
resourceMetrics: resourceMetrics.map(metrics => (0, internal_1.toResourceMetrics)(metrics)) | ||
resourceMetrics: resourceMetrics.map(metrics => (0, internal_1.toResourceMetrics)(metrics)), | ||
}; | ||
@@ -10,0 +10,0 @@ } |
@@ -27,6 +27,6 @@ "use strict"; | ||
attributes: (0, internal_1.toAttributes)(resourceMetrics.resource.attributes), | ||
droppedAttributesCount: 0 | ||
droppedAttributesCount: 0, | ||
}, | ||
schemaUrl: undefined, | ||
scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics) | ||
scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics), | ||
}; | ||
@@ -43,3 +43,3 @@ } | ||
metrics: metrics.metrics.map(metricData => toMetric(metricData)), | ||
schemaUrl: metrics.scope.schemaUrl | ||
schemaUrl: metrics.scope.schemaUrl, | ||
}; | ||
@@ -61,3 +61,3 @@ return scopeMetrics; | ||
isMonotonic: metricData.isMonotonic, | ||
dataPoints: toSingularDataPoints(metricData) | ||
dataPoints: toSingularDataPoints(metricData), | ||
}; | ||
@@ -68,3 +68,3 @@ } | ||
out.gauge = { | ||
dataPoints: toSingularDataPoints(metricData) | ||
dataPoints: toSingularDataPoints(metricData), | ||
}; | ||
@@ -75,3 +75,3 @@ } | ||
aggregationTemporality, | ||
dataPoints: toHistogramDataPoints(metricData) | ||
dataPoints: toHistogramDataPoints(metricData), | ||
}; | ||
@@ -78,0 +78,0 @@ } |
@@ -57,3 +57,3 @@ import { IInstrumentationScope, IKeyValue } from '../common/types'; | ||
/** Sum isMonotonic */ | ||
isMonotonic?: (boolean | null); | ||
isMonotonic?: boolean | null; | ||
} | ||
@@ -88,3 +88,3 @@ /** Properties of a Histogram. */ | ||
/** NumberDataPoint asDouble */ | ||
asDouble?: (number | null); | ||
asDouble?: number | null; | ||
/** NumberDataPoint asInt */ | ||
@@ -91,0 +91,0 @@ asInt?: number; |
@@ -8,3 +8,3 @@ "use strict"; | ||
return { | ||
resourceSpans: spanRecordsToResourceSpans(spans, useHex) | ||
resourceSpans: spanRecordsToResourceSpans(spans, useHex), | ||
}; | ||
@@ -50,3 +50,3 @@ } | ||
spans: spans, | ||
schemaUrl: schemaUrl | ||
schemaUrl: schemaUrl, | ||
}); | ||
@@ -63,3 +63,3 @@ } | ||
scopeSpans: scopeResourceSpans, | ||
schemaUrl: undefined | ||
schemaUrl: undefined, | ||
}; | ||
@@ -66,0 +66,0 @@ out.push(transformedSpans); |
@@ -10,3 +10,7 @@ "use strict"; | ||
const status = span.status; | ||
const parentSpanId = useHex ? span.parentSpanId : span.parentSpanId != null ? core.hexToBase64(span.parentSpanId) : undefined; | ||
const parentSpanId = useHex | ||
? span.parentSpanId | ||
: span.parentSpanId != null | ||
? core.hexToBase64(span.parentSpanId) | ||
: undefined; | ||
return { | ||
@@ -38,4 +42,8 @@ traceId: useHex ? ctx.traceId : core.hexToBase64(ctx.traceId), | ||
attributes: link.attributes ? (0, internal_1.toAttributes)(link.attributes) : [], | ||
spanId: useHex ? link.context.spanId : core.hexToBase64(link.context.spanId), | ||
traceId: useHex ? link.context.traceId : core.hexToBase64(link.context.traceId), | ||
spanId: useHex | ||
? link.context.spanId | ||
: core.hexToBase64(link.context.spanId), | ||
traceId: useHex | ||
? link.context.traceId | ||
: core.hexToBase64(link.context.traceId), | ||
droppedAttributesCount: 0, | ||
@@ -47,3 +55,5 @@ }; | ||
return { | ||
attributes: timedEvent.attributes ? (0, internal_1.toAttributes)(timedEvent.attributes) : [], | ||
attributes: timedEvent.attributes | ||
? (0, internal_1.toAttributes)(timedEvent.attributes) | ||
: [], | ||
name: timedEvent.name, | ||
@@ -50,0 +60,0 @@ timeUnixNano: (0, core_1.hrTimeToNanoseconds)(timedEvent.time), |
@@ -24,3 +24,3 @@ import { IInstrumentationScope, IKeyValue } from '../common/types'; | ||
/** IScopeSpans schemaUrl */ | ||
schemaUrl?: (string | null); | ||
schemaUrl?: string | null; | ||
} | ||
@@ -34,3 +34,3 @@ /** Properties of a Span. */ | ||
/** Span traceState */ | ||
traceState?: (string | null); | ||
traceState?: string | null; | ||
/** Span parentSpanId */ | ||
@@ -69,22 +69,22 @@ parentSpanId?: string; | ||
/** Indicates that the span represents an internal operation within an application, | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
SPAN_KIND_INTERNAL = 1, | ||
/** Indicates that the span covers server-side handling of an RPC or other | ||
* remote network request. | ||
*/ | ||
* remote network request. | ||
*/ | ||
SPAN_KIND_SERVER = 2, | ||
/** Indicates that the span describes a request to some remote service. | ||
*/ | ||
*/ | ||
SPAN_KIND_CLIENT = 3, | ||
/** Indicates that the span describes a producer sending a message to a broker. | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
SPAN_KIND_PRODUCER = 4, | ||
/** Indicates that the span describes consumer receiving a message from a broker. | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
SPAN_KIND_CONSUMER = 5 | ||
@@ -91,0 +91,0 @@ } |
@@ -28,24 +28,24 @@ "use strict"; | ||
/** Indicates that the span represents an internal operation within an application, | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
* as opposed to an operation happening at the boundaries. Default value. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_INTERNAL"] = 1] = "SPAN_KIND_INTERNAL"; | ||
/** Indicates that the span covers server-side handling of an RPC or other | ||
* remote network request. | ||
*/ | ||
* remote network request. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_SERVER"] = 2] = "SPAN_KIND_SERVER"; | ||
/** Indicates that the span describes a request to some remote service. | ||
*/ | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_CLIENT"] = 3] = "SPAN_KIND_CLIENT"; | ||
/** Indicates that the span describes a producer sending a message to a broker. | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
* Unlike CLIENT and SERVER, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. A PRODUCER span ends when the message was accepted | ||
* by the broker while the logical processing of the message might span a much longer time. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_PRODUCER"] = 4] = "SPAN_KIND_PRODUCER"; | ||
/** Indicates that the span describes consumer receiving a message from a broker. | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
* Like the PRODUCER kind, there is often no direct critical path latency relationship | ||
* between producer and consumer spans. | ||
*/ | ||
ESpanKind[ESpanKind["SPAN_KIND_CONSUMER"] = 5] = "SPAN_KIND_CONSUMER"; | ||
})(ESpanKind = exports.ESpanKind || (exports.ESpanKind = {})); | ||
//# sourceMappingURL=types.js.map |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.34.0", | ||
"version": "0.35.0", | ||
"description": "Transform OpenTelemetry SDK data into OTLP", | ||
@@ -17,4 +17,4 @@ "module": "build/esm/index.js", | ||
"prepublishOnly": "npm run compile", | ||
"compile": "tsc --build tsconfig.all.json", | ||
"clean": "tsc --build --clean tsconfig.all.json", | ||
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json", | ||
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json", | ||
"lint": "eslint . --ext .ts", | ||
@@ -25,3 +25,3 @@ "lint:fix": "eslint . --ext .ts --fix", | ||
"test:browser": "nyc karma start --single-run", | ||
"watch": "tsc --build -w tsconfig.all.json", | ||
"watch": "tsc --build -w tsconfig.json tsconfig.esm.json tsconfig.esnext.json", | ||
"peer-api-check": "node ../../../scripts/peer-api-check.js", | ||
@@ -58,6 +58,6 @@ "codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../" | ||
"peerDependencies": { | ||
"@opentelemetry/api": ">=1.3.0 <1.4.0" | ||
"@opentelemetry/api": ">=1.3.0 <1.5.0" | ||
}, | ||
"devDependencies": { | ||
"@opentelemetry/api": ">=1.3.0 <1.4.0", | ||
"@opentelemetry/api": ">=1.3.0 <1.5.0", | ||
"@types/mocha": "10.0.0", | ||
@@ -83,10 +83,10 @@ "@types/webpack-env": "1.16.3", | ||
"dependencies": { | ||
"@opentelemetry/core": "1.8.0", | ||
"@opentelemetry/resources": "1.8.0", | ||
"@opentelemetry/sdk-metrics": "1.8.0", | ||
"@opentelemetry/sdk-trace-base": "1.8.0" | ||
"@opentelemetry/core": "1.9.0", | ||
"@opentelemetry/resources": "1.9.0", | ||
"@opentelemetry/sdk-metrics": "1.9.0", | ||
"@opentelemetry/sdk-trace-base": "1.9.0" | ||
}, | ||
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-transformer", | ||
"sideEffects": false, | ||
"gitHead": "7972edf6659fb6e0d5928a5cf7a35f26683e168f" | ||
"gitHead": "08f597f3a3d71a4852b0afbba120af15ca038121" | ||
} |
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
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
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
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
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
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
250766
2637
+ Added@opentelemetry/api@1.4.1(transitive)
+ Added@opentelemetry/core@1.9.0(transitive)
+ Added@opentelemetry/resources@1.9.0(transitive)
+ Added@opentelemetry/sdk-metrics@1.9.0(transitive)
+ Added@opentelemetry/sdk-trace-base@1.9.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.9.0(transitive)
- Removed@opentelemetry/api@1.3.0(transitive)
- Removed@opentelemetry/core@1.8.0(transitive)
- Removed@opentelemetry/resources@1.8.0(transitive)
- Removed@opentelemetry/sdk-metrics@1.8.0(transitive)
- Removed@opentelemetry/sdk-trace-base@1.8.0(transitive)
- Removed@opentelemetry/semantic-conventions@1.8.0(transitive)
Updated@opentelemetry/core@1.9.0