@sentry/opentelemetry 9.7.0 → 9.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/build/cjs/index.js +10 -12
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +11 -13
- package/build/esm/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/types/spanExporter.d.ts.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js
CHANGED
|
@@ -1775,14 +1775,14 @@ function createTransactionForOtelSpan(span) {
|
|
|
1775
1775
|
|
|
1776
1776
|
const sampleRate = span.attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] ;
|
|
1777
1777
|
|
|
1778
|
-
const attributes =
|
|
1778
|
+
const attributes = {
|
|
1779
1779
|
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
|
|
1780
1780
|
[core.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: sampleRate,
|
|
1781
1781
|
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
|
|
1782
1782
|
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,
|
|
1783
1783
|
...data,
|
|
1784
1784
|
...removeSentryAttributes(span.attributes),
|
|
1785
|
-
}
|
|
1785
|
+
};
|
|
1786
1786
|
|
|
1787
1787
|
const { links } = span;
|
|
1788
1788
|
const { traceId: trace_id, spanId: span_id } = span.spanContext();
|
|
@@ -1796,7 +1796,7 @@ function createTransactionForOtelSpan(span) {
|
|
|
1796
1796
|
|
|
1797
1797
|
const status = mapStatus(span);
|
|
1798
1798
|
|
|
1799
|
-
const traceContext =
|
|
1799
|
+
const traceContext = {
|
|
1800
1800
|
parent_span_id,
|
|
1801
1801
|
span_id,
|
|
1802
1802
|
trace_id,
|
|
@@ -1805,7 +1805,7 @@ function createTransactionForOtelSpan(span) {
|
|
|
1805
1805
|
op,
|
|
1806
1806
|
status: core.getStatusMessage(status), // As per protocol, span status is allowed to be undefined
|
|
1807
1807
|
links: core.convertSpanLinksForEnvelope(links),
|
|
1808
|
-
}
|
|
1808
|
+
};
|
|
1809
1809
|
|
|
1810
1810
|
const statusCode = attributes[semanticConventions.ATTR_HTTP_RESPONSE_STATUS_CODE];
|
|
1811
1811
|
const responseContext = typeof statusCode === 'number' ? { response: { status_code: statusCode } } : undefined;
|
|
@@ -1824,12 +1824,10 @@ function createTransactionForOtelSpan(span) {
|
|
|
1824
1824
|
transaction: description,
|
|
1825
1825
|
type: 'transaction',
|
|
1826
1826
|
sdkProcessingMetadata: {
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
dynamicSamplingContext: core.getDynamicSamplingContextFromSpan(span ),
|
|
1832
|
-
}),
|
|
1827
|
+
capturedSpanScope: capturedSpanScopes.scope,
|
|
1828
|
+
capturedSpanIsolationScope: capturedSpanScopes.isolationScope,
|
|
1829
|
+
sampleRate,
|
|
1830
|
+
dynamicSamplingContext: core.getDynamicSamplingContextFromSpan(span ),
|
|
1833
1831
|
},
|
|
1834
1832
|
...(source && {
|
|
1835
1833
|
transaction_info: {
|
|
@@ -1864,12 +1862,12 @@ function createAndFinishSpanForOtelSpan(node, spans, sentSpans) {
|
|
|
1864
1862
|
const { attributes, startTime, endTime, parentSpanId, links } = span;
|
|
1865
1863
|
|
|
1866
1864
|
const { op, description, data, origin = 'manual' } = getSpanData(span);
|
|
1867
|
-
const allData =
|
|
1865
|
+
const allData = {
|
|
1868
1866
|
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: origin,
|
|
1869
1867
|
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: op,
|
|
1870
1868
|
...removeSentryAttributes(attributes),
|
|
1871
1869
|
...data,
|
|
1872
|
-
}
|
|
1870
|
+
};
|
|
1873
1871
|
|
|
1874
1872
|
const status = mapStatus(span);
|
|
1875
1873
|
|