@sentry/opentelemetry
Advanced tools
Comparing version 7.81.1 to 7.82.0
@@ -30,2 +30,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** Custom getClient method that uses the custom hub. */ | ||
function getClient() { | ||
return getCurrentHub().getClient(); | ||
} | ||
/** | ||
@@ -163,2 +168,3 @@ * ******************************************************************************* | ||
exports.ensureHubOnCarrier = ensureHubOnCarrier; | ||
exports.getClient = getClient; | ||
exports.getCurrentHub = getCurrentHub; | ||
@@ -165,0 +171,0 @@ exports.getHubFromCarrier = getHubFromCarrier; |
@@ -53,2 +53,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.startSpan = trace.startSpan; | ||
exports.getClient = hub.getClient; | ||
exports.getCurrentHub = hub.getCurrentHub; | ||
@@ -55,0 +56,0 @@ exports.setupGlobalHub = hub.setupGlobalHub; |
@@ -96,3 +96,3 @@ var { | ||
// Else, we try to generate a new one | ||
const client = hub.getCurrentHub().getClient(); | ||
const client = hub.getClient(); | ||
const activeSpan = api.trace.getSpan(context); | ||
@@ -99,0 +99,0 @@ const scope = activeSpan ? spanData.getSpanScope(activeSpan) : undefined; |
@@ -81,3 +81,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
function getTracer() { | ||
const client = hub.getCurrentHub().getClient(); | ||
const client = hub.getClient(); | ||
return (client && client.tracer) || api.trace.getTracer('@sentry/opentelemetry', core.SDK_VERSION); | ||
@@ -84,0 +84,0 @@ } |
@@ -28,2 +28,7 @@ import { Hub } from '@sentry/core'; | ||
/** Custom getClient method that uses the custom hub. */ | ||
function getClient() { | ||
return getCurrentHub().getClient(); | ||
} | ||
/** | ||
@@ -159,3 +164,3 @@ * ******************************************************************************* | ||
export { OpenTelemetryHub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, setupGlobalHub }; | ||
export { OpenTelemetryHub, ensureHubOnCarrier, getClient, getCurrentHub, getHubFromCarrier, setupGlobalHub }; | ||
//# sourceMappingURL=hub.js.map |
@@ -12,3 +12,3 @@ import { addOriginToSpan } from './utils/addOriginToSpan.js'; | ||
export { startInactiveSpan, startSpan } from './trace.js'; | ||
export { getCurrentHub, setupGlobalHub } from './custom/hub.js'; | ||
export { getClient, getCurrentHub, setupGlobalHub } from './custom/hub.js'; | ||
export { addTracingExtensions } from './custom/hubextensions.js'; | ||
@@ -15,0 +15,0 @@ export { setupEventContextTrace } from './setupEventContextTrace.js'; |
@@ -7,3 +7,3 @@ import { _optionalChain } from '@sentry/utils'; | ||
import { SENTRY_TRACE_HEADER, SENTRY_BAGGAGE_HEADER } from './constants.js'; | ||
import { getCurrentHub } from './custom/hub.js'; | ||
import { getClient } from './custom/hub.js'; | ||
import { getPropagationContextFromContext, setPropagationContextOnContext } from './utils/contextData.js'; | ||
@@ -92,3 +92,3 @@ import { getSpanScope } from './utils/spanData.js'; | ||
// Else, we try to generate a new one | ||
const client = getCurrentHub().getClient(); | ||
const client = getClient(); | ||
const activeSpan = trace.getSpan(context); | ||
@@ -95,0 +95,0 @@ const scope = activeSpan ? getSpanScope(activeSpan) : undefined; |
import { SpanStatusCode, trace } from '@opentelemetry/api'; | ||
import { SDK_VERSION } from '@sentry/core'; | ||
import { isThenable } from '@sentry/utils'; | ||
import { getCurrentHub } from './custom/hub.js'; | ||
import { getClient } from './custom/hub.js'; | ||
import { InternalSentrySemanticAttributes } from './semanticAttributes.js'; | ||
@@ -79,3 +79,3 @@ import { setSpanMetadata } from './utils/spanData.js'; | ||
function getTracer() { | ||
const client = getCurrentHub().getClient(); | ||
const client = getClient(); | ||
return (client && client.tracer) || trace.getTracer('@sentry/opentelemetry', SDK_VERSION); | ||
@@ -82,0 +82,0 @@ } |
{ | ||
"name": "@sentry/opentelemetry", | ||
"version": "7.81.1", | ||
"version": "7.82.0", | ||
"description": "Official Sentry utilities for OpenTelemetry", | ||
@@ -26,5 +26,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.81.1", | ||
"@sentry/types": "7.81.1", | ||
"@sentry/utils": "7.81.1" | ||
"@sentry/core": "7.82.0", | ||
"@sentry/types": "7.82.0", | ||
"@sentry/utils": "7.82.0" | ||
}, | ||
@@ -31,0 +31,0 @@ "peerDependencies": { |
@@ -15,2 +15,4 @@ import { Carrier, Scope } from '@sentry/core'; | ||
} | ||
/** Custom getClient method that uses the custom hub. */ | ||
export declare function getClient<C extends Client>(): C | undefined; | ||
/** | ||
@@ -17,0 +19,0 @@ * Returns the default hub instance. |
@@ -13,3 +13,3 @@ import { addOriginToSpan } from './utils/addOriginToSpan'; | ||
export { startSpan, startInactiveSpan } from './trace'; | ||
export { getCurrentHub, setupGlobalHub } from './custom/hub'; | ||
export { getCurrentHub, setupGlobalHub, getClient } from './custom/hub'; | ||
export { addTracingExtensions } from './custom/hubextensions'; | ||
@@ -16,0 +16,0 @@ export { setupEventContextTrace } from './setupEventContextTrace'; |
@@ -15,2 +15,4 @@ import type { Carrier, Scope } from '@sentry/core'; | ||
} | ||
/** Custom getClient method that uses the custom hub. */ | ||
export declare function getClient<C extends Client>(): C | undefined; | ||
/** | ||
@@ -17,0 +19,0 @@ * Returns the default hub instance. |
@@ -13,3 +13,3 @@ import { addOriginToSpan } from './utils/addOriginToSpan'; | ||
export { startSpan, startInactiveSpan } from './trace'; | ||
export { getCurrentHub, setupGlobalHub } from './custom/hub'; | ||
export { getCurrentHub, setupGlobalHub, getClient } from './custom/hub'; | ||
export { addTracingExtensions } from './custom/hubextensions'; | ||
@@ -16,0 +16,0 @@ export { setupEventContextTrace } from './setupEventContextTrace'; |
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
500586
4664
+ Added@sentry/core@7.82.0(transitive)
+ Added@sentry/types@7.82.0(transitive)
+ Added@sentry/utils@7.82.0(transitive)
- Removed@sentry/core@7.81.1(transitive)
- Removed@sentry/types@7.81.1(transitive)
- Removed@sentry/utils@7.81.1(transitive)
Updated@sentry/core@7.82.0
Updated@sentry/types@7.82.0
Updated@sentry/utils@7.82.0