@sentry/opentelemetry 8.14.0 → 8.15.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/build/cjs/index.js +5 -10
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +6 -11
- package/build/esm/index.js.map +1 -1
- package/package.json +4 -4
- package/build/types/utils/convertOtelTimeToSeconds.d.ts +0 -3
- package/build/types/utils/convertOtelTimeToSeconds.d.ts.map +0 -1
- package/build/types-ts3.8/utils/convertOtelTimeToSeconds.d.ts +0 -6
package/build/cjs/index.js
CHANGED
|
@@ -1300,11 +1300,6 @@ function wrapContextManagerClass(
|
|
|
1300
1300
|
/** If this attribute is true, it means that the parent is a remote span. */
|
|
1301
1301
|
const SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE = 'sentry.parentIsRemote';
|
|
1302
1302
|
|
|
1303
|
-
/** Convert an OTEL time to seconds */
|
|
1304
|
-
function convertOtelTimeToSeconds([seconds, nano]) {
|
|
1305
|
-
return seconds + nano / 1000000000;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
1303
|
/**
|
|
1309
1304
|
* This function runs through a list of OTEL Spans, and wraps them in an `SpanNode`
|
|
1310
1305
|
* where each node holds a reference to their parent node.
|
|
@@ -1611,7 +1606,7 @@ function getCompletedRootNodes(nodes) {
|
|
|
1611
1606
|
|
|
1612
1607
|
function shouldCleanupSpan(span, maxStartTimeOffsetSeconds) {
|
|
1613
1608
|
const cutoff = Date.now() / 1000 - maxStartTimeOffsetSeconds;
|
|
1614
|
-
return
|
|
1609
|
+
return core.spanTimeInputToSeconds(span.startTime) < cutoff;
|
|
1615
1610
|
}
|
|
1616
1611
|
|
|
1617
1612
|
function parseSpan(span) {
|
|
@@ -1671,8 +1666,8 @@ function createTransactionForOtelSpan(span) {
|
|
|
1671
1666
|
},
|
|
1672
1667
|
},
|
|
1673
1668
|
spans: [],
|
|
1674
|
-
start_timestamp:
|
|
1675
|
-
timestamp:
|
|
1669
|
+
start_timestamp: core.spanTimeInputToSeconds(span.startTime),
|
|
1670
|
+
timestamp: core.spanTimeInputToSeconds(span.endTime),
|
|
1676
1671
|
transaction: description,
|
|
1677
1672
|
type: 'transaction',
|
|
1678
1673
|
sdkProcessingMetadata: {
|
|
@@ -1729,9 +1724,9 @@ function createAndFinishSpanForOtelSpan(node, spans, remaining) {
|
|
|
1729
1724
|
data: allData,
|
|
1730
1725
|
description,
|
|
1731
1726
|
parent_span_id: parentSpanId,
|
|
1732
|
-
start_timestamp:
|
|
1727
|
+
start_timestamp: core.spanTimeInputToSeconds(startTime),
|
|
1733
1728
|
// This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
|
|
1734
|
-
timestamp:
|
|
1729
|
+
timestamp: core.spanTimeInputToSeconds(endTime) || undefined,
|
|
1735
1730
|
status: core.getStatusMessage(status), // As per protocol, span status is allowed to be undefined
|
|
1736
1731
|
op,
|
|
1737
1732
|
origin,
|