@sentry-internal/tracing
Advanced tools
Comparing version 7.46.0 to 7.47.0
@@ -132,4 +132,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
/** | ||
* Adds sentry-trace and baggage headers to the various forms of fetch headers | ||
*/ | ||
function addTracingHeadersToFetchRequest( | ||
request, | ||
request, // unknown is actually type Request but we can't export DOM types from this package, | ||
dynamicSamplingContext, | ||
@@ -155,3 +158,3 @@ span, | ||
if (sentryBaggageHeader) { | ||
// If the same header is appended miultiple times the browser will merge the values into a single request header. | ||
// If the same header is appended multiple times the browser will merge the values into a single request header. | ||
// Its therefore safe to simply push a "baggage" entry, even though there might already be another baggage header. | ||
@@ -171,3 +174,3 @@ newHeaders.append(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader); | ||
return newHeaders; | ||
return newHeaders ; | ||
} else { | ||
@@ -270,2 +273,3 @@ const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined; | ||
exports.DEFAULT_TRACE_PROPAGATION_TARGETS = DEFAULT_TRACE_PROPAGATION_TARGETS; | ||
exports.addTracingHeadersToFetchRequest = addTracingHeadersToFetchRequest; | ||
exports.defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptions; | ||
@@ -272,0 +276,0 @@ exports.fetchCallback = fetchCallback; |
@@ -40,2 +40,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.BrowserTracing = browsertracing.BrowserTracing; | ||
exports.addTracingHeadersToFetchRequest = request.addTracingHeadersToFetchRequest; | ||
exports.defaultRequestInstrumentationOptions = request.defaultRequestInstrumentationOptions; | ||
@@ -42,0 +43,0 @@ exports.instrumentOutgoingRequests = request.instrumentOutgoingRequests; |
@@ -130,4 +130,7 @@ import { hasTracingEnabled, getCurrentHub } from '@sentry/core'; | ||
/** | ||
* Adds sentry-trace and baggage headers to the various forms of fetch headers | ||
*/ | ||
function addTracingHeadersToFetchRequest( | ||
request, | ||
request, // unknown is actually type Request but we can't export DOM types from this package, | ||
dynamicSamplingContext, | ||
@@ -153,3 +156,3 @@ span, | ||
if (sentryBaggageHeader) { | ||
// If the same header is appended miultiple times the browser will merge the values into a single request header. | ||
// If the same header is appended multiple times the browser will merge the values into a single request header. | ||
// Its therefore safe to simply push a "baggage" entry, even though there might already be another baggage header. | ||
@@ -169,3 +172,3 @@ newHeaders.append(BAGGAGE_HEADER_NAME, sentryBaggageHeader); | ||
return newHeaders; | ||
return newHeaders ; | ||
} else { | ||
@@ -267,3 +270,3 @@ const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined; | ||
export { DEFAULT_TRACE_PROPAGATION_TARGETS, defaultRequestInstrumentationOptions, fetchCallback, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback }; | ||
export { DEFAULT_TRACE_PROPAGATION_TARGETS, addTracingHeadersToFetchRequest, defaultRequestInstrumentationOptions, fetchCallback, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback }; | ||
//# sourceMappingURL=request.js.map |
@@ -12,4 +12,4 @@ export { IdleTransaction, Span, SpanStatus, Transaction, extractTraceparentData, getActiveTransaction, hasTracingEnabled, spanStatusfromHttpCode, startIdleTransaction } from '@sentry/core'; | ||
export { BROWSER_TRACING_INTEGRATION_ID, BrowserTracing } from './browser/browsertracing.js'; | ||
export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './browser/request.js'; | ||
export { addTracingHeadersToFetchRequest, defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './browser/request.js'; | ||
export { addExtensionMethods } from './extensions.js'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sentry-internal/tracing", | ||
"version": "7.46.0", | ||
"version": "7.47.0", | ||
"description": "Sentry Internal Tracing Package", | ||
@@ -19,5 +19,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "7.46.0", | ||
"@sentry/types": "7.46.0", | ||
"@sentry/utils": "7.46.0", | ||
"@sentry/core": "7.47.0", | ||
"@sentry/types": "7.47.0", | ||
"@sentry/utils": "7.47.0", | ||
"tslib": "^1.9.3" | ||
@@ -27,3 +27,4 @@ }, | ||
"@types/express": "^4.17.14" | ||
} | ||
}, | ||
"sideEffects": false | ||
} |
export * from '../exports'; | ||
export type { RequestInstrumentationOptions } from './request'; | ||
export { BrowserTracing, BROWSER_TRACING_INTEGRATION_ID } from './browsertracing'; | ||
export { instrumentOutgoingRequests, defaultRequestInstrumentationOptions } from './request'; | ||
export { instrumentOutgoingRequests, defaultRequestInstrumentationOptions, addTracingHeadersToFetchRequest, } from './request'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import type { Span } from '@sentry/types'; | ||
import type { DynamicSamplingContext, Span } from '@sentry/types'; | ||
export declare const DEFAULT_TRACE_PROPAGATION_TARGETS: (string | RegExp)[]; | ||
@@ -68,2 +68,7 @@ /** Options for Request Instrumentation */ | ||
} | ||
declare type PolymorphicRequestHeaders = Record<string, string | undefined> | Array<[string, string]> | { | ||
[key: string]: any; | ||
append: (key: string, value: string) => void; | ||
get: (key: string) => string | null | undefined; | ||
}; | ||
export declare const defaultRequestInstrumentationOptions: RequestInstrumentationOptions; | ||
@@ -83,5 +88,15 @@ /** Registers span creators for xhr and fetch requests */ | ||
/** | ||
* Adds sentry-trace and baggage headers to the various forms of fetch headers | ||
*/ | ||
export declare function addTracingHeadersToFetchRequest(request: string | unknown, // unknown is actually type Request but we can't export DOM types from this package, | ||
dynamicSamplingContext: Partial<DynamicSamplingContext>, span: Span, options: { | ||
headers?: { | ||
[key: string]: string[] | string | undefined; | ||
} | PolymorphicRequestHeaders; | ||
}): PolymorphicRequestHeaders; | ||
/** | ||
* Create and track xhr request spans | ||
*/ | ||
export declare function xhrCallback(handlerData: XHRData, shouldCreateSpan: (url: string) => boolean, shouldAttachHeaders: (url: string) => boolean, spans: Record<string, Span>): void; | ||
export {}; | ||
//# sourceMappingURL=request.d.ts.map |
export * from './exports'; | ||
export { Apollo, Express, GraphQL, Mongo, Mysql, Postgres, Prisma, lazyLoadedNodePerformanceMonitoringIntegrations, } from './node'; | ||
export type { LazyLoadedIntegration } from './node'; | ||
export { BrowserTracing, BROWSER_TRACING_INTEGRATION_ID, instrumentOutgoingRequests, defaultRequestInstrumentationOptions, } from './browser'; | ||
export { BrowserTracing, BROWSER_TRACING_INTEGRATION_ID, instrumentOutgoingRequests, defaultRequestInstrumentationOptions, addTracingHeadersToFetchRequest, } from './browser'; | ||
export type { RequestInstrumentationOptions } from './browser'; | ||
export { addExtensionMethods } from './extensions'; | ||
//# sourceMappingURL=index.d.ts.map |
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
845728
6184
61
+ Added@sentry/core@7.47.0(transitive)
+ Added@sentry/types@7.47.0(transitive)
+ Added@sentry/utils@7.47.0(transitive)
- Removed@sentry/core@7.46.0(transitive)
- Removed@sentry/types@7.46.0(transitive)
- Removed@sentry/utils@7.46.0(transitive)
Updated@sentry/core@7.47.0
Updated@sentry/types@7.47.0
Updated@sentry/utils@7.47.0