@sentry/opentelemetry
Advanced tools
Comparing version 7.92.0 to 7.93.0
@@ -46,2 +46,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
newScope._propagationContext = { ...this['_propagationContext'] }; | ||
newScope._client = this._client; | ||
@@ -48,0 +49,0 @@ return newScope; |
@@ -14,2 +14,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
// eslint-disable-next-line deprecation/deprecation | ||
const transaction = new OpenTelemetryTransaction(transactionContext, hub ); | ||
@@ -16,0 +17,0 @@ // Since we do not do sampling here, we assume that this is _always_ sampled |
@@ -105,3 +105,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
// We make sure to use the finish scope | ||
const scope = spanData.getSpanFinishScope(span); | ||
const scope = getScopeForTransactionFinish(span); | ||
transaction.finishWithScope(convertOtelTimeToSeconds.convertOtelTimeToSeconds(span.endTime), scope); | ||
@@ -115,2 +115,13 @@ }); | ||
function getScopeForTransactionFinish(span) { | ||
// The finish scope should normally always be there (and it is already a clone), | ||
// but for the sake of type safety we fall back to a clone of the current scope | ||
const scope = spanData.getSpanFinishScope(span) || core$1.getCurrentScope().clone(); | ||
scope.setContext('otel', { | ||
attributes: removeSentryAttributes(span.attributes), | ||
resource: span.resource.attributes, | ||
}); | ||
return scope; | ||
} | ||
function getCompletedRootNodes(nodes) { | ||
@@ -173,7 +184,2 @@ return nodes.filter((node) => !!node.span && !node.parentNode); | ||
transaction$1.setContext('otel', { | ||
attributes: removeSentryAttributes(span.attributes), | ||
resource: span.resource.attributes, | ||
}); | ||
return transaction$1; | ||
@@ -202,2 +208,3 @@ } | ||
// eslint-disable-next-line deprecation/deprecation | ||
const sentrySpan = sentryParentSpan.startChild({ | ||
@@ -204,0 +211,0 @@ description, |
@@ -44,2 +44,3 @@ import { Scope } from '@sentry/core'; | ||
newScope._propagationContext = { ...this['_propagationContext'] }; | ||
newScope._client = this._client; | ||
@@ -46,0 +47,0 @@ return newScope; |
@@ -12,2 +12,3 @@ import { Transaction } from '@sentry/core'; | ||
// eslint-disable-next-line deprecation/deprecation | ||
const transaction = new OpenTelemetryTransaction(transactionContext, hub ); | ||
@@ -14,0 +15,0 @@ // Since we do not do sampling here, we assume that this is _always_ sampled |
import { SpanKind } from '@opentelemetry/api'; | ||
import { ExportResultCode } from '@opentelemetry/core'; | ||
import { SemanticAttributes } from '@opentelemetry/semantic-conventions'; | ||
import { flush } from '@sentry/core'; | ||
import { flush, getCurrentScope } from '@sentry/core'; | ||
import { logger } from '@sentry/utils'; | ||
@@ -103,3 +103,3 @@ import { getCurrentHub } from './custom/hub.js'; | ||
// We make sure to use the finish scope | ||
const scope = getSpanFinishScope(span); | ||
const scope = getScopeForTransactionFinish(span); | ||
transaction.finishWithScope(convertOtelTimeToSeconds(span.endTime), scope); | ||
@@ -113,2 +113,13 @@ }); | ||
function getScopeForTransactionFinish(span) { | ||
// The finish scope should normally always be there (and it is already a clone), | ||
// but for the sake of type safety we fall back to a clone of the current scope | ||
const scope = getSpanFinishScope(span) || getCurrentScope().clone(); | ||
scope.setContext('otel', { | ||
attributes: removeSentryAttributes(span.attributes), | ||
resource: span.resource.attributes, | ||
}); | ||
return scope; | ||
} | ||
function getCompletedRootNodes(nodes) { | ||
@@ -171,7 +182,2 @@ return nodes.filter((node) => !!node.span && !node.parentNode); | ||
transaction.setContext('otel', { | ||
attributes: removeSentryAttributes(span.attributes), | ||
resource: span.resource.attributes, | ||
}); | ||
return transaction; | ||
@@ -200,2 +206,3 @@ } | ||
// eslint-disable-next-line deprecation/deprecation | ||
const sentrySpan = sentryParentSpan.startChild({ | ||
@@ -202,0 +209,0 @@ description, |
{ | ||
"name": "@sentry/opentelemetry", | ||
"version": "7.92.0", | ||
"version": "7.93.0", | ||
"description": "Official Sentry utilities for OpenTelemetry", | ||
@@ -32,5 +32,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.92.0", | ||
"@sentry/types": "7.92.0", | ||
"@sentry/utils": "7.92.0" | ||
"@sentry/core": "7.93.0", | ||
"@sentry/types": "7.93.0", | ||
"@sentry/utils": "7.93.0" | ||
}, | ||
@@ -37,0 +37,0 @@ "peerDependencies": { |
import { Attributes, Span as WriteableSpan, SpanKind, TimeInput, Tracer } from '@opentelemetry/api'; | ||
import { BasicTracerProvider, ReadableSpan, Span } from '@opentelemetry/sdk-trace-base'; | ||
import { SpanOrigin, TransactionMetadata, TransactionSource } from '@sentry/types'; | ||
import { Scope, SpanOrigin, TransactionMetadata, TransactionSource } from '@sentry/types'; | ||
export interface OpenTelemetryClient { | ||
@@ -14,2 +14,3 @@ tracer: Tracer; | ||
source?: TransactionSource; | ||
scope?: Scope; | ||
attributes?: Attributes; | ||
@@ -16,0 +17,0 @@ kind?: SpanKind; |
import type { Attributes, Span as WriteableSpan, SpanKind, TimeInput, Tracer } from '@opentelemetry/api'; | ||
import type { BasicTracerProvider, ReadableSpan, Span } from '@opentelemetry/sdk-trace-base'; | ||
import type { SpanOrigin, TransactionMetadata, TransactionSource } from '@sentry/types'; | ||
import type { Scope, SpanOrigin, TransactionMetadata, TransactionSource } from '@sentry/types'; | ||
export interface OpenTelemetryClient { | ||
@@ -14,2 +14,3 @@ tracer: Tracer; | ||
source?: TransactionSource; | ||
scope?: Scope; | ||
attributes?: Attributes; | ||
@@ -16,0 +17,0 @@ kind?: SpanKind; |
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
518413
4812
+ Added@sentry/core@7.93.0(transitive)
+ Added@sentry/types@7.93.0(transitive)
+ Added@sentry/utils@7.93.0(transitive)
- Removed@sentry/core@7.92.0(transitive)
- Removed@sentry/types@7.92.0(transitive)
- Removed@sentry/utils@7.92.0(transitive)
Updated@sentry/core@7.93.0
Updated@sentry/types@7.93.0
Updated@sentry/utils@7.93.0