@elizaos/server 1.6.1-alpha.7 → 1.6.1
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/dist/client/assets/{main-CQAV8tyh.js → main-CLvs0bX8.js} +3 -3
- package/dist/client/assets/{main-CQAV8tyh.js.map → main-CLvs0bX8.js.map} +1 -1
- package/dist/client/assets/{main-BM2lpId8.js → main-llvbgk6E.js} +52 -52
- package/dist/client/assets/{main-BM2lpId8.js.map → main-llvbgk6E.js.map} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/index.js +641 -562
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -12295,21 +12295,21 @@ var require_ParentBasedSampler = __commonJS((exports) => {
|
|
|
12295
12295
|
this._localParentSampled = config.localParentSampled ?? new AlwaysOnSampler_1.AlwaysOnSampler;
|
|
12296
12296
|
this._localParentNotSampled = config.localParentNotSampled ?? new AlwaysOffSampler_1.AlwaysOffSampler;
|
|
12297
12297
|
}
|
|
12298
|
-
shouldSample(
|
|
12299
|
-
const parentContext = api_1.trace.getSpanContext(
|
|
12298
|
+
shouldSample(context3, traceId, spanName, spanKind, attributes, links) {
|
|
12299
|
+
const parentContext = api_1.trace.getSpanContext(context3);
|
|
12300
12300
|
if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {
|
|
12301
|
-
return this._root.shouldSample(
|
|
12301
|
+
return this._root.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
|
|
12302
12302
|
}
|
|
12303
12303
|
if (parentContext.isRemote) {
|
|
12304
12304
|
if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
|
|
12305
|
-
return this._remoteParentSampled.shouldSample(
|
|
12305
|
+
return this._remoteParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
|
|
12306
12306
|
}
|
|
12307
|
-
return this._remoteParentNotSampled.shouldSample(
|
|
12307
|
+
return this._remoteParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
|
|
12308
12308
|
}
|
|
12309
12309
|
if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
|
|
12310
|
-
return this._localParentSampled.shouldSample(
|
|
12310
|
+
return this._localParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
|
|
12311
12311
|
}
|
|
12312
|
-
return this._localParentNotSampled.shouldSample(
|
|
12312
|
+
return this._localParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
|
|
12313
12313
|
}
|
|
12314
12314
|
toString() {
|
|
12315
12315
|
return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
|
|
@@ -12333,7 +12333,7 @@ var require_TraceIdRatioBasedSampler = __commonJS((exports) => {
|
|
|
12333
12333
|
this._ratio = this._normalize(_ratio);
|
|
12334
12334
|
this._upperBound = Math.floor(this._ratio * 4294967295);
|
|
12335
12335
|
}
|
|
12336
|
-
shouldSample(
|
|
12336
|
+
shouldSample(context3, traceId) {
|
|
12337
12337
|
return {
|
|
12338
12338
|
decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED : Sampler_1.SamplingDecision.NOT_RECORD
|
|
12339
12339
|
};
|
|
@@ -12729,12 +12729,12 @@ var require_Tracer = __commonJS((exports) => {
|
|
|
12729
12729
|
this._spanProcessor = spanProcessor;
|
|
12730
12730
|
this.instrumentationScope = instrumentationScope;
|
|
12731
12731
|
}
|
|
12732
|
-
startSpan(name, options = {},
|
|
12732
|
+
startSpan(name, options = {}, context3 = api.context.active()) {
|
|
12733
12733
|
if (options.root) {
|
|
12734
|
-
|
|
12734
|
+
context3 = api.trace.deleteSpan(context3);
|
|
12735
12735
|
}
|
|
12736
|
-
const parentSpan = api.trace.getSpan(
|
|
12737
|
-
if ((0, core_1.isTracingSuppressed)(
|
|
12736
|
+
const parentSpan = api.trace.getSpan(context3);
|
|
12737
|
+
if ((0, core_1.isTracingSuppressed)(context3)) {
|
|
12738
12738
|
api.diag.debug("Instrumentation suppressed, returning Noop Span");
|
|
12739
12739
|
const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
|
|
12740
12740
|
return nonRecordingSpan;
|
|
@@ -12759,7 +12759,7 @@ var require_Tracer = __commonJS((exports) => {
|
|
|
12759
12759
|
};
|
|
12760
12760
|
});
|
|
12761
12761
|
const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
|
|
12762
|
-
const samplingResult = this._sampler.shouldSample(
|
|
12762
|
+
const samplingResult = this._sampler.shouldSample(context3, traceId, name, spanKind, attributes, links);
|
|
12763
12763
|
traceState = samplingResult.traceState ?? traceState;
|
|
12764
12764
|
const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE;
|
|
12765
12765
|
const spanContext = { traceId, spanId, traceFlags, traceState };
|
|
@@ -12772,7 +12772,7 @@ var require_Tracer = __commonJS((exports) => {
|
|
|
12772
12772
|
const span = new Span_1.SpanImpl({
|
|
12773
12773
|
resource: this._resource,
|
|
12774
12774
|
scope: this.instrumentationScope,
|
|
12775
|
-
context:
|
|
12775
|
+
context: context3,
|
|
12776
12776
|
spanContext,
|
|
12777
12777
|
name,
|
|
12778
12778
|
kind: spanKind,
|
|
@@ -12841,9 +12841,9 @@ var require_MultiSpanProcessor = __commonJS((exports) => {
|
|
|
12841
12841
|
});
|
|
12842
12842
|
});
|
|
12843
12843
|
}
|
|
12844
|
-
onStart(span,
|
|
12844
|
+
onStart(span, context3) {
|
|
12845
12845
|
for (const spanProcessor of this._spanProcessors) {
|
|
12846
|
-
spanProcessor.onStart(span,
|
|
12846
|
+
spanProcessor.onStart(span, context3);
|
|
12847
12847
|
}
|
|
12848
12848
|
}
|
|
12849
12849
|
onEnd(span) {
|
|
@@ -13171,19 +13171,19 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
|
|
|
13171
13171
|
];
|
|
13172
13172
|
|
|
13173
13173
|
class AbstractAsyncHooksContextManager {
|
|
13174
|
-
bind(
|
|
13174
|
+
bind(context7, target) {
|
|
13175
13175
|
if (target instanceof events_1.EventEmitter) {
|
|
13176
|
-
return this._bindEventEmitter(
|
|
13176
|
+
return this._bindEventEmitter(context7, target);
|
|
13177
13177
|
}
|
|
13178
13178
|
if (typeof target === "function") {
|
|
13179
|
-
return this._bindFunction(
|
|
13179
|
+
return this._bindFunction(context7, target);
|
|
13180
13180
|
}
|
|
13181
13181
|
return target;
|
|
13182
13182
|
}
|
|
13183
|
-
_bindFunction(
|
|
13183
|
+
_bindFunction(context7, target) {
|
|
13184
13184
|
const manager = this;
|
|
13185
13185
|
const contextWrapper = function(...args) {
|
|
13186
|
-
return manager.with(
|
|
13186
|
+
return manager.with(context7, () => target.apply(this, args));
|
|
13187
13187
|
};
|
|
13188
13188
|
Object.defineProperty(contextWrapper, "length", {
|
|
13189
13189
|
enumerable: false,
|
|
@@ -13193,7 +13193,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
|
|
|
13193
13193
|
});
|
|
13194
13194
|
return contextWrapper;
|
|
13195
13195
|
}
|
|
13196
|
-
_bindEventEmitter(
|
|
13196
|
+
_bindEventEmitter(context7, ee) {
|
|
13197
13197
|
const map = this._getPatchMap(ee);
|
|
13198
13198
|
if (map !== undefined)
|
|
13199
13199
|
return ee;
|
|
@@ -13201,7 +13201,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
|
|
|
13201
13201
|
ADD_LISTENER_METHODS.forEach((methodName) => {
|
|
13202
13202
|
if (ee[methodName] === undefined)
|
|
13203
13203
|
return;
|
|
13204
|
-
ee[methodName] = this._patchAddListener(ee, ee[methodName],
|
|
13204
|
+
ee[methodName] = this._patchAddListener(ee, ee[methodName], context7);
|
|
13205
13205
|
});
|
|
13206
13206
|
if (typeof ee.removeListener === "function") {
|
|
13207
13207
|
ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);
|
|
@@ -13239,7 +13239,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
|
|
|
13239
13239
|
return original.apply(this, arguments);
|
|
13240
13240
|
};
|
|
13241
13241
|
}
|
|
13242
|
-
_patchAddListener(ee, original,
|
|
13242
|
+
_patchAddListener(ee, original, context7) {
|
|
13243
13243
|
const contextManager = this;
|
|
13244
13244
|
return function(event, listener) {
|
|
13245
13245
|
if (contextManager._wrapped) {
|
|
@@ -13254,7 +13254,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
|
|
|
13254
13254
|
listeners = new WeakMap;
|
|
13255
13255
|
map[event] = listeners;
|
|
13256
13256
|
}
|
|
13257
|
-
const patchedListener = contextManager.bind(
|
|
13257
|
+
const patchedListener = contextManager.bind(context7, listener);
|
|
13258
13258
|
listeners.set(listener, patchedListener);
|
|
13259
13259
|
contextManager._wrapped = true;
|
|
13260
13260
|
try {
|
|
@@ -13303,8 +13303,8 @@ var require_AsyncHooksContextManager = __commonJS((exports) => {
|
|
|
13303
13303
|
active() {
|
|
13304
13304
|
return this._stack[this._stack.length - 1] ?? api_1.ROOT_CONTEXT;
|
|
13305
13305
|
}
|
|
13306
|
-
with(
|
|
13307
|
-
this._enterContext(
|
|
13306
|
+
with(context7, fn, thisArg, ...args) {
|
|
13307
|
+
this._enterContext(context7);
|
|
13308
13308
|
try {
|
|
13309
13309
|
return fn.call(thisArg, ...args);
|
|
13310
13310
|
} finally {
|
|
@@ -13324,25 +13324,25 @@ var require_AsyncHooksContextManager = __commonJS((exports) => {
|
|
|
13324
13324
|
_init(uid, type) {
|
|
13325
13325
|
if (type === "TIMERWRAP")
|
|
13326
13326
|
return;
|
|
13327
|
-
const
|
|
13328
|
-
if (
|
|
13329
|
-
this._contexts.set(uid,
|
|
13327
|
+
const context7 = this._stack[this._stack.length - 1];
|
|
13328
|
+
if (context7 !== undefined) {
|
|
13329
|
+
this._contexts.set(uid, context7);
|
|
13330
13330
|
}
|
|
13331
13331
|
}
|
|
13332
13332
|
_destroy(uid) {
|
|
13333
13333
|
this._contexts.delete(uid);
|
|
13334
13334
|
}
|
|
13335
13335
|
_before(uid) {
|
|
13336
|
-
const
|
|
13337
|
-
if (
|
|
13338
|
-
this._enterContext(
|
|
13336
|
+
const context7 = this._contexts.get(uid);
|
|
13337
|
+
if (context7 !== undefined) {
|
|
13338
|
+
this._enterContext(context7);
|
|
13339
13339
|
}
|
|
13340
13340
|
}
|
|
13341
13341
|
_after() {
|
|
13342
13342
|
this._exitContext();
|
|
13343
13343
|
}
|
|
13344
|
-
_enterContext(
|
|
13345
|
-
this._stack.push(
|
|
13344
|
+
_enterContext(context7) {
|
|
13345
|
+
this._stack.push(context7);
|
|
13346
13346
|
}
|
|
13347
13347
|
_exitContext() {
|
|
13348
13348
|
this._stack.pop();
|
|
@@ -13368,9 +13368,9 @@ var require_AsyncLocalStorageContextManager = __commonJS((exports) => {
|
|
|
13368
13368
|
active() {
|
|
13369
13369
|
return this._asyncLocalStorage.getStore() ?? api_1.ROOT_CONTEXT;
|
|
13370
13370
|
}
|
|
13371
|
-
with(
|
|
13371
|
+
with(context7, fn, thisArg, ...args) {
|
|
13372
13372
|
const cb = thisArg == null ? fn : fn.bind(thisArg);
|
|
13373
|
-
return this._asyncLocalStorage.run(
|
|
13373
|
+
return this._asyncLocalStorage.run(context7, cb, ...args);
|
|
13374
13374
|
}
|
|
13375
13375
|
enable() {
|
|
13376
13376
|
return this;
|
|
@@ -21778,7 +21778,7 @@ var require_utils20 = __commonJS((exports) => {
|
|
|
21778
21778
|
var types_1 = require_types3();
|
|
21779
21779
|
var AttributeNames_1 = require_AttributeNames7();
|
|
21780
21780
|
var semantic_conventions_1 = require_src2();
|
|
21781
|
-
var getMiddlewareMetadata = (
|
|
21781
|
+
var getMiddlewareMetadata = (context12, layer, isRouter, layerPath) => {
|
|
21782
21782
|
if (isRouter) {
|
|
21783
21783
|
return {
|
|
21784
21784
|
attributes: {
|
|
@@ -21786,7 +21786,7 @@ var require_utils20 = __commonJS((exports) => {
|
|
|
21786
21786
|
[AttributeNames_1.AttributeNames.KOA_TYPE]: types_1.KoaLayerType.ROUTER,
|
|
21787
21787
|
[semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: layerPath?.toString()
|
|
21788
21788
|
},
|
|
21789
|
-
name:
|
|
21789
|
+
name: context12._matchedRouteName || `router - ${layerPath}`
|
|
21790
21790
|
};
|
|
21791
21791
|
} else {
|
|
21792
21792
|
return {
|
|
@@ -21882,23 +21882,23 @@ var require_instrumentation17 = __commonJS((exports) => {
|
|
|
21882
21882
|
}
|
|
21883
21883
|
middlewareLayer[internal_types_1.kLayerPatched] = true;
|
|
21884
21884
|
api2.diag.debug("patching Koa middleware layer");
|
|
21885
|
-
return async (
|
|
21885
|
+
return async (context12, next) => {
|
|
21886
21886
|
const parent = api2.trace.getSpan(api2.context.active());
|
|
21887
21887
|
if (parent === undefined) {
|
|
21888
|
-
return middlewareLayer(
|
|
21888
|
+
return middlewareLayer(context12, next);
|
|
21889
21889
|
}
|
|
21890
|
-
const metadata = (0, utils_1.getMiddlewareMetadata)(
|
|
21890
|
+
const metadata = (0, utils_1.getMiddlewareMetadata)(context12, middlewareLayer, isRouter, layerPath);
|
|
21891
21891
|
const span = this.tracer.startSpan(metadata.name, {
|
|
21892
21892
|
attributes: metadata.attributes
|
|
21893
21893
|
});
|
|
21894
21894
|
const rpcMetadata = (0, core_1.getRPCMetadata)(api2.context.active());
|
|
21895
|
-
if (rpcMetadata?.type === core_1.RPCType.HTTP &&
|
|
21896
|
-
rpcMetadata.route =
|
|
21895
|
+
if (rpcMetadata?.type === core_1.RPCType.HTTP && context12._matchedRoute) {
|
|
21896
|
+
rpcMetadata.route = context12._matchedRoute.toString();
|
|
21897
21897
|
}
|
|
21898
21898
|
const { requestHook: requestHook2 } = this.getConfig();
|
|
21899
21899
|
if (requestHook2) {
|
|
21900
21900
|
(0, instrumentation_1.safeExecuteInTheMiddle)(() => requestHook2(span, {
|
|
21901
|
-
context:
|
|
21901
|
+
context: context12,
|
|
21902
21902
|
middlewareLayer,
|
|
21903
21903
|
layerType
|
|
21904
21904
|
}), (e) => {
|
|
@@ -21910,7 +21910,7 @@ var require_instrumentation17 = __commonJS((exports) => {
|
|
|
21910
21910
|
const newContext = api2.trace.setSpan(api2.context.active(), span);
|
|
21911
21911
|
return api2.context.with(newContext, async () => {
|
|
21912
21912
|
try {
|
|
21913
|
-
return await middlewareLayer(
|
|
21913
|
+
return await middlewareLayer(context12, next);
|
|
21914
21914
|
} catch (err) {
|
|
21915
21915
|
span.recordException(err);
|
|
21916
21916
|
throw err;
|
|
@@ -22615,16 +22615,16 @@ var require_utils23 = __commonJS((exports) => {
|
|
|
22615
22615
|
return attributes;
|
|
22616
22616
|
};
|
|
22617
22617
|
exports.getConnectionAttributesFromUrl = getConnectionAttributesFromUrl;
|
|
22618
|
-
var markConfirmChannelTracing = (
|
|
22619
|
-
return
|
|
22618
|
+
var markConfirmChannelTracing = (context12) => {
|
|
22619
|
+
return context12.setValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY, true);
|
|
22620
22620
|
};
|
|
22621
22621
|
exports.markConfirmChannelTracing = markConfirmChannelTracing;
|
|
22622
|
-
var unmarkConfirmChannelTracing = (
|
|
22623
|
-
return
|
|
22622
|
+
var unmarkConfirmChannelTracing = (context12) => {
|
|
22623
|
+
return context12.deleteValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY);
|
|
22624
22624
|
};
|
|
22625
22625
|
exports.unmarkConfirmChannelTracing = unmarkConfirmChannelTracing;
|
|
22626
|
-
var isConfirmChannelTracing = (
|
|
22627
|
-
return
|
|
22626
|
+
var isConfirmChannelTracing = (context12) => {
|
|
22627
|
+
return context12.getValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY) === true;
|
|
22628
22628
|
};
|
|
22629
22629
|
exports.isConfirmChannelTracing = isConfirmChannelTracing;
|
|
22630
22630
|
});
|
|
@@ -28796,7 +28796,7 @@ import express30 from "express";
|
|
|
28796
28796
|
// package.json
|
|
28797
28797
|
var package_default = {
|
|
28798
28798
|
name: "@elizaos/server",
|
|
28799
|
-
version: "1.6.1
|
|
28799
|
+
version: "1.6.1",
|
|
28800
28800
|
description: "ElizaOS Server - Core server infrastructure for ElizaOS agents",
|
|
28801
28801
|
publishConfig: {
|
|
28802
28802
|
access: "public",
|
|
@@ -30343,7 +30343,7 @@ async function loadCharacters(charactersArg) {
|
|
|
30343
30343
|
}
|
|
30344
30344
|
|
|
30345
30345
|
// ../../node_modules/@sentry/node/build/esm/integrations/http.js
|
|
30346
|
-
var
|
|
30346
|
+
var import_api10 = __toESM(require_src(), 1);
|
|
30347
30347
|
var import_instrumentation_http = __toESM(require_src7(), 1);
|
|
30348
30348
|
|
|
30349
30349
|
// ../../node_modules/@sentry/core/build/esm/debug-build.js
|
|
@@ -30353,7 +30353,7 @@ var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
|
30353
30353
|
var GLOBAL_OBJ = globalThis;
|
|
30354
30354
|
|
|
30355
30355
|
// ../../node_modules/@sentry/core/build/esm/utils/version.js
|
|
30356
|
-
var SDK_VERSION = "10.
|
|
30356
|
+
var SDK_VERSION = "10.17.0";
|
|
30357
30357
|
|
|
30358
30358
|
// ../../node_modules/@sentry/core/build/esm/carrier.js
|
|
30359
30359
|
function getMainCarrier() {
|
|
@@ -35870,7 +35870,7 @@ function processGenerateSpan(span, name, attributes) {
|
|
|
35870
35870
|
span.setAttribute("ai.pipeline.name", nameWthoutAi);
|
|
35871
35871
|
span.updateName(nameWthoutAi);
|
|
35872
35872
|
const functionId = attributes[AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE];
|
|
35873
|
-
if (functionId && typeof functionId === "string"
|
|
35873
|
+
if (functionId && typeof functionId === "string") {
|
|
35874
35874
|
span.updateName(`${nameWthoutAi} ${functionId}`);
|
|
35875
35875
|
span.setAttribute("gen_ai.function_id", functionId);
|
|
35876
35876
|
}
|
|
@@ -37245,9 +37245,6 @@ class LRUMap {
|
|
|
37245
37245
|
return values;
|
|
37246
37246
|
}
|
|
37247
37247
|
}
|
|
37248
|
-
// ../../node_modules/@sentry/node-core/build/esm/debug-build.js
|
|
37249
|
-
var DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
37250
|
-
|
|
37251
37248
|
// ../../node_modules/@sentry/node-core/build/esm/otel/instrument.js
|
|
37252
37249
|
var import_instrumentation = __toESM(require_src6(), 1);
|
|
37253
37250
|
var INSTRUMENTED = {};
|
|
@@ -37317,76 +37314,85 @@ function hasWrap(instrumentation) {
|
|
|
37317
37314
|
return typeof instrumentation["_wrap"] === "function";
|
|
37318
37315
|
}
|
|
37319
37316
|
|
|
37320
|
-
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/
|
|
37321
|
-
var
|
|
37322
|
-
|
|
37323
|
-
var import_instrumentation2 = __toESM(require_src6(), 1);
|
|
37324
|
-
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
37317
|
+
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/httpServerIntegration.js
|
|
37318
|
+
var import_api2 = __toESM(require_src(), 1);
|
|
37319
|
+
import { subscribe } from "node:diagnostics_channel";
|
|
37325
37320
|
|
|
37326
|
-
// ../../node_modules/@sentry/node-core/build/esm/
|
|
37327
|
-
|
|
37328
|
-
const protocol = requestOptions.protocol || "";
|
|
37329
|
-
const hostname = requestOptions.hostname || requestOptions.host || "";
|
|
37330
|
-
const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname) ? "" : `:${requestOptions.port}`;
|
|
37331
|
-
const path7 = requestOptions.path ? requestOptions.path : "/";
|
|
37332
|
-
return `${protocol}//${hostname}${port}${path7}`;
|
|
37333
|
-
}
|
|
37321
|
+
// ../../node_modules/@sentry/node-core/build/esm/debug-build.js
|
|
37322
|
+
var DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
37334
37323
|
|
|
37335
37324
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/constants.js
|
|
37336
37325
|
var INSTRUMENTATION_NAME = "@sentry/instrumentation-http";
|
|
37337
37326
|
var MAX_BODY_BYTE_LENGTH = 1024 * 1024;
|
|
37338
37327
|
|
|
37339
|
-
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/
|
|
37340
|
-
var import_api2 = __toESM(require_src(), 1);
|
|
37341
|
-
var import_core34 = __toESM(require_src3(), 1);
|
|
37342
|
-
var import_semantic_conventions = __toESM(require_src2(), 1);
|
|
37343
|
-
import { errorMonitor } from "events";
|
|
37328
|
+
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/httpServerIntegration.js
|
|
37344
37329
|
var HTTP_SERVER_INSTRUMENTED_KEY = import_api2.createContextKey("sentry_http_server_instrumented");
|
|
37330
|
+
var INTEGRATION_NAME6 = "Http.Server";
|
|
37345
37331
|
var clientToRequestSessionAggregatesMap = new Map;
|
|
37346
37332
|
var wrappedEmitFns = new WeakSet;
|
|
37333
|
+
function addStartSpanCallback(request, callback) {
|
|
37334
|
+
addNonEnumerableProperty(request, "_startSpanCallback", new WeakRef(callback));
|
|
37335
|
+
}
|
|
37336
|
+
var _httpServerIntegration = (options = {}) => {
|
|
37337
|
+
const _options = {
|
|
37338
|
+
sessions: options.sessions ?? true,
|
|
37339
|
+
sessionFlushingDelayMS: options.sessionFlushingDelayMS ?? 60000,
|
|
37340
|
+
maxRequestBodySize: options.maxRequestBodySize ?? "medium",
|
|
37341
|
+
ignoreRequestBody: options.ignoreRequestBody
|
|
37342
|
+
};
|
|
37343
|
+
return {
|
|
37344
|
+
name: INTEGRATION_NAME6,
|
|
37345
|
+
setupOnce() {
|
|
37346
|
+
const onHttpServerRequestStart = (_data) => {
|
|
37347
|
+
const data = _data;
|
|
37348
|
+
instrumentServer(data.server, _options);
|
|
37349
|
+
};
|
|
37350
|
+
subscribe("http.server.request.start", onHttpServerRequestStart);
|
|
37351
|
+
},
|
|
37352
|
+
afterAllSetup(client) {
|
|
37353
|
+
if (DEBUG_BUILD2 && client.getIntegrationByName("Http")) {
|
|
37354
|
+
debug.warn("It seems that you have manually added `httpServerIntegration` while `httpIntegration` is also present. Make sure to remove `httpServerIntegration` when adding `httpIntegration`.");
|
|
37355
|
+
}
|
|
37356
|
+
}
|
|
37357
|
+
};
|
|
37358
|
+
};
|
|
37359
|
+
var httpServerIntegration = _httpServerIntegration;
|
|
37347
37360
|
function instrumentServer(server, {
|
|
37348
|
-
|
|
37349
|
-
|
|
37350
|
-
|
|
37351
|
-
|
|
37352
|
-
spans,
|
|
37353
|
-
ignoreStaticAssets = true,
|
|
37354
|
-
sessionFlushingDelayMS,
|
|
37355
|
-
instrumentation,
|
|
37356
|
-
incomingRequestSpanHook
|
|
37361
|
+
ignoreRequestBody,
|
|
37362
|
+
maxRequestBodySize,
|
|
37363
|
+
sessions: sessions2,
|
|
37364
|
+
sessionFlushingDelayMS
|
|
37357
37365
|
}) {
|
|
37358
37366
|
const originalEmit = server.emit;
|
|
37359
37367
|
if (wrappedEmitFns.has(originalEmit)) {
|
|
37360
|
-
DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Incoming requests already instrumented, not instrumenting again...");
|
|
37361
37368
|
return;
|
|
37362
37369
|
}
|
|
37363
|
-
const { requestHook, responseHook, applyCustomAttributesOnSpan } = instrumentation ?? {};
|
|
37364
37370
|
const newEmit = new Proxy(originalEmit, {
|
|
37365
37371
|
apply(target, thisArg, args) {
|
|
37366
37372
|
if (args[0] !== "request") {
|
|
37367
37373
|
return target.apply(thisArg, args);
|
|
37368
37374
|
}
|
|
37369
|
-
|
|
37375
|
+
const client = getClient();
|
|
37376
|
+
if (import_api2.context.active().getValue(HTTP_SERVER_INSTRUMENTED_KEY) || !client) {
|
|
37370
37377
|
return target.apply(thisArg, args);
|
|
37371
37378
|
}
|
|
37372
|
-
DEBUG_BUILD2 && debug.log(
|
|
37373
|
-
const client = getClient();
|
|
37379
|
+
DEBUG_BUILD2 && debug.log(INTEGRATION_NAME6, "Handling incoming request");
|
|
37374
37380
|
const isolationScope = getIsolationScope().clone();
|
|
37375
37381
|
const request = args[1];
|
|
37376
37382
|
const response = args[2];
|
|
37377
37383
|
const normalizedRequest = httpRequestToRequestData(request);
|
|
37378
37384
|
const ipAddress = request.ip || request.socket?.remoteAddress;
|
|
37379
37385
|
const url = request.url || "/";
|
|
37380
|
-
if (
|
|
37381
|
-
patchRequestToCaptureBody(request, isolationScope,
|
|
37386
|
+
if (maxRequestBodySize !== "none" && !ignoreRequestBody?.(url, request)) {
|
|
37387
|
+
patchRequestToCaptureBody(request, isolationScope, maxRequestBodySize);
|
|
37382
37388
|
}
|
|
37383
37389
|
isolationScope.setSDKProcessingMetadata({ normalizedRequest, ipAddress });
|
|
37384
37390
|
const httpMethod = (request.method || "GET").toUpperCase();
|
|
37385
37391
|
const httpTargetWithoutQueryFragment = stripUrlQueryAndFragment(url);
|
|
37386
37392
|
const bestEffortTransactionName = `${httpMethod} ${httpTargetWithoutQueryFragment}`;
|
|
37387
37393
|
isolationScope.setTransactionName(bestEffortTransactionName);
|
|
37388
|
-
if (
|
|
37389
|
-
recordRequestSession({
|
|
37394
|
+
if (sessions2 && client) {
|
|
37395
|
+
recordRequestSession(client, {
|
|
37390
37396
|
requestIsolationScope: isolationScope,
|
|
37391
37397
|
response,
|
|
37392
37398
|
sessionFlushingDelayMS: sessionFlushingDelayMS ?? 60000
|
|
@@ -37396,79 +37402,12 @@ function instrumentServer(server, {
|
|
|
37396
37402
|
getCurrentScope().getPropagationContext().propagationSpanId = generateSpanId();
|
|
37397
37403
|
const ctx = import_api2.propagation.extract(import_api2.context.active(), normalizedRequest.headers).setValue(HTTP_SERVER_INSTRUMENTED_KEY, true);
|
|
37398
37404
|
return import_api2.context.with(ctx, () => {
|
|
37399
|
-
|
|
37400
|
-
|
|
37401
|
-
|
|
37402
|
-
|
|
37403
|
-
DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Skipping span creation for incoming request");
|
|
37404
|
-
return target.apply(thisArg, args);
|
|
37405
|
+
client.emit("httpServerRequest", request, response, normalizedRequest);
|
|
37406
|
+
const callback = request._startSpanCallback?.deref();
|
|
37407
|
+
if (callback) {
|
|
37408
|
+
return callback(() => target.apply(thisArg, args));
|
|
37405
37409
|
}
|
|
37406
|
-
|
|
37407
|
-
const urlObj = parseStringToURLObject(fullUrl);
|
|
37408
|
-
const headers = request.headers;
|
|
37409
|
-
const userAgent = headers["user-agent"];
|
|
37410
|
-
const ips = headers["x-forwarded-for"];
|
|
37411
|
-
const httpVersion = request.httpVersion;
|
|
37412
|
-
const host = headers.host;
|
|
37413
|
-
const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, "$1") || "localhost";
|
|
37414
|
-
const tracer = client.tracer;
|
|
37415
|
-
const scheme = fullUrl.startsWith("https") ? "https" : "http";
|
|
37416
|
-
const shouldSendDefaultPii = client?.getOptions().sendDefaultPii ?? false;
|
|
37417
|
-
const span = tracer.startSpan(bestEffortTransactionName, {
|
|
37418
|
-
kind: import_api2.SpanKind.SERVER,
|
|
37419
|
-
attributes: {
|
|
37420
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.server",
|
|
37421
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.http",
|
|
37422
|
-
"sentry.http.prefetch": isKnownPrefetchRequest(request) || undefined,
|
|
37423
|
-
"http.url": fullUrl,
|
|
37424
|
-
"http.method": httpMethod,
|
|
37425
|
-
"http.target": urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,
|
|
37426
|
-
"http.host": host,
|
|
37427
|
-
"net.host.name": hostname,
|
|
37428
|
-
"http.client_ip": typeof ips === "string" ? ips.split(",")[0] : undefined,
|
|
37429
|
-
"http.user_agent": userAgent,
|
|
37430
|
-
"http.scheme": scheme,
|
|
37431
|
-
"http.flavor": httpVersion,
|
|
37432
|
-
"net.transport": httpVersion?.toUpperCase() === "QUIC" ? "ip_udp" : "ip_tcp",
|
|
37433
|
-
...getRequestContentLengthAttribute(request),
|
|
37434
|
-
...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, shouldSendDefaultPii)
|
|
37435
|
-
}
|
|
37436
|
-
});
|
|
37437
|
-
requestHook?.(span, request);
|
|
37438
|
-
responseHook?.(span, response);
|
|
37439
|
-
applyCustomAttributesOnSpan?.(span, request, response);
|
|
37440
|
-
incomingRequestSpanHook?.(span, request, response);
|
|
37441
|
-
const rpcMetadata = {
|
|
37442
|
-
type: import_core34.RPCType.HTTP,
|
|
37443
|
-
span
|
|
37444
|
-
};
|
|
37445
|
-
import_api2.context.with(import_core34.setRPCMetadata(import_api2.trace.setSpan(import_api2.context.active(), span), rpcMetadata), () => {
|
|
37446
|
-
import_api2.context.bind(import_api2.context.active(), request);
|
|
37447
|
-
import_api2.context.bind(import_api2.context.active(), response);
|
|
37448
|
-
let isEnded = false;
|
|
37449
|
-
function endSpan(status) {
|
|
37450
|
-
if (isEnded) {
|
|
37451
|
-
return;
|
|
37452
|
-
}
|
|
37453
|
-
isEnded = true;
|
|
37454
|
-
const newAttributes = getIncomingRequestAttributesOnResponse(request, response);
|
|
37455
|
-
span.setAttributes(newAttributes);
|
|
37456
|
-
span.setStatus(status);
|
|
37457
|
-
span.end();
|
|
37458
|
-
const route = newAttributes["http.route"];
|
|
37459
|
-
if (route) {
|
|
37460
|
-
getIsolationScope().setTransactionName(`${request.method?.toUpperCase() || "GET"} ${route}`);
|
|
37461
|
-
}
|
|
37462
|
-
}
|
|
37463
|
-
response.on("close", () => {
|
|
37464
|
-
endSpan(getSpanStatusFromHttpCode(response.statusCode));
|
|
37465
|
-
});
|
|
37466
|
-
response.on(errorMonitor, () => {
|
|
37467
|
-
const httpStatus = getSpanStatusFromHttpCode(response.statusCode);
|
|
37468
|
-
endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });
|
|
37469
|
-
});
|
|
37470
|
-
return target.apply(thisArg, args);
|
|
37471
|
-
});
|
|
37410
|
+
return target.apply(thisArg, args);
|
|
37472
37411
|
});
|
|
37473
37412
|
});
|
|
37474
37413
|
}
|
|
@@ -37476,7 +37415,7 @@ function instrumentServer(server, {
|
|
|
37476
37415
|
wrappedEmitFns.add(newEmit);
|
|
37477
37416
|
server.emit = newEmit;
|
|
37478
37417
|
}
|
|
37479
|
-
function recordRequestSession({
|
|
37418
|
+
function recordRequestSession(client, {
|
|
37480
37419
|
requestIsolationScope,
|
|
37481
37420
|
response,
|
|
37482
37421
|
sessionFlushingDelayMS
|
|
@@ -37485,7 +37424,6 @@ function recordRequestSession({
|
|
|
37485
37424
|
requestSession: { status: "ok" }
|
|
37486
37425
|
});
|
|
37487
37426
|
response.once("close", () => {
|
|
37488
|
-
const client = getClient();
|
|
37489
37427
|
const requestSession = requestIsolationScope.getScopeData().sdkProcessingMetadata.requestSession;
|
|
37490
37428
|
if (client && requestSession) {
|
|
37491
37429
|
DEBUG_BUILD2 && debug.log(`Recorded request session with status: ${requestSession.status}`);
|
|
@@ -37528,7 +37466,7 @@ function recordRequestSession({
|
|
|
37528
37466
|
function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySize) {
|
|
37529
37467
|
let bodyByteLength = 0;
|
|
37530
37468
|
const chunks = [];
|
|
37531
|
-
DEBUG_BUILD2 && debug.log(
|
|
37469
|
+
DEBUG_BUILD2 && debug.log(INTEGRATION_NAME6, "Patching request.on");
|
|
37532
37470
|
const callbackMap = new WeakMap;
|
|
37533
37471
|
const maxBodySize = maxIncomingRequestBodySize === "small" ? 1000 : maxIncomingRequestBodySize === "medium" ? 1e4 : MAX_BODY_BYTE_LENGTH;
|
|
37534
37472
|
try {
|
|
@@ -37536,7 +37474,7 @@ function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySi
|
|
|
37536
37474
|
apply: (target, thisArg, args) => {
|
|
37537
37475
|
const [event, listener, ...restArgs] = args;
|
|
37538
37476
|
if (event === "data") {
|
|
37539
|
-
DEBUG_BUILD2 && debug.log(
|
|
37477
|
+
DEBUG_BUILD2 && debug.log(INTEGRATION_NAME6, `Handling request.on("data") with maximum body size of ${maxBodySize}b`);
|
|
37540
37478
|
const callback = new Proxy(listener, {
|
|
37541
37479
|
apply: (target2, thisArg2, args2) => {
|
|
37542
37480
|
try {
|
|
@@ -37546,10 +37484,10 @@ function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySi
|
|
|
37546
37484
|
chunks.push(bufferifiedChunk);
|
|
37547
37485
|
bodyByteLength += bufferifiedChunk.byteLength;
|
|
37548
37486
|
} else if (DEBUG_BUILD2) {
|
|
37549
|
-
debug.log(
|
|
37487
|
+
debug.log(INTEGRATION_NAME6, `Dropping request body chunk because maximum body length of ${maxBodySize}b is exceeded.`);
|
|
37550
37488
|
}
|
|
37551
37489
|
} catch (err) {
|
|
37552
|
-
DEBUG_BUILD2 && debug.error(
|
|
37490
|
+
DEBUG_BUILD2 && debug.error(INTEGRATION_NAME6, "Encountered error while storing body chunk.");
|
|
37553
37491
|
}
|
|
37554
37492
|
return Reflect.apply(target2, thisArg2, args2);
|
|
37555
37493
|
}
|
|
@@ -37583,15 +37521,182 @@ function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySi
|
|
|
37583
37521
|
}
|
|
37584
37522
|
} catch (error2) {
|
|
37585
37523
|
if (DEBUG_BUILD2) {
|
|
37586
|
-
debug.error(
|
|
37524
|
+
debug.error(INTEGRATION_NAME6, "Error building captured request body", error2);
|
|
37587
37525
|
}
|
|
37588
37526
|
}
|
|
37589
37527
|
});
|
|
37590
37528
|
} catch (error2) {
|
|
37591
37529
|
if (DEBUG_BUILD2) {
|
|
37592
|
-
debug.error(
|
|
37530
|
+
debug.error(INTEGRATION_NAME6, "Error patching request to capture body", error2);
|
|
37531
|
+
}
|
|
37532
|
+
}
|
|
37533
|
+
}
|
|
37534
|
+
|
|
37535
|
+
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/httpServerSpansIntegration.js
|
|
37536
|
+
var import_api3 = __toESM(require_src(), 1);
|
|
37537
|
+
var import_core35 = __toESM(require_src3(), 1);
|
|
37538
|
+
var import_semantic_conventions = __toESM(require_src2(), 1);
|
|
37539
|
+
import { errorMonitor } from "node:events";
|
|
37540
|
+
var INTEGRATION_NAME7 = "Http.ServerSpans";
|
|
37541
|
+
var _httpServerSpansIntegration = (options = {}) => {
|
|
37542
|
+
const ignoreStaticAssets = options.ignoreStaticAssets ?? true;
|
|
37543
|
+
const ignoreIncomingRequests = options.ignoreIncomingRequests;
|
|
37544
|
+
const ignoreStatusCodes = options.ignoreStatusCodes ?? [
|
|
37545
|
+
[401, 404],
|
|
37546
|
+
[301, 303],
|
|
37547
|
+
[305, 399]
|
|
37548
|
+
];
|
|
37549
|
+
const { onSpanCreated } = options;
|
|
37550
|
+
const { requestHook, responseHook, applyCustomAttributesOnSpan } = options.instrumentation ?? {};
|
|
37551
|
+
return {
|
|
37552
|
+
name: INTEGRATION_NAME7,
|
|
37553
|
+
setup(client) {
|
|
37554
|
+
if (typeof __SENTRY_TRACING__ !== "undefined" && !__SENTRY_TRACING__) {
|
|
37555
|
+
return;
|
|
37556
|
+
}
|
|
37557
|
+
client.on("httpServerRequest", (_request, _response, normalizedRequest) => {
|
|
37558
|
+
const request = _request;
|
|
37559
|
+
const response = _response;
|
|
37560
|
+
const startSpan2 = (next) => {
|
|
37561
|
+
if (shouldIgnoreSpansForIncomingRequest(request, {
|
|
37562
|
+
ignoreStaticAssets,
|
|
37563
|
+
ignoreIncomingRequests
|
|
37564
|
+
})) {
|
|
37565
|
+
DEBUG_BUILD2 && debug.log(INTEGRATION_NAME7, "Skipping span creation for incoming request", request.url);
|
|
37566
|
+
return next();
|
|
37567
|
+
}
|
|
37568
|
+
const fullUrl = normalizedRequest.url || request.url || "/";
|
|
37569
|
+
const urlObj = parseStringToURLObject(fullUrl);
|
|
37570
|
+
const headers = request.headers;
|
|
37571
|
+
const userAgent = headers["user-agent"];
|
|
37572
|
+
const ips = headers["x-forwarded-for"];
|
|
37573
|
+
const httpVersion = request.httpVersion;
|
|
37574
|
+
const host = headers.host;
|
|
37575
|
+
const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, "$1") || "localhost";
|
|
37576
|
+
const tracer = client.tracer;
|
|
37577
|
+
const scheme = fullUrl.startsWith("https") ? "https" : "http";
|
|
37578
|
+
const method = normalizedRequest.method || request.method?.toUpperCase() || "GET";
|
|
37579
|
+
const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);
|
|
37580
|
+
const bestEffortTransactionName = `${method} ${httpTargetWithoutQueryFragment}`;
|
|
37581
|
+
const shouldSendDefaultPii = client.getOptions().sendDefaultPii ?? false;
|
|
37582
|
+
const span = tracer.startSpan(bestEffortTransactionName, {
|
|
37583
|
+
kind: import_api3.SpanKind.SERVER,
|
|
37584
|
+
attributes: {
|
|
37585
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.server",
|
|
37586
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.http",
|
|
37587
|
+
"sentry.http.prefetch": isKnownPrefetchRequest(request) || undefined,
|
|
37588
|
+
"http.url": fullUrl,
|
|
37589
|
+
"http.method": normalizedRequest.method,
|
|
37590
|
+
"http.target": urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,
|
|
37591
|
+
"http.host": host,
|
|
37592
|
+
"net.host.name": hostname,
|
|
37593
|
+
"http.client_ip": typeof ips === "string" ? ips.split(",")[0] : undefined,
|
|
37594
|
+
"http.user_agent": userAgent,
|
|
37595
|
+
"http.scheme": scheme,
|
|
37596
|
+
"http.flavor": httpVersion,
|
|
37597
|
+
"net.transport": httpVersion?.toUpperCase() === "QUIC" ? "ip_udp" : "ip_tcp",
|
|
37598
|
+
...getRequestContentLengthAttribute(request),
|
|
37599
|
+
...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, shouldSendDefaultPii)
|
|
37600
|
+
}
|
|
37601
|
+
});
|
|
37602
|
+
requestHook?.(span, request);
|
|
37603
|
+
responseHook?.(span, response);
|
|
37604
|
+
applyCustomAttributesOnSpan?.(span, request, response);
|
|
37605
|
+
onSpanCreated?.(span, request, response);
|
|
37606
|
+
const rpcMetadata = {
|
|
37607
|
+
type: import_core35.RPCType.HTTP,
|
|
37608
|
+
span
|
|
37609
|
+
};
|
|
37610
|
+
return import_api3.context.with(import_core35.setRPCMetadata(import_api3.trace.setSpan(import_api3.context.active(), span), rpcMetadata), () => {
|
|
37611
|
+
import_api3.context.bind(import_api3.context.active(), request);
|
|
37612
|
+
import_api3.context.bind(import_api3.context.active(), response);
|
|
37613
|
+
let isEnded = false;
|
|
37614
|
+
function endSpan(status) {
|
|
37615
|
+
if (isEnded) {
|
|
37616
|
+
return;
|
|
37617
|
+
}
|
|
37618
|
+
isEnded = true;
|
|
37619
|
+
const newAttributes = getIncomingRequestAttributesOnResponse(request, response);
|
|
37620
|
+
span.setAttributes(newAttributes);
|
|
37621
|
+
span.setStatus(status);
|
|
37622
|
+
span.end();
|
|
37623
|
+
const route = newAttributes["http.route"];
|
|
37624
|
+
if (route) {
|
|
37625
|
+
getIsolationScope().setTransactionName(`${request.method?.toUpperCase() || "GET"} ${route}`);
|
|
37626
|
+
}
|
|
37627
|
+
}
|
|
37628
|
+
response.on("close", () => {
|
|
37629
|
+
endSpan(getSpanStatusFromHttpCode(response.statusCode));
|
|
37630
|
+
});
|
|
37631
|
+
response.on(errorMonitor, () => {
|
|
37632
|
+
const httpStatus = getSpanStatusFromHttpCode(response.statusCode);
|
|
37633
|
+
endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });
|
|
37634
|
+
});
|
|
37635
|
+
return next();
|
|
37636
|
+
});
|
|
37637
|
+
};
|
|
37638
|
+
addStartSpanCallback(request, startSpan2);
|
|
37639
|
+
});
|
|
37640
|
+
},
|
|
37641
|
+
processEvent(event) {
|
|
37642
|
+
if (event.type === "transaction") {
|
|
37643
|
+
const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
|
|
37644
|
+
if (typeof statusCode === "number") {
|
|
37645
|
+
const shouldDrop = shouldFilterStatusCode(statusCode, ignoreStatusCodes);
|
|
37646
|
+
if (shouldDrop) {
|
|
37647
|
+
DEBUG_BUILD2 && debug.log("Dropping transaction due to status code", statusCode);
|
|
37648
|
+
return null;
|
|
37649
|
+
}
|
|
37650
|
+
}
|
|
37651
|
+
}
|
|
37652
|
+
return event;
|
|
37653
|
+
},
|
|
37654
|
+
afterAllSetup(client) {
|
|
37655
|
+
if (!DEBUG_BUILD2) {
|
|
37656
|
+
return;
|
|
37657
|
+
}
|
|
37658
|
+
if (client.getIntegrationByName("Http")) {
|
|
37659
|
+
debug.warn("It seems that you have manually added `httpServerSpansIntergation` while `httpIntegration` is also present. Make sure to remove `httpIntegration` when adding `httpServerSpansIntegration`.");
|
|
37660
|
+
}
|
|
37661
|
+
if (!client.getIntegrationByName("Http.Server")) {
|
|
37662
|
+
debug.error("It seems that you have manually added `httpServerSpansIntergation` without adding `httpServerIntegration`. This is a requiement for spans to be created - please add the `httpServerIntegration` integration.");
|
|
37663
|
+
}
|
|
37593
37664
|
}
|
|
37665
|
+
};
|
|
37666
|
+
};
|
|
37667
|
+
var httpServerSpansIntegration = _httpServerSpansIntegration;
|
|
37668
|
+
function isKnownPrefetchRequest(req) {
|
|
37669
|
+
return req.headers["next-router-prefetch"] === "1";
|
|
37670
|
+
}
|
|
37671
|
+
function isStaticAssetRequest(urlPath) {
|
|
37672
|
+
const path7 = stripUrlQueryAndFragment(urlPath);
|
|
37673
|
+
if (path7.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
|
|
37674
|
+
return true;
|
|
37594
37675
|
}
|
|
37676
|
+
if (path7.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
|
|
37677
|
+
return true;
|
|
37678
|
+
}
|
|
37679
|
+
return false;
|
|
37680
|
+
}
|
|
37681
|
+
function shouldIgnoreSpansForIncomingRequest(request, {
|
|
37682
|
+
ignoreStaticAssets,
|
|
37683
|
+
ignoreIncomingRequests
|
|
37684
|
+
}) {
|
|
37685
|
+
if (import_core35.isTracingSuppressed(import_api3.context.active())) {
|
|
37686
|
+
return true;
|
|
37687
|
+
}
|
|
37688
|
+
const urlPath = request.url;
|
|
37689
|
+
const method = request.method?.toUpperCase();
|
|
37690
|
+
if (method === "OPTIONS" || method === "HEAD" || !urlPath) {
|
|
37691
|
+
return true;
|
|
37692
|
+
}
|
|
37693
|
+
if (ignoreStaticAssets && method === "GET" && isStaticAssetRequest(urlPath)) {
|
|
37694
|
+
return true;
|
|
37695
|
+
}
|
|
37696
|
+
if (ignoreIncomingRequests?.(urlPath, request)) {
|
|
37697
|
+
return true;
|
|
37698
|
+
}
|
|
37699
|
+
return false;
|
|
37595
37700
|
}
|
|
37596
37701
|
function getRequestContentLengthAttribute(request) {
|
|
37597
37702
|
const length = getContentLength(request.headers);
|
|
@@ -37629,7 +37734,7 @@ function getIncomingRequestAttributesOnResponse(request, response) {
|
|
|
37629
37734
|
[import_semantic_conventions.SEMATTRS_HTTP_STATUS_CODE]: statusCode,
|
|
37630
37735
|
"http.status_text": statusMessage?.toUpperCase()
|
|
37631
37736
|
};
|
|
37632
|
-
const rpcMetadata =
|
|
37737
|
+
const rpcMetadata = import_core35.getRPCMetadata(import_api3.context.active());
|
|
37633
37738
|
if (socket) {
|
|
37634
37739
|
const { localAddress, localPort, remoteAddress, remotePort } = socket;
|
|
37635
37740
|
newAttributes[import_semantic_conventions.SEMATTRS_NET_HOST_IP] = localAddress;
|
|
@@ -37639,51 +37744,42 @@ function getIncomingRequestAttributesOnResponse(request, response) {
|
|
|
37639
37744
|
}
|
|
37640
37745
|
newAttributes[import_semantic_conventions.SEMATTRS_HTTP_STATUS_CODE] = statusCode;
|
|
37641
37746
|
newAttributes["http.status_text"] = (statusMessage || "").toUpperCase();
|
|
37642
|
-
if (rpcMetadata?.type ===
|
|
37747
|
+
if (rpcMetadata?.type === import_core35.RPCType.HTTP && rpcMetadata.route !== undefined) {
|
|
37643
37748
|
const routeName = rpcMetadata.route;
|
|
37644
37749
|
newAttributes[import_semantic_conventions.ATTR_HTTP_ROUTE] = routeName;
|
|
37645
37750
|
}
|
|
37646
37751
|
return newAttributes;
|
|
37647
37752
|
}
|
|
37648
|
-
function
|
|
37649
|
-
return
|
|
37650
|
-
|
|
37651
|
-
|
|
37652
|
-
|
|
37653
|
-
|
|
37654
|
-
return
|
|
37655
|
-
}
|
|
37656
|
-
if (path7.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
|
|
37657
|
-
return true;
|
|
37658
|
-
}
|
|
37659
|
-
return false;
|
|
37753
|
+
function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
|
|
37754
|
+
return dropForStatusCodes.some((code) => {
|
|
37755
|
+
if (typeof code === "number") {
|
|
37756
|
+
return code === statusCode;
|
|
37757
|
+
}
|
|
37758
|
+
const [min, max] = code;
|
|
37759
|
+
return statusCode >= min && statusCode <= max;
|
|
37760
|
+
});
|
|
37660
37761
|
}
|
|
37661
|
-
|
|
37662
|
-
|
|
37663
|
-
|
|
37664
|
-
|
|
37665
|
-
|
|
37666
|
-
|
|
37667
|
-
|
|
37668
|
-
|
|
37669
|
-
|
|
37670
|
-
|
|
37671
|
-
|
|
37672
|
-
}
|
|
37673
|
-
|
|
37674
|
-
|
|
37675
|
-
}
|
|
37676
|
-
if (ignoreSpansForIncomingRequests?.(urlPath, request)) {
|
|
37677
|
-
return true;
|
|
37678
|
-
}
|
|
37679
|
-
return false;
|
|
37762
|
+
|
|
37763
|
+
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/SentryHttpInstrumentation.js
|
|
37764
|
+
var import_api5 = __toESM(require_src(), 1);
|
|
37765
|
+
var import_core41 = __toESM(require_src3(), 1);
|
|
37766
|
+
var import_instrumentation2 = __toESM(require_src6(), 1);
|
|
37767
|
+
import { subscribe as subscribe2, unsubscribe } from "node:diagnostics_channel";
|
|
37768
|
+
|
|
37769
|
+
// ../../node_modules/@sentry/node-core/build/esm/utils/getRequestUrl.js
|
|
37770
|
+
function getRequestUrl(requestOptions) {
|
|
37771
|
+
const protocol = requestOptions.protocol || "";
|
|
37772
|
+
const hostname = requestOptions.hostname || requestOptions.host || "";
|
|
37773
|
+
const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname) ? "" : `:${requestOptions.port}`;
|
|
37774
|
+
const path7 = requestOptions.path ? requestOptions.path : "/";
|
|
37775
|
+
return `${protocol}//${hostname}${port}${path7}`;
|
|
37680
37776
|
}
|
|
37681
37777
|
|
|
37682
37778
|
// ../../node_modules/@sentry/opentelemetry/build/esm/index.js
|
|
37683
37779
|
var import_semantic_conventions2 = __toESM(require_src2(), 1);
|
|
37684
37780
|
var api = __toESM(require_src(), 1);
|
|
37685
|
-
var
|
|
37686
|
-
var
|
|
37781
|
+
var import_api4 = __toESM(require_src(), 1);
|
|
37782
|
+
var import_core38 = __toESM(require_src3(), 1);
|
|
37687
37783
|
var import_sdk_trace_base = __toESM(require_src9(), 1);
|
|
37688
37784
|
var SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE = "sentry.parentIsRemote";
|
|
37689
37785
|
var SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION = "sentry.graphql.operation";
|
|
@@ -37741,7 +37837,7 @@ function getSpanKind(span) {
|
|
|
37741
37837
|
if (spanHasKind(span)) {
|
|
37742
37838
|
return span.kind;
|
|
37743
37839
|
}
|
|
37744
|
-
return
|
|
37840
|
+
return import_api4.SpanKind.INTERNAL;
|
|
37745
37841
|
}
|
|
37746
37842
|
var SENTRY_TRACE_HEADER = "sentry-trace";
|
|
37747
37843
|
var SENTRY_BAGGAGE_HEADER = "baggage";
|
|
@@ -37750,19 +37846,19 @@ var SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING = "sentry.sampled_not_recording";
|
|
|
37750
37846
|
var SENTRY_TRACE_STATE_URL = "sentry.url";
|
|
37751
37847
|
var SENTRY_TRACE_STATE_SAMPLE_RAND = "sentry.sample_rand";
|
|
37752
37848
|
var SENTRY_TRACE_STATE_SAMPLE_RATE = "sentry.sample_rate";
|
|
37753
|
-
var SENTRY_SCOPES_CONTEXT_KEY =
|
|
37754
|
-
var SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY =
|
|
37755
|
-
var SENTRY_FORK_SET_SCOPE_CONTEXT_KEY =
|
|
37756
|
-
var SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY =
|
|
37849
|
+
var SENTRY_SCOPES_CONTEXT_KEY = import_api4.createContextKey("sentry_scopes");
|
|
37850
|
+
var SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY = import_api4.createContextKey("sentry_fork_isolation_scope");
|
|
37851
|
+
var SENTRY_FORK_SET_SCOPE_CONTEXT_KEY = import_api4.createContextKey("sentry_fork_set_scope");
|
|
37852
|
+
var SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY = import_api4.createContextKey("sentry_fork_set_isolation_scope");
|
|
37757
37853
|
var SCOPE_CONTEXT_FIELD = "_scopeContext";
|
|
37758
|
-
function getScopesFromContext(
|
|
37759
|
-
return
|
|
37854
|
+
function getScopesFromContext(context5) {
|
|
37855
|
+
return context5.getValue(SENTRY_SCOPES_CONTEXT_KEY);
|
|
37760
37856
|
}
|
|
37761
|
-
function setScopesOnContext(
|
|
37762
|
-
return
|
|
37857
|
+
function setScopesOnContext(context5, scopes) {
|
|
37858
|
+
return context5.setValue(SENTRY_SCOPES_CONTEXT_KEY, scopes);
|
|
37763
37859
|
}
|
|
37764
|
-
function setContextOnScope(scope,
|
|
37765
|
-
addNonEnumerableProperty(scope, SCOPE_CONTEXT_FIELD,
|
|
37860
|
+
function setContextOnScope(scope, context5) {
|
|
37861
|
+
addNonEnumerableProperty(scope, SCOPE_CONTEXT_FIELD, context5);
|
|
37766
37862
|
}
|
|
37767
37863
|
function getContextFromScope(scope) {
|
|
37768
37864
|
return scope[SCOPE_CONTEXT_FIELD];
|
|
@@ -37770,7 +37866,7 @@ function getContextFromScope(scope) {
|
|
|
37770
37866
|
function getSamplingDecision(spanContext) {
|
|
37771
37867
|
const { traceFlags, traceState } = spanContext;
|
|
37772
37868
|
const sampledNotRecording = traceState ? traceState.get(SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING) === "1" : false;
|
|
37773
|
-
if (traceFlags ===
|
|
37869
|
+
if (traceFlags === import_api4.TraceFlags.SAMPLED) {
|
|
37774
37870
|
return true;
|
|
37775
37871
|
}
|
|
37776
37872
|
if (sampledNotRecording) {
|
|
@@ -37845,10 +37941,10 @@ function descriptionForDbSystem({ attributes, name }) {
|
|
|
37845
37941
|
function descriptionForHttpMethod({ name, kind, attributes }, httpMethod) {
|
|
37846
37942
|
const opParts = ["http"];
|
|
37847
37943
|
switch (kind) {
|
|
37848
|
-
case
|
|
37944
|
+
case import_api4.SpanKind.CLIENT:
|
|
37849
37945
|
opParts.push("client");
|
|
37850
37946
|
break;
|
|
37851
|
-
case
|
|
37947
|
+
case import_api4.SpanKind.SERVER:
|
|
37852
37948
|
opParts.push("server");
|
|
37853
37949
|
break;
|
|
37854
37950
|
}
|
|
@@ -37873,7 +37969,7 @@ function descriptionForHttpMethod({ name, kind, attributes }, httpMethod) {
|
|
|
37873
37969
|
if (fragment) {
|
|
37874
37970
|
data["http.fragment"] = fragment;
|
|
37875
37971
|
}
|
|
37876
|
-
const isClientOrServerKind = kind ===
|
|
37972
|
+
const isClientOrServerKind = kind === import_api4.SpanKind.CLIENT || kind === import_api4.SpanKind.SERVER;
|
|
37877
37973
|
const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] || "manual";
|
|
37878
37974
|
const isManualSpan = !`${origin}`.startsWith("auto");
|
|
37879
37975
|
const alreadyHasCustomSource = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === "custom";
|
|
@@ -37909,7 +38005,7 @@ function getSanitizedUrl(attributes, kind) {
|
|
|
37909
38005
|
if (typeof httpRoute === "string") {
|
|
37910
38006
|
return { urlPath: httpRoute, url, query, fragment, hasRoute: true };
|
|
37911
38007
|
}
|
|
37912
|
-
if (kind ===
|
|
38008
|
+
if (kind === import_api4.SpanKind.SERVER && typeof httpTarget === "string") {
|
|
37913
38009
|
return { urlPath: stripUrlQueryAndFragment(httpTarget), url, query, fragment, hasRoute: false };
|
|
37914
38010
|
}
|
|
37915
38011
|
if (parsedUrl) {
|
|
@@ -37950,7 +38046,7 @@ function enhanceDscWithOpenTelemetryRootSpanName(client) {
|
|
|
37950
38046
|
});
|
|
37951
38047
|
}
|
|
37952
38048
|
function getActiveSpan2() {
|
|
37953
|
-
return
|
|
38049
|
+
return import_api4.trace.getActiveSpan();
|
|
37954
38050
|
}
|
|
37955
38051
|
var DEBUG_BUILD3 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
37956
38052
|
function makeTraceState({
|
|
@@ -37958,7 +38054,7 @@ function makeTraceState({
|
|
|
37958
38054
|
sampled
|
|
37959
38055
|
}) {
|
|
37960
38056
|
const dscString = dsc ? dynamicSamplingContextToSentryBaggageHeader(dsc) : undefined;
|
|
37961
|
-
const traceStateBase = new
|
|
38057
|
+
const traceStateBase = new import_core38.TraceState;
|
|
37962
38058
|
const traceStateWithDsc = dscString ? traceStateBase.set(SENTRY_TRACE_STATE_DSC, dscString) : traceStateBase;
|
|
37963
38059
|
return sampled === false ? traceStateWithDsc.set(SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING, "1") : traceStateWithDsc;
|
|
37964
38060
|
}
|
|
@@ -37970,18 +38066,18 @@ function setIsSetup(element) {
|
|
|
37970
38066
|
setupElements.add(element);
|
|
37971
38067
|
}
|
|
37972
38068
|
|
|
37973
|
-
class SentryPropagator extends
|
|
38069
|
+
class SentryPropagator extends import_core38.W3CBaggagePropagator {
|
|
37974
38070
|
constructor() {
|
|
37975
38071
|
super();
|
|
37976
38072
|
setIsSetup("SentryPropagator");
|
|
37977
38073
|
this._urlMatchesTargetsMap = new LRUMap(100);
|
|
37978
38074
|
}
|
|
37979
|
-
inject(
|
|
37980
|
-
if (
|
|
38075
|
+
inject(context5, carrier, setter) {
|
|
38076
|
+
if (import_core38.isTracingSuppressed(context5)) {
|
|
37981
38077
|
DEBUG_BUILD3 && debug.log("[Tracing] Not injecting trace data for url because tracing is suppressed.");
|
|
37982
38078
|
return;
|
|
37983
38079
|
}
|
|
37984
|
-
const activeSpan =
|
|
38080
|
+
const activeSpan = import_api4.trace.getSpan(context5);
|
|
37985
38081
|
const url = activeSpan && getCurrentURL(activeSpan);
|
|
37986
38082
|
const tracePropagationTargets = getClient()?.getOptions()?.tracePropagationTargets;
|
|
37987
38083
|
if (!shouldPropagateTraceForUrl(url, tracePropagationTargets, this._urlMatchesTargetsMap)) {
|
|
@@ -37989,8 +38085,8 @@ class SentryPropagator extends import_core37.W3CBaggagePropagator {
|
|
|
37989
38085
|
return;
|
|
37990
38086
|
}
|
|
37991
38087
|
const existingBaggageHeader = getExistingBaggage(carrier);
|
|
37992
|
-
let baggage =
|
|
37993
|
-
const { dynamicSamplingContext, traceId, spanId, sampled } = getInjectionData(
|
|
38088
|
+
let baggage = import_api4.propagation.getBaggage(context5) || import_api4.propagation.createBaggage({});
|
|
38089
|
+
const { dynamicSamplingContext, traceId, spanId, sampled } = getInjectionData(context5);
|
|
37994
38090
|
if (existingBaggageHeader) {
|
|
37995
38091
|
const baggageEntries = parseBaggageHeader(existingBaggageHeader);
|
|
37996
38092
|
if (baggageEntries) {
|
|
@@ -38007,16 +38103,16 @@ class SentryPropagator extends import_core37.W3CBaggagePropagator {
|
|
|
38007
38103
|
return b;
|
|
38008
38104
|
}, baggage);
|
|
38009
38105
|
}
|
|
38010
|
-
if (traceId && traceId !==
|
|
38106
|
+
if (traceId && traceId !== import_api4.INVALID_TRACEID) {
|
|
38011
38107
|
setter.set(carrier, SENTRY_TRACE_HEADER, generateSentryTraceHeader(traceId, spanId, sampled));
|
|
38012
38108
|
}
|
|
38013
|
-
super.inject(
|
|
38109
|
+
super.inject(import_api4.propagation.setBaggage(context5, baggage), carrier, setter);
|
|
38014
38110
|
}
|
|
38015
|
-
extract(
|
|
38111
|
+
extract(context5, carrier, getter) {
|
|
38016
38112
|
const maybeSentryTraceHeader = getter.get(carrier, SENTRY_TRACE_HEADER);
|
|
38017
38113
|
const baggage = getter.get(carrier, SENTRY_BAGGAGE_HEADER);
|
|
38018
38114
|
const sentryTrace = maybeSentryTraceHeader ? Array.isArray(maybeSentryTraceHeader) ? maybeSentryTraceHeader[0] : maybeSentryTraceHeader : undefined;
|
|
38019
|
-
return ensureScopesOnContext(getContextWithRemoteActiveSpan(
|
|
38115
|
+
return ensureScopesOnContext(getContextWithRemoteActiveSpan(context5, { sentryTrace, baggage }));
|
|
38020
38116
|
}
|
|
38021
38117
|
fields() {
|
|
38022
38118
|
return [SENTRY_TRACE_HEADER, SENTRY_BAGGAGE_HEADER];
|
|
@@ -38037,8 +38133,8 @@ function shouldPropagateTraceForUrl(url, tracePropagationTargets, decisionMap) {
|
|
|
38037
38133
|
DEBUG_BUILD3 && !decision && debug.log(NOT_PROPAGATED_MESSAGE, url);
|
|
38038
38134
|
return decision;
|
|
38039
38135
|
}
|
|
38040
|
-
function getInjectionData(
|
|
38041
|
-
const span =
|
|
38136
|
+
function getInjectionData(context5, options = {}) {
|
|
38137
|
+
const span = import_api4.trace.getSpan(context5);
|
|
38042
38138
|
if (span?.spanContext().isRemote) {
|
|
38043
38139
|
const spanContext = span.spanContext();
|
|
38044
38140
|
const dynamicSamplingContext2 = getDynamicSamplingContextFromSpan(span);
|
|
@@ -38059,7 +38155,7 @@ function getInjectionData(context4, options = {}) {
|
|
|
38059
38155
|
sampled: getSamplingDecision(spanContext)
|
|
38060
38156
|
};
|
|
38061
38157
|
}
|
|
38062
|
-
const scope = options.scope || getScopesFromContext(
|
|
38158
|
+
const scope = options.scope || getScopesFromContext(context5)?.scope || getCurrentScope();
|
|
38063
38159
|
const client = options.client || getClient();
|
|
38064
38160
|
const propagationContext = scope.getPropagationContext();
|
|
38065
38161
|
const dynamicSamplingContext = client ? getDynamicSamplingContextFromScope(client, scope) : undefined;
|
|
@@ -38084,11 +38180,11 @@ function getContextWithRemoteActiveSpan(ctx, { sentryTrace, baggage }) {
|
|
|
38084
38180
|
sampled,
|
|
38085
38181
|
dsc
|
|
38086
38182
|
});
|
|
38087
|
-
return
|
|
38183
|
+
return import_api4.trace.setSpanContext(ctx, spanContext);
|
|
38088
38184
|
}
|
|
38089
38185
|
function continueTraceAsRemoteSpan(ctx, options, callback) {
|
|
38090
38186
|
const ctxWithSpanContext = ensureScopesOnContext(getContextWithRemoteActiveSpan(ctx, options));
|
|
38091
|
-
return
|
|
38187
|
+
return import_api4.context.with(ctxWithSpanContext, callback);
|
|
38092
38188
|
}
|
|
38093
38189
|
function ensureScopesOnContext(ctx) {
|
|
38094
38190
|
const scopes = getScopesFromContext(ctx);
|
|
@@ -38132,7 +38228,7 @@ function generateRemoteSpanContext({
|
|
|
38132
38228
|
traceId,
|
|
38133
38229
|
spanId,
|
|
38134
38230
|
isRemote: true,
|
|
38135
|
-
traceFlags: sampled ?
|
|
38231
|
+
traceFlags: sampled ? import_api4.TraceFlags.SAMPLED : import_api4.TraceFlags.NONE,
|
|
38136
38232
|
traceState
|
|
38137
38233
|
};
|
|
38138
38234
|
return spanContext;
|
|
@@ -38143,13 +38239,13 @@ function startSpan2(options, callback) {
|
|
|
38143
38239
|
const wrapper = getActiveSpanWrapper2(customParentSpan);
|
|
38144
38240
|
return wrapper(() => {
|
|
38145
38241
|
const activeCtx = getContext(options.scope, options.forceTransaction);
|
|
38146
|
-
const shouldSkipSpan = options.onlyIfParent && !
|
|
38147
|
-
const ctx = shouldSkipSpan ?
|
|
38242
|
+
const shouldSkipSpan = options.onlyIfParent && !import_api4.trace.getSpan(activeCtx);
|
|
38243
|
+
const ctx = shouldSkipSpan ? import_core38.suppressTracing(activeCtx) : activeCtx;
|
|
38148
38244
|
const spanOptions = getSpanOptions(options);
|
|
38149
38245
|
return tracer.startActiveSpan(name, spanOptions, ctx, (span) => {
|
|
38150
38246
|
return handleCallbackErrors(() => callback(span), () => {
|
|
38151
38247
|
if (spanToJSON(span).status === undefined) {
|
|
38152
|
-
span.setStatus({ code:
|
|
38248
|
+
span.setStatus({ code: import_api4.SpanStatusCode.ERROR });
|
|
38153
38249
|
}
|
|
38154
38250
|
}, () => span.end());
|
|
38155
38251
|
});
|
|
@@ -38161,13 +38257,13 @@ function startSpanManual2(options, callback) {
|
|
|
38161
38257
|
const wrapper = getActiveSpanWrapper2(customParentSpan);
|
|
38162
38258
|
return wrapper(() => {
|
|
38163
38259
|
const activeCtx = getContext(options.scope, options.forceTransaction);
|
|
38164
|
-
const shouldSkipSpan = options.onlyIfParent && !
|
|
38165
|
-
const ctx = shouldSkipSpan ?
|
|
38260
|
+
const shouldSkipSpan = options.onlyIfParent && !import_api4.trace.getSpan(activeCtx);
|
|
38261
|
+
const ctx = shouldSkipSpan ? import_core38.suppressTracing(activeCtx) : activeCtx;
|
|
38166
38262
|
const spanOptions = getSpanOptions(options);
|
|
38167
38263
|
return tracer.startActiveSpan(name, spanOptions, ctx, (span) => {
|
|
38168
38264
|
return handleCallbackErrors(() => callback(span, () => span.end()), () => {
|
|
38169
38265
|
if (spanToJSON(span).status === undefined) {
|
|
38170
|
-
span.setStatus({ code:
|
|
38266
|
+
span.setStatus({ code: import_api4.SpanStatusCode.ERROR });
|
|
38171
38267
|
}
|
|
38172
38268
|
});
|
|
38173
38269
|
});
|
|
@@ -38179,20 +38275,20 @@ function startInactiveSpan2(options) {
|
|
|
38179
38275
|
const wrapper = getActiveSpanWrapper2(customParentSpan);
|
|
38180
38276
|
return wrapper(() => {
|
|
38181
38277
|
const activeCtx = getContext(options.scope, options.forceTransaction);
|
|
38182
|
-
const shouldSkipSpan = options.onlyIfParent && !
|
|
38183
|
-
const ctx = shouldSkipSpan ?
|
|
38278
|
+
const shouldSkipSpan = options.onlyIfParent && !import_api4.trace.getSpan(activeCtx);
|
|
38279
|
+
const ctx = shouldSkipSpan ? import_core38.suppressTracing(activeCtx) : activeCtx;
|
|
38184
38280
|
const spanOptions = getSpanOptions(options);
|
|
38185
38281
|
const span = tracer.startSpan(name, spanOptions, ctx);
|
|
38186
38282
|
return span;
|
|
38187
38283
|
});
|
|
38188
38284
|
}
|
|
38189
38285
|
function withActiveSpan2(span, callback) {
|
|
38190
|
-
const newContextWithActiveSpan = span ?
|
|
38191
|
-
return
|
|
38286
|
+
const newContextWithActiveSpan = span ? import_api4.trace.setSpan(import_api4.context.active(), span) : import_api4.trace.deleteSpan(import_api4.context.active());
|
|
38287
|
+
return import_api4.context.with(newContextWithActiveSpan, () => callback(getCurrentScope()));
|
|
38192
38288
|
}
|
|
38193
38289
|
function getTracer() {
|
|
38194
38290
|
const client = getClient();
|
|
38195
|
-
return client?.tracer ||
|
|
38291
|
+
return client?.tracer || import_api4.trace.getTracer("@sentry/opentelemetry", SDK_VERSION);
|
|
38196
38292
|
}
|
|
38197
38293
|
function getSpanOptions(options) {
|
|
38198
38294
|
const { startTime, attributes, kind, op, links } = options;
|
|
@@ -38213,14 +38309,14 @@ function ensureTimestampInMilliseconds(timestamp) {
|
|
|
38213
38309
|
}
|
|
38214
38310
|
function getContext(scope, forceTransaction) {
|
|
38215
38311
|
const ctx = getContextForScope(scope);
|
|
38216
|
-
const parentSpan =
|
|
38312
|
+
const parentSpan = import_api4.trace.getSpan(ctx);
|
|
38217
38313
|
if (!parentSpan) {
|
|
38218
38314
|
return ctx;
|
|
38219
38315
|
}
|
|
38220
38316
|
if (!forceTransaction) {
|
|
38221
38317
|
return ctx;
|
|
38222
38318
|
}
|
|
38223
|
-
const ctxWithoutSpan =
|
|
38319
|
+
const ctxWithoutSpan = import_api4.trace.deleteSpan(ctx);
|
|
38224
38320
|
const { spanId, traceId } = parentSpan.spanContext();
|
|
38225
38321
|
const sampled = getSamplingDecision(parentSpan.spanContext());
|
|
38226
38322
|
const rootSpan = getRootSpan(parentSpan);
|
|
@@ -38233,10 +38329,10 @@ function getContext(scope, forceTransaction) {
|
|
|
38233
38329
|
traceId,
|
|
38234
38330
|
spanId,
|
|
38235
38331
|
isRemote: true,
|
|
38236
|
-
traceFlags: sampled ?
|
|
38332
|
+
traceFlags: sampled ? import_api4.TraceFlags.SAMPLED : import_api4.TraceFlags.NONE,
|
|
38237
38333
|
traceState
|
|
38238
38334
|
};
|
|
38239
|
-
const ctxWithSpanContext =
|
|
38335
|
+
const ctxWithSpanContext = import_api4.trace.setSpanContext(ctxWithoutSpan, spanOptions);
|
|
38240
38336
|
return ctxWithSpanContext;
|
|
38241
38337
|
}
|
|
38242
38338
|
function getContextForScope(scope) {
|
|
@@ -38246,14 +38342,14 @@ function getContextForScope(scope) {
|
|
|
38246
38342
|
return ctx;
|
|
38247
38343
|
}
|
|
38248
38344
|
}
|
|
38249
|
-
return
|
|
38345
|
+
return import_api4.context.active();
|
|
38250
38346
|
}
|
|
38251
38347
|
function continueTrace2(options, callback) {
|
|
38252
|
-
return continueTraceAsRemoteSpan(
|
|
38348
|
+
return continueTraceAsRemoteSpan(import_api4.context.active(), options, callback);
|
|
38253
38349
|
}
|
|
38254
38350
|
function getTraceContextForScope(client, scope) {
|
|
38255
38351
|
const ctx = getContextFromScope(scope);
|
|
38256
|
-
const span = ctx &&
|
|
38352
|
+
const span = ctx && import_api4.trace.getSpan(ctx);
|
|
38257
38353
|
const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);
|
|
38258
38354
|
const dynamicSamplingContext = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
|
|
38259
38355
|
return [dynamicSamplingContext, traceContext];
|
|
@@ -38264,8 +38360,8 @@ function getActiveSpanWrapper2(parentSpan) {
|
|
|
38264
38360
|
} : (callback) => callback();
|
|
38265
38361
|
}
|
|
38266
38362
|
function suppressTracing2(callback) {
|
|
38267
|
-
const ctx =
|
|
38268
|
-
return
|
|
38363
|
+
const ctx = import_core38.suppressTracing(import_api4.context.active());
|
|
38364
|
+
return import_api4.context.with(ctx, callback);
|
|
38269
38365
|
}
|
|
38270
38366
|
function setupEventContextTrace(client) {
|
|
38271
38367
|
client.on("preprocessEvent", (event) => {
|
|
@@ -38367,17 +38463,17 @@ function wrapContextManagerClass(ContextManagerClass) {
|
|
|
38367
38463
|
super(...args);
|
|
38368
38464
|
setIsSetup("SentryContextManager");
|
|
38369
38465
|
}
|
|
38370
|
-
with(
|
|
38371
|
-
const currentScopes = getScopesFromContext(
|
|
38466
|
+
with(context5, fn, thisArg, ...args) {
|
|
38467
|
+
const currentScopes = getScopesFromContext(context5);
|
|
38372
38468
|
const currentScope = currentScopes?.scope || getCurrentScope();
|
|
38373
38469
|
const currentIsolationScope = currentScopes?.isolationScope || getIsolationScope();
|
|
38374
|
-
const shouldForkIsolationScope =
|
|
38375
|
-
const scope =
|
|
38376
|
-
const isolationScope =
|
|
38470
|
+
const shouldForkIsolationScope = context5.getValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY) === true;
|
|
38471
|
+
const scope = context5.getValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY);
|
|
38472
|
+
const isolationScope = context5.getValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY);
|
|
38377
38473
|
const newCurrentScope = scope || currentScope.clone();
|
|
38378
38474
|
const newIsolationScope = isolationScope || (shouldForkIsolationScope ? currentIsolationScope.clone() : currentIsolationScope);
|
|
38379
38475
|
const scopes = { scope: newCurrentScope, isolationScope: newIsolationScope };
|
|
38380
|
-
const ctx1 = setScopesOnContext(
|
|
38476
|
+
const ctx1 = setScopesOnContext(context5, scopes);
|
|
38381
38477
|
const ctx2 = ctx1.deleteValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY).deleteValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY).deleteValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY);
|
|
38382
38478
|
setContextOnScope(newCurrentScope, ctx2);
|
|
38383
38479
|
return super.with(ctx2, fn, thisArg, ...args);
|
|
@@ -38454,9 +38550,9 @@ function mapStatus(span) {
|
|
|
38454
38550
|
const attributes = spanHasAttributes(span) ? span.attributes : {};
|
|
38455
38551
|
const status = spanHasStatus(span) ? span.status : undefined;
|
|
38456
38552
|
if (status) {
|
|
38457
|
-
if (status.code ===
|
|
38553
|
+
if (status.code === import_api4.SpanStatusCode.OK) {
|
|
38458
38554
|
return { code: SPAN_STATUS_OK };
|
|
38459
|
-
} else if (status.code ===
|
|
38555
|
+
} else if (status.code === import_api4.SpanStatusCode.ERROR) {
|
|
38460
38556
|
if (typeof status.message === "undefined") {
|
|
38461
38557
|
const inferredStatus2 = inferStatusFromAttributes(attributes);
|
|
38462
38558
|
if (inferredStatus2) {
|
|
@@ -38474,7 +38570,7 @@ function mapStatus(span) {
|
|
|
38474
38570
|
if (inferredStatus) {
|
|
38475
38571
|
return inferredStatus;
|
|
38476
38572
|
}
|
|
38477
|
-
if (status?.code ===
|
|
38573
|
+
if (status?.code === import_api4.SpanStatusCode.UNSET) {
|
|
38478
38574
|
return { code: SPAN_STATUS_OK };
|
|
38479
38575
|
} else {
|
|
38480
38576
|
return { code: SPAN_STATUS_ERROR, message: "unknown_error" };
|
|
@@ -38725,8 +38821,8 @@ function removeSentryAttributes(data) {
|
|
|
38725
38821
|
function getData(span) {
|
|
38726
38822
|
const attributes = span.attributes;
|
|
38727
38823
|
const data = {};
|
|
38728
|
-
if (span.kind !==
|
|
38729
|
-
data["otel.kind"] =
|
|
38824
|
+
if (span.kind !== import_api4.SpanKind.INTERNAL) {
|
|
38825
|
+
data["otel.kind"] = import_api4.SpanKind[span.kind];
|
|
38730
38826
|
}
|
|
38731
38827
|
const maybeHttpStatusCodeAttribute = attributes[import_semantic_conventions2.SEMATTRS_HTTP_STATUS_CODE];
|
|
38732
38828
|
if (maybeHttpStatusCodeAttribute) {
|
|
@@ -38745,7 +38841,7 @@ function getData(span) {
|
|
|
38745
38841
|
return data;
|
|
38746
38842
|
}
|
|
38747
38843
|
function onSpanStart(span, parentContext) {
|
|
38748
|
-
const parentSpan =
|
|
38844
|
+
const parentSpan = import_api4.trace.getSpan(parentContext);
|
|
38749
38845
|
let scopes = getScopesFromContext(parentContext);
|
|
38750
38846
|
if (parentSpan && !parentSpan.spanContext().isRemote) {
|
|
38751
38847
|
addChildSpanToSpan(parentSpan, span);
|
|
@@ -38753,7 +38849,7 @@ function onSpanStart(span, parentContext) {
|
|
|
38753
38849
|
if (parentSpan?.spanContext().isRemote) {
|
|
38754
38850
|
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE, true);
|
|
38755
38851
|
}
|
|
38756
|
-
if (parentContext ===
|
|
38852
|
+
if (parentContext === import_api4.ROOT_CONTEXT) {
|
|
38757
38853
|
scopes = {
|
|
38758
38854
|
scope: getDefaultCurrentScope(),
|
|
38759
38855
|
isolationScope: getDefaultIsolationScope()
|
|
@@ -38797,23 +38893,23 @@ class SentrySampler {
|
|
|
38797
38893
|
this._client = client;
|
|
38798
38894
|
setIsSetup("SentrySampler");
|
|
38799
38895
|
}
|
|
38800
|
-
shouldSample(
|
|
38896
|
+
shouldSample(context5, traceId, spanName, spanKind, spanAttributes, _links) {
|
|
38801
38897
|
const options = this._client.getOptions();
|
|
38802
|
-
const parentSpan = getValidSpan(
|
|
38898
|
+
const parentSpan = getValidSpan(context5);
|
|
38803
38899
|
const parentContext = parentSpan?.spanContext();
|
|
38804
38900
|
if (!hasSpansEnabled(options)) {
|
|
38805
|
-
return wrapSamplingDecision({ decision: undefined, context:
|
|
38901
|
+
return wrapSamplingDecision({ decision: undefined, context: context5, spanAttributes });
|
|
38806
38902
|
}
|
|
38807
38903
|
const maybeSpanHttpMethod = spanAttributes[import_semantic_conventions2.SEMATTRS_HTTP_METHOD] || spanAttributes[import_semantic_conventions2.ATTR_HTTP_REQUEST_METHOD];
|
|
38808
|
-
if (spanKind ===
|
|
38809
|
-
return wrapSamplingDecision({ decision: undefined, context:
|
|
38904
|
+
if (spanKind === import_api4.SpanKind.CLIENT && maybeSpanHttpMethod && (!parentSpan || parentContext?.isRemote)) {
|
|
38905
|
+
return wrapSamplingDecision({ decision: undefined, context: context5, spanAttributes });
|
|
38810
38906
|
}
|
|
38811
38907
|
const parentSampled = parentSpan ? getParentSampled(parentSpan, traceId, spanName) : undefined;
|
|
38812
38908
|
const isRootSpan = !parentSpan || parentContext?.isRemote;
|
|
38813
38909
|
if (!isRootSpan) {
|
|
38814
38910
|
return wrapSamplingDecision({
|
|
38815
38911
|
decision: parentSampled ? import_sdk_trace_base.SamplingDecision.RECORD_AND_SAMPLED : import_sdk_trace_base.SamplingDecision.NOT_RECORD,
|
|
38816
|
-
context:
|
|
38912
|
+
context: context5,
|
|
38817
38913
|
spanAttributes
|
|
38818
38914
|
});
|
|
38819
38915
|
}
|
|
@@ -38837,9 +38933,9 @@ class SentrySampler {
|
|
|
38837
38933
|
parentContext
|
|
38838
38934
|
}, mutableSamplingDecision);
|
|
38839
38935
|
if (!mutableSamplingDecision.decision) {
|
|
38840
|
-
return wrapSamplingDecision({ decision: undefined, context:
|
|
38936
|
+
return wrapSamplingDecision({ decision: undefined, context: context5, spanAttributes });
|
|
38841
38937
|
}
|
|
38842
|
-
const { isolationScope } = getScopesFromContext(
|
|
38938
|
+
const { isolationScope } = getScopesFromContext(context5) ?? {};
|
|
38843
38939
|
const dscString = parentContext?.traceState ? parentContext.traceState.get(SENTRY_TRACE_STATE_DSC) : undefined;
|
|
38844
38940
|
const dsc = dscString ? baggageHeaderToDynamicSamplingContext(dscString) : undefined;
|
|
38845
38941
|
const sampleRand = parseSampleRate(dsc?.sample_rand) ?? Math.random();
|
|
@@ -38855,7 +38951,7 @@ class SentrySampler {
|
|
|
38855
38951
|
DEBUG_BUILD3 && debug.log(`[Tracing] Not sampling span because HTTP method is '${method}' for ${spanName}`);
|
|
38856
38952
|
return wrapSamplingDecision({
|
|
38857
38953
|
decision: import_sdk_trace_base.SamplingDecision.NOT_RECORD,
|
|
38858
|
-
context:
|
|
38954
|
+
context: context5,
|
|
38859
38955
|
spanAttributes,
|
|
38860
38956
|
sampleRand,
|
|
38861
38957
|
downstreamTraceSampleRate: 0
|
|
@@ -38868,7 +38964,7 @@ class SentrySampler {
|
|
|
38868
38964
|
return {
|
|
38869
38965
|
...wrapSamplingDecision({
|
|
38870
38966
|
decision: sampled ? import_sdk_trace_base.SamplingDecision.RECORD_AND_SAMPLED : import_sdk_trace_base.SamplingDecision.NOT_RECORD,
|
|
38871
|
-
context:
|
|
38967
|
+
context: context5,
|
|
38872
38968
|
spanAttributes,
|
|
38873
38969
|
sampleRand,
|
|
38874
38970
|
downstreamTraceSampleRate: localSampleRateWasApplied ? sampleRate : undefined
|
|
@@ -38884,7 +38980,7 @@ class SentrySampler {
|
|
|
38884
38980
|
}
|
|
38885
38981
|
function getParentSampled(parentSpan, traceId, spanName) {
|
|
38886
38982
|
const parentContext = parentSpan.spanContext();
|
|
38887
|
-
if (
|
|
38983
|
+
if (import_api4.isSpanContextValid(parentContext) && parentContext.traceId === traceId) {
|
|
38888
38984
|
if (parentContext.isRemote) {
|
|
38889
38985
|
const parentSampled2 = getSamplingDecision(parentSpan.spanContext());
|
|
38890
38986
|
DEBUG_BUILD3 && debug.log(`[Tracing] Inheriting remote parent's sampled decision for ${spanName}: ${parentSampled2}`);
|
|
@@ -38898,12 +38994,12 @@ function getParentSampled(parentSpan, traceId, spanName) {
|
|
|
38898
38994
|
}
|
|
38899
38995
|
function wrapSamplingDecision({
|
|
38900
38996
|
decision,
|
|
38901
|
-
context:
|
|
38997
|
+
context: context5,
|
|
38902
38998
|
spanAttributes,
|
|
38903
38999
|
sampleRand,
|
|
38904
39000
|
downstreamTraceSampleRate
|
|
38905
39001
|
}) {
|
|
38906
|
-
let traceState = getBaseTraceState(
|
|
39002
|
+
let traceState = getBaseTraceState(context5, spanAttributes);
|
|
38907
39003
|
if (downstreamTraceSampleRate !== undefined) {
|
|
38908
39004
|
traceState = traceState.set(SENTRY_TRACE_STATE_SAMPLE_RATE, `${downstreamTraceSampleRate}`);
|
|
38909
39005
|
}
|
|
@@ -38918,19 +39014,19 @@ function wrapSamplingDecision({
|
|
|
38918
39014
|
}
|
|
38919
39015
|
return { decision, traceState };
|
|
38920
39016
|
}
|
|
38921
|
-
function getBaseTraceState(
|
|
38922
|
-
const parentSpan =
|
|
39017
|
+
function getBaseTraceState(context5, spanAttributes) {
|
|
39018
|
+
const parentSpan = import_api4.trace.getSpan(context5);
|
|
38923
39019
|
const parentContext = parentSpan?.spanContext();
|
|
38924
|
-
let traceState = parentContext?.traceState || new
|
|
39020
|
+
let traceState = parentContext?.traceState || new import_core38.TraceState;
|
|
38925
39021
|
const url = spanAttributes[import_semantic_conventions2.SEMATTRS_HTTP_URL] || spanAttributes[import_semantic_conventions2.ATTR_URL_FULL];
|
|
38926
39022
|
if (url && typeof url === "string") {
|
|
38927
39023
|
traceState = traceState.set(SENTRY_TRACE_STATE_URL, url);
|
|
38928
39024
|
}
|
|
38929
39025
|
return traceState;
|
|
38930
39026
|
}
|
|
38931
|
-
function getValidSpan(
|
|
38932
|
-
const span =
|
|
38933
|
-
return span &&
|
|
39027
|
+
function getValidSpan(context5) {
|
|
39028
|
+
const span = import_api4.trace.getSpan(context5);
|
|
39029
|
+
return span && import_api4.isSpanContextValid(span.spanContext()) ? span : undefined;
|
|
38934
39030
|
}
|
|
38935
39031
|
|
|
38936
39032
|
// ../../node_modules/@sentry/node-core/build/esm/utils/baggage.js
|
|
@@ -39045,21 +39141,6 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
|
|
|
39045
39141
|
}
|
|
39046
39142
|
init() {
|
|
39047
39143
|
let hasRegisteredHandlers = false;
|
|
39048
|
-
const spansEnabled = this.getConfig().spans ?? true;
|
|
39049
|
-
const onHttpServerRequestStart = (_data) => {
|
|
39050
|
-
const data = _data;
|
|
39051
|
-
instrumentServer(data.server, {
|
|
39052
|
-
instrumentation: this.getConfig().instrumentation,
|
|
39053
|
-
ignoreIncomingRequestBody: this.getConfig().ignoreIncomingRequestBody,
|
|
39054
|
-
ignoreSpansForIncomingRequests: this.getConfig().ignoreSpansForIncomingRequests,
|
|
39055
|
-
incomingRequestSpanHook: this.getConfig().incomingRequestSpanHook,
|
|
39056
|
-
maxIncomingRequestBodySize: this.getConfig().maxIncomingRequestBodySize,
|
|
39057
|
-
trackIncomingRequestsAsSessions: this.getConfig().trackIncomingRequestsAsSessions,
|
|
39058
|
-
sessionFlushingDelayMS: this.getConfig().sessionFlushingDelayMS ?? 60000,
|
|
39059
|
-
ignoreStaticAssets: this.getConfig().ignoreStaticAssets,
|
|
39060
|
-
spans: spansEnabled && !this.getConfig().disableIncomingRequestSpans
|
|
39061
|
-
});
|
|
39062
|
-
};
|
|
39063
39144
|
const onHttpClientResponseFinish = (_data) => {
|
|
39064
39145
|
const data = _data;
|
|
39065
39146
|
this._onOutgoingRequestFinish(data.request, data.response);
|
|
@@ -39077,16 +39158,14 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
|
|
|
39077
39158
|
return moduleExports;
|
|
39078
39159
|
}
|
|
39079
39160
|
hasRegisteredHandlers = true;
|
|
39080
|
-
|
|
39081
|
-
|
|
39082
|
-
subscribe("http.client.request.error", onHttpClientRequestError);
|
|
39161
|
+
subscribe2("http.client.response.finish", onHttpClientResponseFinish);
|
|
39162
|
+
subscribe2("http.client.request.error", onHttpClientRequestError);
|
|
39083
39163
|
if (this.getConfig().propagateTraceInOutgoingRequests) {
|
|
39084
|
-
|
|
39164
|
+
subscribe2("http.client.request.created", onHttpClientRequestCreated);
|
|
39085
39165
|
}
|
|
39086
39166
|
return moduleExports;
|
|
39087
39167
|
};
|
|
39088
39168
|
const unwrap = () => {
|
|
39089
|
-
unsubscribe("http.server.request.start", onHttpServerRequestStart);
|
|
39090
39169
|
unsubscribe("http.client.response.finish", onHttpClientResponseFinish);
|
|
39091
39170
|
unsubscribe("http.client.request.error", onHttpClientRequestError);
|
|
39092
39171
|
unsubscribe("http.client.request.created", onHttpClientRequestCreated);
|
|
@@ -39115,7 +39194,7 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
|
|
|
39115
39194
|
addTracePropagationHeadersToOutgoingRequest(request, this._propagationDecisionMap);
|
|
39116
39195
|
}
|
|
39117
39196
|
_shouldIgnoreOutgoingRequest(request) {
|
|
39118
|
-
if (
|
|
39197
|
+
if (import_core41.isTracingSuppressed(import_api5.context.active())) {
|
|
39119
39198
|
return true;
|
|
39120
39199
|
}
|
|
39121
39200
|
const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;
|
|
@@ -39129,53 +39208,51 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
|
|
|
39129
39208
|
}
|
|
39130
39209
|
|
|
39131
39210
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/http/index.js
|
|
39132
|
-
var
|
|
39133
|
-
var instrumentSentryHttp = generateInstrumentOnce(`${
|
|
39211
|
+
var INTEGRATION_NAME8 = "Http";
|
|
39212
|
+
var instrumentSentryHttp = generateInstrumentOnce(`${INTEGRATION_NAME8}.sentry`, (options) => {
|
|
39134
39213
|
return new SentryHttpInstrumentation(options);
|
|
39135
39214
|
});
|
|
39136
39215
|
var httpIntegration = defineIntegration((options = {}) => {
|
|
39137
|
-
const
|
|
39138
|
-
|
|
39139
|
-
|
|
39140
|
-
|
|
39141
|
-
|
|
39216
|
+
const serverOptions = {
|
|
39217
|
+
sessions: options.trackIncomingRequestsAsSessions,
|
|
39218
|
+
sessionFlushingDelayMS: options.sessionFlushingDelayMS,
|
|
39219
|
+
ignoreRequestBody: options.ignoreIncomingRequestBody,
|
|
39220
|
+
maxRequestBodySize: options.maxIncomingRequestBodySize
|
|
39221
|
+
};
|
|
39222
|
+
const serverSpansOptions = {
|
|
39223
|
+
ignoreIncomingRequests: options.ignoreIncomingRequests,
|
|
39224
|
+
ignoreStaticAssets: options.ignoreStaticAssets,
|
|
39225
|
+
ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes
|
|
39226
|
+
};
|
|
39227
|
+
const httpInstrumentationOptions = {
|
|
39228
|
+
breadcrumbs: options.breadcrumbs,
|
|
39229
|
+
propagateTraceInOutgoingRequests: true,
|
|
39230
|
+
ignoreOutgoingRequests: options.ignoreOutgoingRequests
|
|
39231
|
+
};
|
|
39232
|
+
const server = httpServerIntegration(serverOptions);
|
|
39233
|
+
const serverSpans = httpServerSpansIntegration(serverSpansOptions);
|
|
39234
|
+
const spans = options.spans ?? false;
|
|
39235
|
+
const disableIncomingRequestSpans = options.disableIncomingRequestSpans ?? false;
|
|
39236
|
+
const enabledServerSpans = spans && !disableIncomingRequestSpans;
|
|
39142
39237
|
return {
|
|
39143
|
-
name:
|
|
39238
|
+
name: INTEGRATION_NAME8,
|
|
39239
|
+
setup(client) {
|
|
39240
|
+
if (enabledServerSpans) {
|
|
39241
|
+
serverSpans.setup(client);
|
|
39242
|
+
}
|
|
39243
|
+
},
|
|
39144
39244
|
setupOnce() {
|
|
39145
|
-
|
|
39146
|
-
|
|
39147
|
-
ignoreSpansForIncomingRequests: options.ignoreIncomingRequests,
|
|
39148
|
-
disableIncomingRequestSpans: true,
|
|
39149
|
-
propagateTraceInOutgoingRequests: true
|
|
39150
|
-
});
|
|
39245
|
+
server.setupOnce();
|
|
39246
|
+
instrumentSentryHttp(httpInstrumentationOptions);
|
|
39151
39247
|
},
|
|
39152
39248
|
processEvent(event) {
|
|
39153
|
-
|
|
39154
|
-
const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
|
|
39155
|
-
if (typeof statusCode === "number") {
|
|
39156
|
-
const shouldDrop = shouldFilterStatusCode(statusCode, dropSpansForIncomingRequestStatusCodes);
|
|
39157
|
-
if (shouldDrop) {
|
|
39158
|
-
DEBUG_BUILD2 && debug.log("Dropping transaction due to status code", statusCode);
|
|
39159
|
-
return null;
|
|
39160
|
-
}
|
|
39161
|
-
}
|
|
39162
|
-
}
|
|
39163
|
-
return event;
|
|
39249
|
+
return serverSpans.processEvent(event);
|
|
39164
39250
|
}
|
|
39165
39251
|
};
|
|
39166
39252
|
});
|
|
39167
|
-
function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
|
|
39168
|
-
return dropForStatusCodes.some((code) => {
|
|
39169
|
-
if (typeof code === "number") {
|
|
39170
|
-
return code === statusCode;
|
|
39171
|
-
}
|
|
39172
|
-
const [min, max] = code;
|
|
39173
|
-
return statusCode >= min && statusCode <= max;
|
|
39174
|
-
});
|
|
39175
|
-
}
|
|
39176
39253
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js
|
|
39177
|
-
var
|
|
39178
|
-
var
|
|
39254
|
+
var import_api6 = __toESM(require_src(), 1);
|
|
39255
|
+
var import_core45 = __toESM(require_src3(), 1);
|
|
39179
39256
|
var import_instrumentation3 = __toESM(require_src6(), 1);
|
|
39180
39257
|
import * as diagch from "diagnostics_channel";
|
|
39181
39258
|
|
|
@@ -39295,7 +39372,7 @@ class SentryNodeFetchInstrumentation extends import_instrumentation3.Instrumenta
|
|
|
39295
39372
|
});
|
|
39296
39373
|
}
|
|
39297
39374
|
_shouldIgnoreOutgoingRequest(request) {
|
|
39298
|
-
if (
|
|
39375
|
+
if (import_core45.isTracingSuppressed(import_api6.context.active())) {
|
|
39299
39376
|
return true;
|
|
39300
39377
|
}
|
|
39301
39378
|
const url = getAbsoluteUrl2(request.origin, request.path);
|
|
@@ -39360,8 +39437,8 @@ function getAbsoluteUrl2(origin, path7 = "/") {
|
|
|
39360
39437
|
}
|
|
39361
39438
|
|
|
39362
39439
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/node-fetch/index.js
|
|
39363
|
-
var
|
|
39364
|
-
var instrumentSentryNodeFetch = generateInstrumentOnce(`${
|
|
39440
|
+
var INTEGRATION_NAME9 = "NodeFetch";
|
|
39441
|
+
var instrumentSentryNodeFetch = generateInstrumentOnce(`${INTEGRATION_NAME9}.sentry`, SentryNodeFetchInstrumentation, (options) => {
|
|
39365
39442
|
return options;
|
|
39366
39443
|
});
|
|
39367
39444
|
var _nativeNodeFetchIntegration = (options = {}) => {
|
|
@@ -39381,7 +39458,7 @@ import { join as join2 } from "node:path";
|
|
|
39381
39458
|
import { promisify } from "node:util";
|
|
39382
39459
|
var readFileAsync = promisify(readFile);
|
|
39383
39460
|
var readDirAsync = promisify(readdir);
|
|
39384
|
-
var
|
|
39461
|
+
var INTEGRATION_NAME10 = "Context";
|
|
39385
39462
|
var _nodeContextIntegration = (options = {}) => {
|
|
39386
39463
|
let cachedContext;
|
|
39387
39464
|
const _options = {
|
|
@@ -39430,7 +39507,7 @@ var _nodeContextIntegration = (options = {}) => {
|
|
|
39430
39507
|
return contexts;
|
|
39431
39508
|
}
|
|
39432
39509
|
return {
|
|
39433
|
-
name:
|
|
39510
|
+
name: INTEGRATION_NAME10,
|
|
39434
39511
|
processEvent(event) {
|
|
39435
39512
|
return addContext(event);
|
|
39436
39513
|
}
|
|
@@ -39664,7 +39741,7 @@ import { createInterface } from "node:readline";
|
|
|
39664
39741
|
var LRU_FILE_CONTENTS_CACHE = new LRUMap(10);
|
|
39665
39742
|
var LRU_FILE_CONTENTS_FS_READ_FAILED = new LRUMap(20);
|
|
39666
39743
|
var DEFAULT_LINES_OF_CONTEXT = 7;
|
|
39667
|
-
var
|
|
39744
|
+
var INTEGRATION_NAME11 = "ContextLines";
|
|
39668
39745
|
var MAX_CONTEXTLINES_COLNO = 1000;
|
|
39669
39746
|
var MAX_CONTEXTLINES_LINENO = 1e4;
|
|
39670
39747
|
function emplace(map, key, contents) {
|
|
@@ -39901,7 +39978,7 @@ function makeContextRange(line, linecontext) {
|
|
|
39901
39978
|
var _contextLinesIntegration = (options = {}) => {
|
|
39902
39979
|
const contextLines = options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;
|
|
39903
39980
|
return {
|
|
39904
|
-
name:
|
|
39981
|
+
name: INTEGRATION_NAME11,
|
|
39905
39982
|
processEvent(event) {
|
|
39906
39983
|
return addSourceContext(event, contextLines);
|
|
39907
39984
|
}
|
|
@@ -39962,7 +40039,7 @@ function functionNamesMatch(a, b) {
|
|
|
39962
40039
|
}
|
|
39963
40040
|
|
|
39964
40041
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js
|
|
39965
|
-
var base64WorkerScript = "
|
|
40042
|
+
var base64WorkerScript = "LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjE3LjAgKGViNmUyOTQpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";
|
|
39966
40043
|
function log2(...args) {
|
|
39967
40044
|
debug.log("[LocalVariables]", ...args);
|
|
39968
40045
|
}
|
|
@@ -40169,7 +40246,7 @@ class AsyncSession {
|
|
|
40169
40246
|
next(vars);
|
|
40170
40247
|
}
|
|
40171
40248
|
}
|
|
40172
|
-
var
|
|
40249
|
+
var INTEGRATION_NAME12 = "LocalVariables";
|
|
40173
40250
|
var _localVariablesSyncIntegration = (options = {}, sessionOverride) => {
|
|
40174
40251
|
const cachedFrames = new LRUMap(20);
|
|
40175
40252
|
let rateLimiter;
|
|
@@ -40204,7 +40281,7 @@ var _localVariablesSyncIntegration = (options = {}, sessionOverride) => {
|
|
|
40204
40281
|
return event;
|
|
40205
40282
|
}
|
|
40206
40283
|
return {
|
|
40207
|
-
name:
|
|
40284
|
+
name: INTEGRATION_NAME12,
|
|
40208
40285
|
async setupOnce() {
|
|
40209
40286
|
const client = getClient();
|
|
40210
40287
|
const clientOptions = client?.getOptions();
|
|
@@ -40324,11 +40401,11 @@ function supportsEsmLoaderHooks() {
|
|
|
40324
40401
|
|
|
40325
40402
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/modules.js
|
|
40326
40403
|
var moduleCache;
|
|
40327
|
-
var
|
|
40404
|
+
var INTEGRATION_NAME13 = "Modules";
|
|
40328
40405
|
var SERVER_MODULES = typeof __SENTRY_SERVER_MODULES__ === "undefined" ? {} : __SENTRY_SERVER_MODULES__;
|
|
40329
40406
|
var _modulesIntegration = () => {
|
|
40330
40407
|
return {
|
|
40331
|
-
name:
|
|
40408
|
+
name: INTEGRATION_NAME13,
|
|
40332
40409
|
processEvent(event) {
|
|
40333
40410
|
event.modules = {
|
|
40334
40411
|
...event.modules,
|
|
@@ -40432,14 +40509,14 @@ function logAndExitProcess(error2) {
|
|
|
40432
40509
|
}
|
|
40433
40510
|
|
|
40434
40511
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/onuncaughtexception.js
|
|
40435
|
-
var
|
|
40512
|
+
var INTEGRATION_NAME14 = "OnUncaughtException";
|
|
40436
40513
|
var onUncaughtExceptionIntegration = defineIntegration((options = {}) => {
|
|
40437
40514
|
const optionsWithDefaults = {
|
|
40438
40515
|
exitEvenIfOtherHandlersAreRegistered: false,
|
|
40439
40516
|
...options
|
|
40440
40517
|
};
|
|
40441
40518
|
return {
|
|
40442
|
-
name:
|
|
40519
|
+
name: INTEGRATION_NAME14,
|
|
40443
40520
|
setup(client) {
|
|
40444
40521
|
global.process.on("uncaughtException", makeErrorHandler(client, optionsWithDefaults));
|
|
40445
40522
|
}
|
|
@@ -40503,14 +40580,14 @@ function makeErrorHandler(client, options) {
|
|
|
40503
40580
|
}
|
|
40504
40581
|
|
|
40505
40582
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/onunhandledrejection.js
|
|
40506
|
-
var
|
|
40583
|
+
var INTEGRATION_NAME15 = "OnUnhandledRejection";
|
|
40507
40584
|
var _onUnhandledRejectionIntegration = (options = {}) => {
|
|
40508
40585
|
const opts = {
|
|
40509
40586
|
mode: "warn",
|
|
40510
40587
|
...options
|
|
40511
40588
|
};
|
|
40512
40589
|
return {
|
|
40513
|
-
name:
|
|
40590
|
+
name: INTEGRATION_NAME15,
|
|
40514
40591
|
setup(client) {
|
|
40515
40592
|
global.process.on("unhandledRejection", makeUnhandledPromiseHandler(client, opts));
|
|
40516
40593
|
}
|
|
@@ -40558,13 +40635,13 @@ function handleRejection(reason, mode) {
|
|
|
40558
40635
|
|
|
40559
40636
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/spotlight.js
|
|
40560
40637
|
import * as http from "node:http";
|
|
40561
|
-
var
|
|
40638
|
+
var INTEGRATION_NAME16 = "Spotlight";
|
|
40562
40639
|
var _spotlightIntegration = (options = {}) => {
|
|
40563
40640
|
const _options = {
|
|
40564
40641
|
sidecarUrl: options.sidecarUrl || "http://localhost:8969/stream"
|
|
40565
40642
|
};
|
|
40566
40643
|
return {
|
|
40567
|
-
name:
|
|
40644
|
+
name: INTEGRATION_NAME16,
|
|
40568
40645
|
setup(client) {
|
|
40569
40646
|
try {
|
|
40570
40647
|
if (false) {}
|
|
@@ -40623,7 +40700,7 @@ function parseSidecarUrl(url) {
|
|
|
40623
40700
|
|
|
40624
40701
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/systemError.js
|
|
40625
40702
|
import * as util from "node:util";
|
|
40626
|
-
var
|
|
40703
|
+
var INTEGRATION_NAME17 = "NodeSystemError";
|
|
40627
40704
|
function isSystemError(error2) {
|
|
40628
40705
|
if (!(error2 instanceof Error)) {
|
|
40629
40706
|
return false;
|
|
@@ -40635,7 +40712,7 @@ function isSystemError(error2) {
|
|
|
40635
40712
|
}
|
|
40636
40713
|
var systemErrorIntegration = defineIntegration((options = {}) => {
|
|
40637
40714
|
return {
|
|
40638
|
-
name:
|
|
40715
|
+
name: INTEGRATION_NAME17,
|
|
40639
40716
|
processEvent: (event, hint, client) => {
|
|
40640
40717
|
if (!isSystemError(hint.originalException)) {
|
|
40641
40718
|
return event;
|
|
@@ -40669,10 +40746,10 @@ var systemErrorIntegration = defineIntegration((options = {}) => {
|
|
|
40669
40746
|
|
|
40670
40747
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/childProcess.js
|
|
40671
40748
|
import * as diagnosticsChannel from "node:diagnostics_channel";
|
|
40672
|
-
var
|
|
40749
|
+
var INTEGRATION_NAME18 = "ChildProcess";
|
|
40673
40750
|
var childProcessIntegration = defineIntegration((options = {}) => {
|
|
40674
40751
|
return {
|
|
40675
|
-
name:
|
|
40752
|
+
name: INTEGRATION_NAME18,
|
|
40676
40753
|
setup() {
|
|
40677
40754
|
diagnosticsChannel.channel("child_process").subscribe((event) => {
|
|
40678
40755
|
if (event && typeof event === "object" && "process" in event) {
|
|
@@ -40747,22 +40824,22 @@ function captureWorkerThreadEvents(worker, options) {
|
|
|
40747
40824
|
var import_context_async_hooks = __toESM(require_src10(), 1);
|
|
40748
40825
|
var SentryContextManager = wrapContextManagerClass(import_context_async_hooks.AsyncLocalStorageContextManager);
|
|
40749
40826
|
// ../../node_modules/@sentry/node-core/build/esm/otel/logger.js
|
|
40750
|
-
var
|
|
40827
|
+
var import_api7 = __toESM(require_src(), 1);
|
|
40751
40828
|
function setupOpenTelemetryLogger() {
|
|
40752
|
-
|
|
40753
|
-
|
|
40829
|
+
import_api7.diag.disable();
|
|
40830
|
+
import_api7.diag.setLogger({
|
|
40754
40831
|
error: debug.error,
|
|
40755
40832
|
warn: debug.warn,
|
|
40756
40833
|
info: debug.log,
|
|
40757
40834
|
debug: debug.log,
|
|
40758
40835
|
verbose: debug.log
|
|
40759
|
-
},
|
|
40836
|
+
}, import_api7.DiagLogLevel.DEBUG);
|
|
40760
40837
|
}
|
|
40761
40838
|
// ../../node_modules/@sentry/node-core/build/esm/integrations/processSession.js
|
|
40762
|
-
var
|
|
40839
|
+
var INTEGRATION_NAME19 = "ProcessSession";
|
|
40763
40840
|
var processSessionIntegration = defineIntegration(() => {
|
|
40764
40841
|
return {
|
|
40765
|
-
name:
|
|
40842
|
+
name: INTEGRATION_NAME19,
|
|
40766
40843
|
setupOnce() {
|
|
40767
40844
|
startSession();
|
|
40768
40845
|
process.on("beforeExit", () => {
|
|
@@ -41179,7 +41256,7 @@ function getSentryRelease(fallback) {
|
|
|
41179
41256
|
var defaultStackParser = createStackParser(nodeStackLineParser(createGetModuleFromFilename()));
|
|
41180
41257
|
|
|
41181
41258
|
// ../../node_modules/@sentry/node-core/build/esm/sdk/client.js
|
|
41182
|
-
var
|
|
41259
|
+
var import_api8 = __toESM(require_src(), 1);
|
|
41183
41260
|
var import_instrumentation4 = __toESM(require_src6(), 1);
|
|
41184
41261
|
import * as os2 from "node:os";
|
|
41185
41262
|
import { threadId, isMainThread } from "worker_threads";
|
|
@@ -41223,7 +41300,7 @@ class NodeClient extends ServerRuntimeClient {
|
|
|
41223
41300
|
}
|
|
41224
41301
|
const name = "@sentry/node";
|
|
41225
41302
|
const version = SDK_VERSION;
|
|
41226
|
-
const tracer =
|
|
41303
|
+
const tracer = import_api8.trace.getTracer(name, version);
|
|
41227
41304
|
this._tracer = tracer;
|
|
41228
41305
|
return tracer;
|
|
41229
41306
|
}
|
|
@@ -41333,7 +41410,7 @@ function _init(_options = {}, getDefaultIntegrationsImpl) {
|
|
|
41333
41410
|
setOpenTelemetryContextAsyncContextStrategy();
|
|
41334
41411
|
const scope = getCurrentScope();
|
|
41335
41412
|
scope.update(options.initialScope);
|
|
41336
|
-
if (options.spotlight && !options.integrations.some(({ name }) => name ===
|
|
41413
|
+
if (options.spotlight && !options.integrations.some(({ name }) => name === INTEGRATION_NAME16)) {
|
|
41337
41414
|
options.integrations.push(spotlightIntegration({
|
|
41338
41415
|
sidecarUrl: typeof options.spotlight === "string" ? options.spotlight : undefined
|
|
41339
41416
|
}));
|
|
@@ -41426,22 +41503,19 @@ function updateScopeFromEnvVariables() {
|
|
|
41426
41503
|
function addOriginToSpan2(span, origin) {
|
|
41427
41504
|
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
|
|
41428
41505
|
}
|
|
41429
|
-
// ../../node_modules/@sentry/node/build/esm/debug-build.js
|
|
41430
|
-
var DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
41431
|
-
|
|
41432
41506
|
// ../../node_modules/@sentry/node/build/esm/integrations/http.js
|
|
41433
|
-
var
|
|
41507
|
+
var INTEGRATION_NAME20 = "Http";
|
|
41434
41508
|
var INSTRUMENTATION_NAME2 = "@opentelemetry_sentry-patched/instrumentation-http";
|
|
41435
|
-
var instrumentSentryHttp2 = generateInstrumentOnce(`${
|
|
41509
|
+
var instrumentSentryHttp2 = generateInstrumentOnce(`${INTEGRATION_NAME20}.sentry`, (options) => {
|
|
41436
41510
|
return new SentryHttpInstrumentation(options);
|
|
41437
41511
|
});
|
|
41438
|
-
var instrumentOtelHttp = generateInstrumentOnce(
|
|
41512
|
+
var instrumentOtelHttp = generateInstrumentOnce(INTEGRATION_NAME20, (config) => {
|
|
41439
41513
|
const instrumentation = new import_instrumentation_http.HttpInstrumentation({
|
|
41440
41514
|
...config,
|
|
41441
41515
|
disableIncomingRequestInstrumentation: true
|
|
41442
41516
|
});
|
|
41443
41517
|
try {
|
|
41444
|
-
instrumentation["_diag"] =
|
|
41518
|
+
instrumentation["_diag"] = import_api10.diag.createComponentLogger({
|
|
41445
41519
|
namespace: INSTRUMENTATION_NAME2
|
|
41446
41520
|
});
|
|
41447
41521
|
instrumentation.instrumentationName = INSTRUMENTATION_NAME2;
|
|
@@ -41461,40 +41535,49 @@ function _shouldUseOtelHttpInstrumentation(options, clientOptions = {}) {
|
|
|
41461
41535
|
return true;
|
|
41462
41536
|
}
|
|
41463
41537
|
var httpIntegration2 = defineIntegration((options = {}) => {
|
|
41464
|
-
const
|
|
41465
|
-
|
|
41466
|
-
|
|
41467
|
-
|
|
41468
|
-
|
|
41538
|
+
const spans = options.spans ?? true;
|
|
41539
|
+
const disableIncomingRequestSpans = options.disableIncomingRequestSpans;
|
|
41540
|
+
const serverOptions = {
|
|
41541
|
+
sessions: options.trackIncomingRequestsAsSessions,
|
|
41542
|
+
sessionFlushingDelayMS: options.sessionFlushingDelayMS,
|
|
41543
|
+
ignoreRequestBody: options.ignoreIncomingRequestBody,
|
|
41544
|
+
maxRequestBodySize: options.maxIncomingRequestBodySize
|
|
41545
|
+
};
|
|
41546
|
+
const serverSpansOptions = {
|
|
41547
|
+
ignoreIncomingRequests: options.ignoreIncomingRequests,
|
|
41548
|
+
ignoreStaticAssets: options.ignoreStaticAssets,
|
|
41549
|
+
ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes,
|
|
41550
|
+
instrumentation: options.instrumentation,
|
|
41551
|
+
onSpanCreated: options.incomingRequestSpanHook
|
|
41552
|
+
};
|
|
41553
|
+
const server = httpServerIntegration(serverOptions);
|
|
41554
|
+
const serverSpans = httpServerSpansIntegration(serverSpansOptions);
|
|
41555
|
+
const enableServerSpans = spans && !disableIncomingRequestSpans;
|
|
41469
41556
|
return {
|
|
41470
|
-
name:
|
|
41557
|
+
name: INTEGRATION_NAME20,
|
|
41558
|
+
setup(client) {
|
|
41559
|
+
const clientOptions = client.getOptions();
|
|
41560
|
+
if (enableServerSpans && hasSpansEnabled(clientOptions)) {
|
|
41561
|
+
serverSpans.setup(client);
|
|
41562
|
+
}
|
|
41563
|
+
},
|
|
41471
41564
|
setupOnce() {
|
|
41472
41565
|
const clientOptions = getClient()?.getOptions() || {};
|
|
41473
41566
|
const useOtelHttpInstrumentation = _shouldUseOtelHttpInstrumentation(options, clientOptions);
|
|
41474
|
-
|
|
41475
|
-
|
|
41476
|
-
|
|
41477
|
-
|
|
41478
|
-
|
|
41479
|
-
|
|
41480
|
-
|
|
41567
|
+
server.setupOnce();
|
|
41568
|
+
const sentryHttpInstrumentationOptions = {
|
|
41569
|
+
breadcrumbs: options.breadcrumbs,
|
|
41570
|
+
propagateTraceInOutgoingRequests: !useOtelHttpInstrumentation,
|
|
41571
|
+
ignoreOutgoingRequests: options.ignoreOutgoingRequests
|
|
41572
|
+
};
|
|
41573
|
+
instrumentSentryHttp2(sentryHttpInstrumentationOptions);
|
|
41481
41574
|
if (useOtelHttpInstrumentation) {
|
|
41482
41575
|
const instrumentationConfig = getConfigWithDefaults(options);
|
|
41483
41576
|
instrumentOtelHttp(instrumentationConfig);
|
|
41484
41577
|
}
|
|
41485
41578
|
},
|
|
41486
41579
|
processEvent(event) {
|
|
41487
|
-
|
|
41488
|
-
const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
|
|
41489
|
-
if (typeof statusCode === "number") {
|
|
41490
|
-
const shouldDrop = shouldFilterStatusCode2(statusCode, dropSpansForIncomingRequestStatusCodes);
|
|
41491
|
-
if (shouldDrop) {
|
|
41492
|
-
DEBUG_BUILD4 && debug.log("Dropping transaction due to status code", statusCode);
|
|
41493
|
-
return null;
|
|
41494
|
-
}
|
|
41495
|
-
}
|
|
41496
|
-
}
|
|
41497
|
-
return event;
|
|
41580
|
+
return serverSpans.processEvent(event);
|
|
41498
41581
|
}
|
|
41499
41582
|
};
|
|
41500
41583
|
});
|
|
@@ -41525,23 +41608,14 @@ function getConfigWithDefaults(options = {}) {
|
|
|
41525
41608
|
};
|
|
41526
41609
|
return instrumentationConfig;
|
|
41527
41610
|
}
|
|
41528
|
-
function shouldFilterStatusCode2(statusCode, dropForStatusCodes) {
|
|
41529
|
-
return dropForStatusCodes.some((code) => {
|
|
41530
|
-
if (typeof code === "number") {
|
|
41531
|
-
return code === statusCode;
|
|
41532
|
-
}
|
|
41533
|
-
const [min, max] = code;
|
|
41534
|
-
return statusCode >= min && statusCode <= max;
|
|
41535
|
-
});
|
|
41536
|
-
}
|
|
41537
41611
|
|
|
41538
41612
|
// ../../node_modules/@sentry/node/build/esm/integrations/node-fetch.js
|
|
41539
41613
|
var import_instrumentation_undici = __toESM(require_src11(), 1);
|
|
41540
|
-
var
|
|
41541
|
-
var instrumentOtelNodeFetch = generateInstrumentOnce(
|
|
41614
|
+
var INTEGRATION_NAME21 = "NodeFetch";
|
|
41615
|
+
var instrumentOtelNodeFetch = generateInstrumentOnce(INTEGRATION_NAME21, import_instrumentation_undici.UndiciInstrumentation, (options) => {
|
|
41542
41616
|
return getConfigWithDefaults2(options);
|
|
41543
41617
|
});
|
|
41544
|
-
var instrumentSentryNodeFetch2 = generateInstrumentOnce(`${
|
|
41618
|
+
var instrumentSentryNodeFetch2 = generateInstrumentOnce(`${INTEGRATION_NAME21}.sentry`, SentryNodeFetchInstrumentation, (options) => {
|
|
41545
41619
|
return options;
|
|
41546
41620
|
});
|
|
41547
41621
|
var _nativeNodeFetchIntegration2 = (options = {}) => {
|
|
@@ -41590,7 +41664,12 @@ function getConfigWithDefaults2(options = {}) {
|
|
|
41590
41664
|
|
|
41591
41665
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/express.js
|
|
41592
41666
|
var import_instrumentation_express = __toESM(require_src12(), 1);
|
|
41593
|
-
|
|
41667
|
+
|
|
41668
|
+
// ../../node_modules/@sentry/node/build/esm/debug-build.js
|
|
41669
|
+
var DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
41670
|
+
|
|
41671
|
+
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/express.js
|
|
41672
|
+
var INTEGRATION_NAME22 = "Express";
|
|
41594
41673
|
function requestHook(span) {
|
|
41595
41674
|
addOriginToSpan2(span, "auto.http.otel.express");
|
|
41596
41675
|
const attributes = spanToJSON(span).data;
|
|
@@ -41615,13 +41694,13 @@ function spanNameHook(info, defaultName) {
|
|
|
41615
41694
|
}
|
|
41616
41695
|
return defaultName;
|
|
41617
41696
|
}
|
|
41618
|
-
var instrumentExpress = generateInstrumentOnce(
|
|
41697
|
+
var instrumentExpress = generateInstrumentOnce(INTEGRATION_NAME22, () => new import_instrumentation_express.ExpressInstrumentation({
|
|
41619
41698
|
requestHook: (span) => requestHook(span),
|
|
41620
41699
|
spanNameHook: (info, defaultName) => spanNameHook(info, defaultName)
|
|
41621
41700
|
}));
|
|
41622
41701
|
var _expressIntegration = () => {
|
|
41623
41702
|
return {
|
|
41624
|
-
name:
|
|
41703
|
+
name: INTEGRATION_NAME22,
|
|
41625
41704
|
setupOnce() {
|
|
41626
41705
|
instrumentExpress();
|
|
41627
41706
|
}
|
|
@@ -41633,8 +41712,8 @@ var expressIntegration = defineIntegration(_expressIntegration);
|
|
|
41633
41712
|
import * as dc from "node:diagnostics_channel";
|
|
41634
41713
|
|
|
41635
41714
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/fastify-otel/index.js
|
|
41636
|
-
var
|
|
41637
|
-
var
|
|
41715
|
+
var import_api11 = __toESM(require_src(), 1);
|
|
41716
|
+
var import_core73 = __toESM(require_src3(), 1);
|
|
41638
41717
|
var import_instrumentation5 = __toESM(require_src6(), 1);
|
|
41639
41718
|
var import_semantic_conventions3 = __toESM(require_src2(), 1);
|
|
41640
41719
|
import dc__default from "node:diagnostics_channel";
|
|
@@ -42890,7 +42969,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
42890
42969
|
super(PACKAGE_NAME, PACKAGE_VERSION, config);
|
|
42891
42970
|
this.servername = config?.servername ?? process.env.OTEL_SERVICE_NAME ?? "fastify";
|
|
42892
42971
|
this[kIgnorePaths] = null;
|
|
42893
|
-
this._logger =
|
|
42972
|
+
this._logger = import_api11.diag.createComponentLogger({ namespace: PACKAGE_NAME });
|
|
42894
42973
|
if (config?.ignorePaths != null || process.env.OTEL_FASTIFY_IGNORE_PATHS != null) {
|
|
42895
42974
|
const ignorePaths = config?.ignorePaths ?? process.env.OTEL_FASTIFY_IGNORE_PATHS;
|
|
42896
42975
|
if ((typeof ignorePaths !== "string" || ignorePaths.length === 0) && typeof ignorePaths !== "function") {
|
|
@@ -42947,10 +43026,10 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
42947
43026
|
tracer: instrumentation.tracer,
|
|
42948
43027
|
context: ctx,
|
|
42949
43028
|
inject: (carrier, setter) => {
|
|
42950
|
-
return
|
|
43029
|
+
return import_api11.propagation.inject(ctx, carrier, setter);
|
|
42951
43030
|
},
|
|
42952
43031
|
extract: (carrier, getter) => {
|
|
42953
|
-
return
|
|
43032
|
+
return import_api11.propagation.extract(ctx, carrier, getter);
|
|
42954
43033
|
}
|
|
42955
43034
|
};
|
|
42956
43035
|
});
|
|
@@ -43015,12 +43094,12 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43015
43094
|
this[kInstrumentation]._logger.debug(`Ignoring request ${request2.method} ${request2.url} because it matches the ignore path`);
|
|
43016
43095
|
return hookDone();
|
|
43017
43096
|
}
|
|
43018
|
-
let ctx =
|
|
43019
|
-
if (
|
|
43020
|
-
ctx =
|
|
43097
|
+
let ctx = import_api11.context.active();
|
|
43098
|
+
if (import_api11.trace.getSpan(ctx) == null) {
|
|
43099
|
+
ctx = import_api11.propagation.extract(ctx, request2.headers);
|
|
43021
43100
|
}
|
|
43022
|
-
const rpcMetadata =
|
|
43023
|
-
if (request2.routeOptions.url != null && rpcMetadata?.type ===
|
|
43101
|
+
const rpcMetadata = import_core73.getRPCMetadata(ctx);
|
|
43102
|
+
if (request2.routeOptions.url != null && rpcMetadata?.type === import_core73.RPCType.HTTP) {
|
|
43024
43103
|
rpcMetadata.route = request2.routeOptions.url;
|
|
43025
43104
|
}
|
|
43026
43105
|
const span = this[kInstrumentation].tracer.startSpan("request", {
|
|
@@ -43031,9 +43110,9 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43031
43110
|
[import_semantic_conventions3.ATTR_HTTP_REQUEST_METHOD]: request2.method
|
|
43032
43111
|
}
|
|
43033
43112
|
}, ctx);
|
|
43034
|
-
request2[kRequestContext] =
|
|
43113
|
+
request2[kRequestContext] = import_api11.trace.setSpan(ctx, span);
|
|
43035
43114
|
request2[kRequestSpan] = span;
|
|
43036
|
-
|
|
43115
|
+
import_api11.context.with(request2[kRequestContext], () => {
|
|
43037
43116
|
hookDone();
|
|
43038
43117
|
});
|
|
43039
43118
|
});
|
|
@@ -43041,7 +43120,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43041
43120
|
const span = request2[kRequestSpan];
|
|
43042
43121
|
if (span != null) {
|
|
43043
43122
|
span.setStatus({
|
|
43044
|
-
code:
|
|
43123
|
+
code: import_api11.SpanStatusCode.OK,
|
|
43045
43124
|
message: "OK"
|
|
43046
43125
|
});
|
|
43047
43126
|
span.setAttributes({
|
|
@@ -43060,7 +43139,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43060
43139
|
if (span != null) {
|
|
43061
43140
|
if (reply.statusCode < 500) {
|
|
43062
43141
|
span.setStatus({
|
|
43063
|
-
code:
|
|
43142
|
+
code: import_api11.SpanStatusCode.OK,
|
|
43064
43143
|
message: "OK"
|
|
43065
43144
|
});
|
|
43066
43145
|
}
|
|
@@ -43076,7 +43155,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43076
43155
|
const span = request2[kRequestSpan];
|
|
43077
43156
|
if (span != null) {
|
|
43078
43157
|
span.setStatus({
|
|
43079
|
-
code:
|
|
43158
|
+
code: import_api11.SpanStatusCode.ERROR,
|
|
43080
43159
|
message: error2.message
|
|
43081
43160
|
});
|
|
43082
43161
|
span.recordException(error2);
|
|
@@ -43139,11 +43218,11 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43139
43218
|
if (instrumentation2.isEnabled() === false) {
|
|
43140
43219
|
return handler.call(this, ...args);
|
|
43141
43220
|
}
|
|
43142
|
-
const ctx = request2[kRequestContext] ??
|
|
43221
|
+
const ctx = request2[kRequestContext] ?? import_api11.context.active();
|
|
43143
43222
|
const span = instrumentation2.tracer.startSpan(`handler - ${handler.name?.length > 0 ? handler.name : this.pluginName ?? ANONYMOUS_FUNCTION_NAME}`, {
|
|
43144
43223
|
attributes: spanAttributes
|
|
43145
43224
|
}, ctx);
|
|
43146
|
-
return
|
|
43225
|
+
return import_api11.context.with(import_api11.trace.setSpan(ctx, span), function() {
|
|
43147
43226
|
try {
|
|
43148
43227
|
const res = handler.call(this, ...args);
|
|
43149
43228
|
if (typeof res?.then === "function") {
|
|
@@ -43152,7 +43231,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43152
43231
|
return result;
|
|
43153
43232
|
}, (error2) => {
|
|
43154
43233
|
span.setStatus({
|
|
43155
|
-
code:
|
|
43234
|
+
code: import_api11.SpanStatusCode.ERROR,
|
|
43156
43235
|
message: error2.message
|
|
43157
43236
|
});
|
|
43158
43237
|
span.recordException(error2);
|
|
@@ -43164,7 +43243,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43164
43243
|
return res;
|
|
43165
43244
|
} catch (error2) {
|
|
43166
43245
|
span.setStatus({
|
|
43167
|
-
code:
|
|
43246
|
+
code: import_api11.SpanStatusCode.ERROR,
|
|
43168
43247
|
message: error2.message
|
|
43169
43248
|
});
|
|
43170
43249
|
span.recordException(error2);
|
|
@@ -43179,8 +43258,8 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
|
|
|
43179
43258
|
}
|
|
43180
43259
|
|
|
43181
43260
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/v3/instrumentation.js
|
|
43182
|
-
var
|
|
43183
|
-
var
|
|
43261
|
+
var import_api13 = __toESM(require_src(), 1);
|
|
43262
|
+
var import_core74 = __toESM(require_src3(), 1);
|
|
43184
43263
|
var import_instrumentation6 = __toESM(require_src6(), 1);
|
|
43185
43264
|
var import_semantic_conventions4 = __toESM(require_src2(), 1);
|
|
43186
43265
|
|
|
@@ -43212,7 +43291,7 @@ var FastifyNames;
|
|
|
43212
43291
|
})(FastifyNames || (FastifyNames = {}));
|
|
43213
43292
|
|
|
43214
43293
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/v3/utils.js
|
|
43215
|
-
var
|
|
43294
|
+
var import_api12 = __toESM(require_src(), 1);
|
|
43216
43295
|
|
|
43217
43296
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/v3/constants.js
|
|
43218
43297
|
var spanRequestSymbol = Symbol("opentelemetry.instrumentation.fastify.request_active_span");
|
|
@@ -43237,7 +43316,7 @@ function endSpan(reply, err) {
|
|
|
43237
43316
|
spans.forEach((span) => {
|
|
43238
43317
|
if (err) {
|
|
43239
43318
|
span.setStatus({
|
|
43240
|
-
code:
|
|
43319
|
+
code: import_api12.SpanStatusCode.ERROR,
|
|
43241
43320
|
message: err.message
|
|
43242
43321
|
});
|
|
43243
43322
|
span.recordException(err);
|
|
@@ -43305,9 +43384,9 @@ class FastifyInstrumentationV3 extends import_instrumentation6.InstrumentationBa
|
|
|
43305
43384
|
}
|
|
43306
43385
|
instrumentation._wrap(reply, "send", instrumentation._patchSend());
|
|
43307
43386
|
const anyRequest = request2;
|
|
43308
|
-
const rpcMetadata =
|
|
43387
|
+
const rpcMetadata = import_core74.getRPCMetadata(import_api13.context.active());
|
|
43309
43388
|
const routeName = anyRequest.routeOptions ? anyRequest.routeOptions.url : request2.routerPath;
|
|
43310
|
-
if (routeName && rpcMetadata?.type ===
|
|
43389
|
+
if (routeName && rpcMetadata?.type === import_core74.RPCType.HTTP) {
|
|
43311
43390
|
rpcMetadata.route = routeName;
|
|
43312
43391
|
}
|
|
43313
43392
|
const method = request2.method || "GET";
|
|
@@ -43337,13 +43416,13 @@ class FastifyInstrumentationV3 extends import_instrumentation6.InstrumentationBa
|
|
|
43337
43416
|
origDone.apply(this, doneArgs);
|
|
43338
43417
|
};
|
|
43339
43418
|
}
|
|
43340
|
-
return
|
|
43419
|
+
return import_api13.context.with(import_api13.trace.setSpan(import_api13.context.active(), span), () => {
|
|
43341
43420
|
return safeExecuteInTheMiddleMaybePromise(() => {
|
|
43342
43421
|
return original.apply(this, args);
|
|
43343
43422
|
}, (err) => {
|
|
43344
43423
|
if (err instanceof Error) {
|
|
43345
43424
|
span.setStatus({
|
|
43346
|
-
code:
|
|
43425
|
+
code: import_api13.SpanStatusCode.ERROR,
|
|
43347
43426
|
message: err.message
|
|
43348
43427
|
});
|
|
43349
43428
|
span.recordException(err);
|
|
@@ -43440,7 +43519,7 @@ class FastifyInstrumentationV3 extends import_instrumentation6.InstrumentationBa
|
|
|
43440
43519
|
}
|
|
43441
43520
|
}, true);
|
|
43442
43521
|
}
|
|
43443
|
-
return
|
|
43522
|
+
return import_api13.context.with(import_api13.trace.setSpan(import_api13.context.active(), span), () => {
|
|
43444
43523
|
done();
|
|
43445
43524
|
});
|
|
43446
43525
|
};
|
|
@@ -43472,14 +43551,14 @@ function addFastifyV3SpanAttributes(span) {
|
|
|
43472
43551
|
}
|
|
43473
43552
|
|
|
43474
43553
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/index.js
|
|
43475
|
-
var
|
|
43476
|
-
var instrumentFastifyV3 = generateInstrumentOnce(`${
|
|
43554
|
+
var INTEGRATION_NAME23 = "Fastify";
|
|
43555
|
+
var instrumentFastifyV3 = generateInstrumentOnce(`${INTEGRATION_NAME23}.v3`, () => new FastifyInstrumentationV3);
|
|
43477
43556
|
function getFastifyIntegration() {
|
|
43478
43557
|
const client = getClient();
|
|
43479
43558
|
if (!client) {
|
|
43480
43559
|
return;
|
|
43481
43560
|
} else {
|
|
43482
|
-
return client.getIntegrationByName(
|
|
43561
|
+
return client.getIntegrationByName(INTEGRATION_NAME23);
|
|
43483
43562
|
}
|
|
43484
43563
|
}
|
|
43485
43564
|
function handleFastifyError(error2, request2, reply, handlerOrigin) {
|
|
@@ -43495,7 +43574,7 @@ function handleFastifyError(error2, request2, reply, handlerOrigin) {
|
|
|
43495
43574
|
captureException(error2, { mechanism: { handled: false, type: "auto.function.fastify" } });
|
|
43496
43575
|
}
|
|
43497
43576
|
}
|
|
43498
|
-
var instrumentFastify = generateInstrumentOnce(`${
|
|
43577
|
+
var instrumentFastify = generateInstrumentOnce(`${INTEGRATION_NAME23}.v5`, () => {
|
|
43499
43578
|
const fastifyOtelInstrumentationInstance = new FastifyOtelInstrumentation;
|
|
43500
43579
|
const plugin = fastifyOtelInstrumentationInstance.plugin();
|
|
43501
43580
|
dc.subscribe("fastify.initialization", (message) => {
|
|
@@ -43520,7 +43599,7 @@ var instrumentFastify = generateInstrumentOnce(`${INTEGRATION_NAME21}.v5`, () =>
|
|
|
43520
43599
|
var _fastifyIntegration = ({ shouldHandleError }) => {
|
|
43521
43600
|
let _shouldHandleError;
|
|
43522
43601
|
return {
|
|
43523
|
-
name:
|
|
43602
|
+
name: INTEGRATION_NAME23,
|
|
43524
43603
|
setupOnce() {
|
|
43525
43604
|
_shouldHandleError = shouldHandleError || defaultShouldHandleError;
|
|
43526
43605
|
instrumentFastifyV3();
|
|
@@ -43584,10 +43663,10 @@ function instrumentOnRequest(fastify) {
|
|
|
43584
43663
|
}
|
|
43585
43664
|
|
|
43586
43665
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/graphql.js
|
|
43587
|
-
var
|
|
43666
|
+
var import_api14 = __toESM(require_src(), 1);
|
|
43588
43667
|
var import_instrumentation_graphql = __toESM(require_src13(), 1);
|
|
43589
|
-
var
|
|
43590
|
-
var instrumentGraphql = generateInstrumentOnce(
|
|
43668
|
+
var INTEGRATION_NAME24 = "Graphql";
|
|
43669
|
+
var instrumentGraphql = generateInstrumentOnce(INTEGRATION_NAME24, import_instrumentation_graphql.GraphQLInstrumentation, (_options) => {
|
|
43591
43670
|
const options = getOptionsWithDefaults(_options);
|
|
43592
43671
|
return {
|
|
43593
43672
|
...options,
|
|
@@ -43595,7 +43674,7 @@ var instrumentGraphql = generateInstrumentOnce(INTEGRATION_NAME22, import_instru
|
|
|
43595
43674
|
addOriginToSpan2(span, "auto.graphql.otel.graphql");
|
|
43596
43675
|
const resultWithMaybeError = result;
|
|
43597
43676
|
if (resultWithMaybeError.errors?.length && !spanToJSON(span).status) {
|
|
43598
|
-
span.setStatus({ code:
|
|
43677
|
+
span.setStatus({ code: import_api14.SpanStatusCode.ERROR });
|
|
43599
43678
|
}
|
|
43600
43679
|
const attributes = spanToJSON(span).data;
|
|
43601
43680
|
const operationType = attributes["graphql.operation.type"];
|
|
@@ -43623,7 +43702,7 @@ var instrumentGraphql = generateInstrumentOnce(INTEGRATION_NAME22, import_instru
|
|
|
43623
43702
|
});
|
|
43624
43703
|
var _graphqlIntegration = (options = {}) => {
|
|
43625
43704
|
return {
|
|
43626
|
-
name:
|
|
43705
|
+
name: INTEGRATION_NAME24,
|
|
43627
43706
|
setupOnce() {
|
|
43628
43707
|
instrumentGraphql(getOptionsWithDefaults(options));
|
|
43629
43708
|
}
|
|
@@ -43652,8 +43731,8 @@ function getGraphqlOperationNamesFromAttribute2(attr) {
|
|
|
43652
43731
|
|
|
43653
43732
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/kafka.js
|
|
43654
43733
|
var import_instrumentation_kafkajs = __toESM(require_src14(), 1);
|
|
43655
|
-
var
|
|
43656
|
-
var instrumentKafka = generateInstrumentOnce(
|
|
43734
|
+
var INTEGRATION_NAME25 = "Kafka";
|
|
43735
|
+
var instrumentKafka = generateInstrumentOnce(INTEGRATION_NAME25, () => new import_instrumentation_kafkajs.KafkaJsInstrumentation({
|
|
43657
43736
|
consumerHook(span) {
|
|
43658
43737
|
addOriginToSpan2(span, "auto.kafkajs.otel.consumer");
|
|
43659
43738
|
},
|
|
@@ -43663,7 +43742,7 @@ var instrumentKafka = generateInstrumentOnce(INTEGRATION_NAME23, () => new impor
|
|
|
43663
43742
|
}));
|
|
43664
43743
|
var _kafkaIntegration = () => {
|
|
43665
43744
|
return {
|
|
43666
|
-
name:
|
|
43745
|
+
name: INTEGRATION_NAME25,
|
|
43667
43746
|
setupOnce() {
|
|
43668
43747
|
instrumentKafka();
|
|
43669
43748
|
}
|
|
@@ -43673,11 +43752,11 @@ var kafkaIntegration = defineIntegration(_kafkaIntegration);
|
|
|
43673
43752
|
|
|
43674
43753
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/lrumemoizer.js
|
|
43675
43754
|
var import_instrumentation_lru_memoizer = __toESM(require_src15(), 1);
|
|
43676
|
-
var
|
|
43677
|
-
var instrumentLruMemoizer = generateInstrumentOnce(
|
|
43755
|
+
var INTEGRATION_NAME26 = "LruMemoizer";
|
|
43756
|
+
var instrumentLruMemoizer = generateInstrumentOnce(INTEGRATION_NAME26, () => new import_instrumentation_lru_memoizer.LruMemoizerInstrumentation);
|
|
43678
43757
|
var _lruMemoizerIntegration = () => {
|
|
43679
43758
|
return {
|
|
43680
|
-
name:
|
|
43759
|
+
name: INTEGRATION_NAME26,
|
|
43681
43760
|
setupOnce() {
|
|
43682
43761
|
instrumentLruMemoizer();
|
|
43683
43762
|
}
|
|
@@ -43687,8 +43766,8 @@ var lruMemoizerIntegration = defineIntegration(_lruMemoizerIntegration);
|
|
|
43687
43766
|
|
|
43688
43767
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/mongo.js
|
|
43689
43768
|
var import_instrumentation_mongodb = __toESM(require_src16(), 1);
|
|
43690
|
-
var
|
|
43691
|
-
var instrumentMongo = generateInstrumentOnce(
|
|
43769
|
+
var INTEGRATION_NAME27 = "Mongo";
|
|
43770
|
+
var instrumentMongo = generateInstrumentOnce(INTEGRATION_NAME27, () => new import_instrumentation_mongodb.MongoDBInstrumentation({
|
|
43692
43771
|
dbStatementSerializer: _defaultDbStatementSerializer,
|
|
43693
43772
|
responseHook(span) {
|
|
43694
43773
|
addOriginToSpan2(span, "auto.db.otel.mongo");
|
|
@@ -43728,7 +43807,7 @@ function isCommandEntry(value) {
|
|
|
43728
43807
|
}
|
|
43729
43808
|
var _mongoIntegration = () => {
|
|
43730
43809
|
return {
|
|
43731
|
-
name:
|
|
43810
|
+
name: INTEGRATION_NAME27,
|
|
43732
43811
|
setupOnce() {
|
|
43733
43812
|
instrumentMongo();
|
|
43734
43813
|
}
|
|
@@ -43738,15 +43817,15 @@ var mongoIntegration = defineIntegration(_mongoIntegration);
|
|
|
43738
43817
|
|
|
43739
43818
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/mongoose.js
|
|
43740
43819
|
var import_instrumentation_mongoose = __toESM(require_src17(), 1);
|
|
43741
|
-
var
|
|
43742
|
-
var instrumentMongoose = generateInstrumentOnce(
|
|
43820
|
+
var INTEGRATION_NAME28 = "Mongoose";
|
|
43821
|
+
var instrumentMongoose = generateInstrumentOnce(INTEGRATION_NAME28, () => new import_instrumentation_mongoose.MongooseInstrumentation({
|
|
43743
43822
|
responseHook(span) {
|
|
43744
43823
|
addOriginToSpan2(span, "auto.db.otel.mongoose");
|
|
43745
43824
|
}
|
|
43746
43825
|
}));
|
|
43747
43826
|
var _mongooseIntegration = () => {
|
|
43748
43827
|
return {
|
|
43749
|
-
name:
|
|
43828
|
+
name: INTEGRATION_NAME28,
|
|
43750
43829
|
setupOnce() {
|
|
43751
43830
|
instrumentMongoose();
|
|
43752
43831
|
}
|
|
@@ -43756,11 +43835,11 @@ var mongooseIntegration = defineIntegration(_mongooseIntegration);
|
|
|
43756
43835
|
|
|
43757
43836
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/mysql.js
|
|
43758
43837
|
var import_instrumentation_mysql = __toESM(require_src18(), 1);
|
|
43759
|
-
var
|
|
43760
|
-
var instrumentMysql = generateInstrumentOnce(
|
|
43838
|
+
var INTEGRATION_NAME29 = "Mysql";
|
|
43839
|
+
var instrumentMysql = generateInstrumentOnce(INTEGRATION_NAME29, () => new import_instrumentation_mysql.MySQLInstrumentation({}));
|
|
43761
43840
|
var _mysqlIntegration = () => {
|
|
43762
43841
|
return {
|
|
43763
|
-
name:
|
|
43842
|
+
name: INTEGRATION_NAME29,
|
|
43764
43843
|
setupOnce() {
|
|
43765
43844
|
instrumentMysql();
|
|
43766
43845
|
}
|
|
@@ -43770,15 +43849,15 @@ var mysqlIntegration = defineIntegration(_mysqlIntegration);
|
|
|
43770
43849
|
|
|
43771
43850
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/mysql2.js
|
|
43772
43851
|
var import_instrumentation_mysql2 = __toESM(require_src20(), 1);
|
|
43773
|
-
var
|
|
43774
|
-
var instrumentMysql2 = generateInstrumentOnce(
|
|
43852
|
+
var INTEGRATION_NAME30 = "Mysql2";
|
|
43853
|
+
var instrumentMysql2 = generateInstrumentOnce(INTEGRATION_NAME30, () => new import_instrumentation_mysql2.MySQL2Instrumentation({
|
|
43775
43854
|
responseHook(span) {
|
|
43776
43855
|
addOriginToSpan2(span, "auto.db.otel.mysql2");
|
|
43777
43856
|
}
|
|
43778
43857
|
}));
|
|
43779
43858
|
var _mysql2Integration = () => {
|
|
43780
43859
|
return {
|
|
43781
|
-
name:
|
|
43860
|
+
name: INTEGRATION_NAME30,
|
|
43782
43861
|
setupOnce() {
|
|
43783
43862
|
instrumentMysql2();
|
|
43784
43863
|
}
|
|
@@ -43880,7 +43959,7 @@ function flatten(input) {
|
|
|
43880
43959
|
}
|
|
43881
43960
|
|
|
43882
43961
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/redis.js
|
|
43883
|
-
var
|
|
43962
|
+
var INTEGRATION_NAME31 = "Redis";
|
|
43884
43963
|
var _redisOptions = {};
|
|
43885
43964
|
var cacheResponseHook = (span, redisCommand, cmdArgs, response) => {
|
|
43886
43965
|
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.db.otel.redis");
|
|
@@ -43908,12 +43987,12 @@ var cacheResponseHook = (span, redisCommand, cmdArgs, response) => {
|
|
|
43908
43987
|
const spanDescription = safeKey.join(", ");
|
|
43909
43988
|
span.updateName(truncate(spanDescription, 1024));
|
|
43910
43989
|
};
|
|
43911
|
-
var instrumentIORedis = generateInstrumentOnce(`${
|
|
43990
|
+
var instrumentIORedis = generateInstrumentOnce(`${INTEGRATION_NAME31}.IORedis`, () => {
|
|
43912
43991
|
return new import_instrumentation_ioredis.IORedisInstrumentation({
|
|
43913
43992
|
responseHook: cacheResponseHook
|
|
43914
43993
|
});
|
|
43915
43994
|
});
|
|
43916
|
-
var instrumentRedisModule = generateInstrumentOnce(`${
|
|
43995
|
+
var instrumentRedisModule = generateInstrumentOnce(`${INTEGRATION_NAME31}.Redis`, () => {
|
|
43917
43996
|
return new import_instrumentation_redis.RedisInstrumentation({
|
|
43918
43997
|
responseHook: cacheResponseHook
|
|
43919
43998
|
});
|
|
@@ -43921,10 +44000,10 @@ var instrumentRedisModule = generateInstrumentOnce(`${INTEGRATION_NAME29}.Redis`
|
|
|
43921
44000
|
var instrumentRedis = Object.assign(() => {
|
|
43922
44001
|
instrumentIORedis();
|
|
43923
44002
|
instrumentRedisModule();
|
|
43924
|
-
}, { id:
|
|
44003
|
+
}, { id: INTEGRATION_NAME31 });
|
|
43925
44004
|
var _redisIntegration = (options = {}) => {
|
|
43926
44005
|
return {
|
|
43927
|
-
name:
|
|
44006
|
+
name: INTEGRATION_NAME31,
|
|
43928
44007
|
setupOnce() {
|
|
43929
44008
|
_redisOptions = options;
|
|
43930
44009
|
instrumentRedis();
|
|
@@ -43935,8 +44014,8 @@ var redisIntegration = defineIntegration(_redisIntegration);
|
|
|
43935
44014
|
|
|
43936
44015
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/postgres.js
|
|
43937
44016
|
var import_instrumentation_pg = __toESM(require_src24(), 1);
|
|
43938
|
-
var
|
|
43939
|
-
var instrumentPostgres = generateInstrumentOnce(
|
|
44017
|
+
var INTEGRATION_NAME32 = "Postgres";
|
|
44018
|
+
var instrumentPostgres = generateInstrumentOnce(INTEGRATION_NAME32, () => new import_instrumentation_pg.PgInstrumentation({
|
|
43940
44019
|
requireParentSpan: true,
|
|
43941
44020
|
requestHook(span) {
|
|
43942
44021
|
addOriginToSpan2(span, "auto.db.otel.postgres");
|
|
@@ -43944,7 +44023,7 @@ var instrumentPostgres = generateInstrumentOnce(INTEGRATION_NAME30, () => new im
|
|
|
43944
44023
|
}));
|
|
43945
44024
|
var _postgresIntegration = () => {
|
|
43946
44025
|
return {
|
|
43947
|
-
name:
|
|
44026
|
+
name: INTEGRATION_NAME32,
|
|
43948
44027
|
setupOnce() {
|
|
43949
44028
|
instrumentPostgres();
|
|
43950
44029
|
}
|
|
@@ -43953,12 +44032,12 @@ var _postgresIntegration = () => {
|
|
|
43953
44032
|
var postgresIntegration = defineIntegration(_postgresIntegration);
|
|
43954
44033
|
|
|
43955
44034
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/postgresjs.js
|
|
43956
|
-
var
|
|
44035
|
+
var import_api15 = __toESM(require_src(), 1);
|
|
43957
44036
|
var import_instrumentation8 = __toESM(require_src6(), 1);
|
|
43958
44037
|
var import_semantic_conventions5 = __toESM(require_src2(), 1);
|
|
43959
|
-
var
|
|
44038
|
+
var INTEGRATION_NAME33 = "PostgresJs";
|
|
43960
44039
|
var SUPPORTED_VERSIONS2 = [">=3.0.0 <4"];
|
|
43961
|
-
var instrumentPostgresJs = generateInstrumentOnce(
|
|
44040
|
+
var instrumentPostgresJs = generateInstrumentOnce(INTEGRATION_NAME33, (options) => new PostgresJsInstrumentation({
|
|
43962
44041
|
requireParentSpan: options?.requireParentSpan ?? true,
|
|
43963
44042
|
requestHook: options?.requestHook
|
|
43964
44043
|
}));
|
|
@@ -43977,7 +44056,7 @@ class PostgresJsInstrumentation extends import_instrumentation8.InstrumentationB
|
|
|
43977
44056
|
}
|
|
43978
44057
|
_shouldCreateSpans() {
|
|
43979
44058
|
const config = this.getConfig();
|
|
43980
|
-
const hasParentSpan =
|
|
44059
|
+
const hasParentSpan = import_api15.trace.getSpan(import_api15.context.active()) !== undefined;
|
|
43981
44060
|
return hasParentSpan || !config.requireParentSpan;
|
|
43982
44061
|
}
|
|
43983
44062
|
_patchReject(rejectTarget, span) {
|
|
@@ -44026,7 +44105,7 @@ class PostgresJsInstrumentation extends import_instrumentation8.InstrumentationB
|
|
|
44026
44105
|
if (requestHook2) {
|
|
44027
44106
|
import_instrumentation8.safeExecuteInTheMiddle(() => requestHook2(span, sanitizedSqlQuery, postgresConnectionContext), (error2) => {
|
|
44028
44107
|
if (error2) {
|
|
44029
|
-
debug.error(`Error in requestHook for ${
|
|
44108
|
+
debug.error(`Error in requestHook for ${INTEGRATION_NAME33} integration:`, error2);
|
|
44030
44109
|
}
|
|
44031
44110
|
});
|
|
44032
44111
|
}
|
|
@@ -44079,7 +44158,7 @@ class PostgresJsInstrumentation extends import_instrumentation8.InstrumentationB
|
|
|
44079
44158
|
}
|
|
44080
44159
|
var _postgresJsIntegration = () => {
|
|
44081
44160
|
return {
|
|
44082
|
-
name:
|
|
44161
|
+
name: INTEGRATION_NAME33,
|
|
44083
44162
|
setupOnce() {
|
|
44084
44163
|
instrumentPostgresJs();
|
|
44085
44164
|
}
|
|
@@ -44088,21 +44167,21 @@ var _postgresJsIntegration = () => {
|
|
|
44088
44167
|
var postgresJsIntegration = defineIntegration(_postgresJsIntegration);
|
|
44089
44168
|
|
|
44090
44169
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/prisma.js
|
|
44091
|
-
var
|
|
44170
|
+
var import_api18 = __toESM(require_src(), 1);
|
|
44092
44171
|
|
|
44093
44172
|
// ../../node_modules/@prisma/instrumentation/dist/index.mjs
|
|
44094
|
-
var import_api15 = __toESM(require_src(), 1);
|
|
44095
|
-
var import_instrumentation9 = __toESM(require_src26(), 1);
|
|
44096
44173
|
var import_api16 = __toESM(require_src(), 1);
|
|
44174
|
+
var import_instrumentation9 = __toESM(require_src26(), 1);
|
|
44175
|
+
var import_api17 = __toESM(require_src(), 1);
|
|
44097
44176
|
var showAllTraces = process.env.PRISMA_SHOW_ALL_TRACES === "true";
|
|
44098
44177
|
var nonSampledTraceParent = `00-10-10-00`;
|
|
44099
44178
|
function engineSpanKindToOtelSpanKind(engineSpanKind) {
|
|
44100
44179
|
switch (engineSpanKind) {
|
|
44101
44180
|
case "client":
|
|
44102
|
-
return
|
|
44181
|
+
return import_api17.SpanKind.CLIENT;
|
|
44103
44182
|
case "internal":
|
|
44104
44183
|
default:
|
|
44105
|
-
return
|
|
44184
|
+
return import_api17.SpanKind.INTERNAL;
|
|
44106
44185
|
}
|
|
44107
44186
|
}
|
|
44108
44187
|
var ActiveTracingHelper = class {
|
|
@@ -44115,8 +44194,8 @@ var ActiveTracingHelper = class {
|
|
|
44115
44194
|
isEnabled() {
|
|
44116
44195
|
return true;
|
|
44117
44196
|
}
|
|
44118
|
-
getTraceParent(
|
|
44119
|
-
const span =
|
|
44197
|
+
getTraceParent(context10) {
|
|
44198
|
+
const span = import_api17.trace.getSpanContext(context10 ?? import_api17.context.active());
|
|
44120
44199
|
if (span) {
|
|
44121
44200
|
return `00-${span.traceId}-${span.spanId}-0${span.traceFlags}`;
|
|
44122
44201
|
}
|
|
@@ -44131,7 +44210,7 @@ var ActiveTracingHelper = class {
|
|
|
44131
44210
|
}
|
|
44132
44211
|
}
|
|
44133
44212
|
getActiveContext() {
|
|
44134
|
-
return
|
|
44213
|
+
return import_api17.context.active();
|
|
44135
44214
|
}
|
|
44136
44215
|
runInChildSpan(options, callback) {
|
|
44137
44216
|
if (typeof options === "string") {
|
|
@@ -44141,16 +44220,16 @@ var ActiveTracingHelper = class {
|
|
|
44141
44220
|
return callback();
|
|
44142
44221
|
}
|
|
44143
44222
|
const tracer = this.tracerProvider.getTracer("prisma");
|
|
44144
|
-
const
|
|
44223
|
+
const context10 = options.context ?? this.getActiveContext();
|
|
44145
44224
|
const name = `prisma:client:${options.name}`;
|
|
44146
44225
|
if (shouldIgnoreSpan2(name, this.ignoreSpanTypes)) {
|
|
44147
44226
|
return callback();
|
|
44148
44227
|
}
|
|
44149
44228
|
if (options.active === false) {
|
|
44150
|
-
const span = tracer.startSpan(name, options,
|
|
44151
|
-
return endSpan2(span, callback(span,
|
|
44229
|
+
const span = tracer.startSpan(name, options, context10);
|
|
44230
|
+
return endSpan2(span, callback(span, context10));
|
|
44152
44231
|
}
|
|
44153
|
-
return tracer.startActiveSpan(name, options, (span) => endSpan2(span, callback(span,
|
|
44232
|
+
return tracer.startActiveSpan(name, options, (span) => endSpan2(span, callback(span, context10)));
|
|
44154
44233
|
}
|
|
44155
44234
|
};
|
|
44156
44235
|
function dispatchEngineSpan(tracer, engineSpan, allSpans, linkIds, ignoreSpanTypes) {
|
|
@@ -44286,7 +44365,7 @@ var PrismaInstrumentation = class extends import_instrumentation9.Instrumentatio
|
|
|
44286
44365
|
const config = this._config;
|
|
44287
44366
|
const globalValue = {
|
|
44288
44367
|
helper: new ActiveTracingHelper({
|
|
44289
|
-
tracerProvider: this.tracerProvider ??
|
|
44368
|
+
tracerProvider: this.tracerProvider ?? import_api16.trace.getTracerProvider(),
|
|
44290
44369
|
ignoreSpanTypes: config.ignoreSpanTypes ?? []
|
|
44291
44370
|
})
|
|
44292
44371
|
};
|
|
@@ -44303,7 +44382,7 @@ var PrismaInstrumentation = class extends import_instrumentation9.Instrumentatio
|
|
|
44303
44382
|
};
|
|
44304
44383
|
|
|
44305
44384
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/prisma.js
|
|
44306
|
-
var
|
|
44385
|
+
var INTEGRATION_NAME34 = "Prisma";
|
|
44307
44386
|
function isPrismaV6TracingHelper(helper) {
|
|
44308
44387
|
return !!helper && typeof helper === "object" && "dispatchEngineSpans" in helper;
|
|
44309
44388
|
}
|
|
@@ -44322,7 +44401,7 @@ class SentryPrismaInteropInstrumentation extends PrismaInstrumentation {
|
|
|
44322
44401
|
const prismaTracingHelper = getPrismaTracingHelper();
|
|
44323
44402
|
if (isPrismaV6TracingHelper(prismaTracingHelper)) {
|
|
44324
44403
|
prismaTracingHelper.createEngineSpan = (engineSpanEvent) => {
|
|
44325
|
-
const tracer =
|
|
44404
|
+
const tracer = import_api18.trace.getTracer("prismaV5Compatibility");
|
|
44326
44405
|
const initialIdGenerator = tracer._idGenerator;
|
|
44327
44406
|
if (!initialIdGenerator) {
|
|
44328
44407
|
consoleSandbox(() => {
|
|
@@ -44341,16 +44420,16 @@ class SentryPrismaInteropInstrumentation extends PrismaInstrumentation {
|
|
|
44341
44420
|
context: {
|
|
44342
44421
|
traceId: link.trace_id,
|
|
44343
44422
|
spanId: link.span_id,
|
|
44344
|
-
traceFlags:
|
|
44423
|
+
traceFlags: import_api18.TraceFlags.SAMPLED
|
|
44345
44424
|
}
|
|
44346
44425
|
};
|
|
44347
44426
|
});
|
|
44348
|
-
const ctx =
|
|
44427
|
+
const ctx = import_api18.trace.setSpanContext(import_api18.context.active(), {
|
|
44349
44428
|
traceId,
|
|
44350
44429
|
spanId: parentSpanId,
|
|
44351
|
-
traceFlags:
|
|
44430
|
+
traceFlags: import_api18.TraceFlags.SAMPLED
|
|
44352
44431
|
});
|
|
44353
|
-
|
|
44432
|
+
import_api18.context.with(ctx, () => {
|
|
44354
44433
|
const temporaryIdGenerator = {
|
|
44355
44434
|
generateTraceId: () => {
|
|
44356
44435
|
return traceId;
|
|
@@ -44380,18 +44459,18 @@ class SentryPrismaInteropInstrumentation extends PrismaInstrumentation {
|
|
|
44380
44459
|
function engineSpanKindToOTELSpanKind(engineSpanKind) {
|
|
44381
44460
|
switch (engineSpanKind) {
|
|
44382
44461
|
case "client":
|
|
44383
|
-
return
|
|
44462
|
+
return import_api18.SpanKind.CLIENT;
|
|
44384
44463
|
case "internal":
|
|
44385
44464
|
default:
|
|
44386
|
-
return
|
|
44465
|
+
return import_api18.SpanKind.INTERNAL;
|
|
44387
44466
|
}
|
|
44388
44467
|
}
|
|
44389
|
-
var instrumentPrisma = generateInstrumentOnce(
|
|
44468
|
+
var instrumentPrisma = generateInstrumentOnce(INTEGRATION_NAME34, (_options) => {
|
|
44390
44469
|
return new SentryPrismaInteropInstrumentation;
|
|
44391
44470
|
});
|
|
44392
44471
|
var prismaIntegration = defineIntegration((_options) => {
|
|
44393
44472
|
return {
|
|
44394
|
-
name:
|
|
44473
|
+
name: INTEGRATION_NAME34,
|
|
44395
44474
|
setupOnce() {
|
|
44396
44475
|
instrumentPrisma();
|
|
44397
44476
|
},
|
|
@@ -44417,11 +44496,11 @@ var prismaIntegration = defineIntegration((_options) => {
|
|
|
44417
44496
|
|
|
44418
44497
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/hapi/index.js
|
|
44419
44498
|
var import_instrumentation_hapi = __toESM(require_src27(), 1);
|
|
44420
|
-
var
|
|
44421
|
-
var instrumentHapi = generateInstrumentOnce(
|
|
44499
|
+
var INTEGRATION_NAME35 = "Hapi";
|
|
44500
|
+
var instrumentHapi = generateInstrumentOnce(INTEGRATION_NAME35, () => new import_instrumentation_hapi.HapiInstrumentation);
|
|
44422
44501
|
var _hapiIntegration = () => {
|
|
44423
44502
|
return {
|
|
44424
|
-
name:
|
|
44503
|
+
name: INTEGRATION_NAME35,
|
|
44425
44504
|
setupOnce() {
|
|
44426
44505
|
instrumentHapi();
|
|
44427
44506
|
}
|
|
@@ -44443,7 +44522,7 @@ var HonoTypes = {
|
|
|
44443
44522
|
};
|
|
44444
44523
|
|
|
44445
44524
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/hono/instrumentation.js
|
|
44446
|
-
var
|
|
44525
|
+
var import_api19 = __toESM(require_src(), 1);
|
|
44447
44526
|
var import_instrumentation11 = __toESM(require_src6(), 1);
|
|
44448
44527
|
var PACKAGE_NAME3 = "@sentry/instrumentation-hono";
|
|
44449
44528
|
var PACKAGE_VERSION3 = "0.0.1";
|
|
@@ -44539,7 +44618,7 @@ class HonoInstrumentation extends import_instrumentation11.InstrumentationBase {
|
|
|
44539
44618
|
}
|
|
44540
44619
|
const path8 = c.req.path;
|
|
44541
44620
|
const span = instrumentation.tracer.startSpan(path8);
|
|
44542
|
-
return
|
|
44621
|
+
return import_api19.context.with(import_api19.trace.setSpan(import_api19.context.active(), span), () => {
|
|
44543
44622
|
return instrumentation._safeExecute(() => {
|
|
44544
44623
|
const result = handler.apply(this, [c, next]);
|
|
44545
44624
|
if (isThenable(result)) {
|
|
@@ -44588,7 +44667,7 @@ class HonoInstrumentation extends import_instrumentation11.InstrumentationBase {
|
|
|
44588
44667
|
_handleError(span, error2) {
|
|
44589
44668
|
if (error2 instanceof Error) {
|
|
44590
44669
|
span.setStatus({
|
|
44591
|
-
code:
|
|
44670
|
+
code: import_api19.SpanStatusCode.ERROR,
|
|
44592
44671
|
message: error2.message
|
|
44593
44672
|
});
|
|
44594
44673
|
span.recordException(error2);
|
|
@@ -44597,7 +44676,7 @@ class HonoInstrumentation extends import_instrumentation11.InstrumentationBase {
|
|
|
44597
44676
|
}
|
|
44598
44677
|
|
|
44599
44678
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/hono/index.js
|
|
44600
|
-
var
|
|
44679
|
+
var INTEGRATION_NAME36 = "Hono";
|
|
44601
44680
|
function addHonoSpanAttributes(span) {
|
|
44602
44681
|
const attributes = spanToJSON(span).data;
|
|
44603
44682
|
const type = attributes[AttributeNames2.HONO_TYPE];
|
|
@@ -44622,14 +44701,14 @@ function addHonoSpanAttributes(span) {
|
|
|
44622
44701
|
getIsolationScope().setTransactionName(`${method} ${route}`);
|
|
44623
44702
|
}
|
|
44624
44703
|
}
|
|
44625
|
-
var instrumentHono = generateInstrumentOnce(
|
|
44704
|
+
var instrumentHono = generateInstrumentOnce(INTEGRATION_NAME36, () => new HonoInstrumentation({
|
|
44626
44705
|
responseHook: (span) => {
|
|
44627
44706
|
addHonoSpanAttributes(span);
|
|
44628
44707
|
}
|
|
44629
44708
|
}));
|
|
44630
44709
|
var _honoIntegration = () => {
|
|
44631
44710
|
return {
|
|
44632
|
-
name:
|
|
44711
|
+
name: INTEGRATION_NAME36,
|
|
44633
44712
|
setupOnce() {
|
|
44634
44713
|
instrumentHono();
|
|
44635
44714
|
}
|
|
@@ -44640,8 +44719,8 @@ var honoIntegration = defineIntegration(_honoIntegration);
|
|
|
44640
44719
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/koa.js
|
|
44641
44720
|
var import_instrumentation_koa = __toESM(require_src28(), 1);
|
|
44642
44721
|
var import_semantic_conventions7 = __toESM(require_src2(), 1);
|
|
44643
|
-
var
|
|
44644
|
-
var instrumentKoa = generateInstrumentOnce(
|
|
44722
|
+
var INTEGRATION_NAME37 = "Koa";
|
|
44723
|
+
var instrumentKoa = generateInstrumentOnce(INTEGRATION_NAME37, import_instrumentation_koa.KoaInstrumentation, (options = {}) => {
|
|
44645
44724
|
return {
|
|
44646
44725
|
ignoreLayersType: options.ignoreLayersType,
|
|
44647
44726
|
requestHook(span, info) {
|
|
@@ -44669,7 +44748,7 @@ var instrumentKoa = generateInstrumentOnce(INTEGRATION_NAME35, import_instrument
|
|
|
44669
44748
|
});
|
|
44670
44749
|
var _koaIntegration = (options = {}) => {
|
|
44671
44750
|
return {
|
|
44672
|
-
name:
|
|
44751
|
+
name: INTEGRATION_NAME37,
|
|
44673
44752
|
setupOnce() {
|
|
44674
44753
|
instrumentKoa(options);
|
|
44675
44754
|
}
|
|
@@ -44679,11 +44758,11 @@ var koaIntegration = defineIntegration(_koaIntegration);
|
|
|
44679
44758
|
|
|
44680
44759
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/connect.js
|
|
44681
44760
|
var import_instrumentation_connect = __toESM(require_src29(), 1);
|
|
44682
|
-
var
|
|
44683
|
-
var instrumentConnect = generateInstrumentOnce(
|
|
44761
|
+
var INTEGRATION_NAME38 = "Connect";
|
|
44762
|
+
var instrumentConnect = generateInstrumentOnce(INTEGRATION_NAME38, () => new import_instrumentation_connect.ConnectInstrumentation);
|
|
44684
44763
|
var _connectIntegration = () => {
|
|
44685
44764
|
return {
|
|
44686
|
-
name:
|
|
44765
|
+
name: INTEGRATION_NAME38,
|
|
44687
44766
|
setupOnce() {
|
|
44688
44767
|
instrumentConnect();
|
|
44689
44768
|
}
|
|
@@ -44701,12 +44780,12 @@ var TEDIUS_INSTRUMENTED_METHODS = new Set([
|
|
|
44701
44780
|
"prepare",
|
|
44702
44781
|
"execute"
|
|
44703
44782
|
]);
|
|
44704
|
-
var
|
|
44705
|
-
var instrumentTedious = generateInstrumentOnce(
|
|
44783
|
+
var INTEGRATION_NAME39 = "Tedious";
|
|
44784
|
+
var instrumentTedious = generateInstrumentOnce(INTEGRATION_NAME39, () => new import_instrumentation_tedious.TediousInstrumentation({}));
|
|
44706
44785
|
var _tediousIntegration = () => {
|
|
44707
44786
|
let instrumentationWrappedCallback;
|
|
44708
44787
|
return {
|
|
44709
|
-
name:
|
|
44788
|
+
name: INTEGRATION_NAME39,
|
|
44710
44789
|
setupOnce() {
|
|
44711
44790
|
const instrumentation = instrumentTedious();
|
|
44712
44791
|
instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);
|
|
@@ -44729,12 +44808,12 @@ var tediousIntegration = defineIntegration(_tediousIntegration);
|
|
|
44729
44808
|
|
|
44730
44809
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/genericPool.js
|
|
44731
44810
|
var import_instrumentation_generic_pool = __toESM(require_src31(), 1);
|
|
44732
|
-
var
|
|
44733
|
-
var instrumentGenericPool = generateInstrumentOnce(
|
|
44811
|
+
var INTEGRATION_NAME40 = "GenericPool";
|
|
44812
|
+
var instrumentGenericPool = generateInstrumentOnce(INTEGRATION_NAME40, () => new import_instrumentation_generic_pool.GenericPoolInstrumentation({}));
|
|
44734
44813
|
var _genericPoolIntegration = () => {
|
|
44735
44814
|
let instrumentationWrappedCallback;
|
|
44736
44815
|
return {
|
|
44737
|
-
name:
|
|
44816
|
+
name: INTEGRATION_NAME40,
|
|
44738
44817
|
setupOnce() {
|
|
44739
44818
|
const instrumentation = instrumentGenericPool();
|
|
44740
44819
|
instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);
|
|
@@ -44755,7 +44834,7 @@ var genericPoolIntegration = defineIntegration(_genericPoolIntegration);
|
|
|
44755
44834
|
|
|
44756
44835
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/amqplib.js
|
|
44757
44836
|
var import_instrumentation_amqplib = __toESM(require_src32(), 1);
|
|
44758
|
-
var
|
|
44837
|
+
var INTEGRATION_NAME41 = "Amqplib";
|
|
44759
44838
|
var config = {
|
|
44760
44839
|
consumeEndHook: (span) => {
|
|
44761
44840
|
addOriginToSpan2(span, "auto.amqplib.otel.consumer");
|
|
@@ -44764,10 +44843,10 @@ var config = {
|
|
|
44764
44843
|
addOriginToSpan2(span, "auto.amqplib.otel.publisher");
|
|
44765
44844
|
}
|
|
44766
44845
|
};
|
|
44767
|
-
var instrumentAmqplib = generateInstrumentOnce(
|
|
44846
|
+
var instrumentAmqplib = generateInstrumentOnce(INTEGRATION_NAME41, () => new import_instrumentation_amqplib.AmqplibInstrumentation(config));
|
|
44768
44847
|
var _amqplibIntegration = () => {
|
|
44769
44848
|
return {
|
|
44770
|
-
name:
|
|
44849
|
+
name: INTEGRATION_NAME41,
|
|
44771
44850
|
setupOnce() {
|
|
44772
44851
|
instrumentAmqplib();
|
|
44773
44852
|
}
|
|
@@ -44776,7 +44855,7 @@ var _amqplibIntegration = () => {
|
|
|
44776
44855
|
var amqplibIntegration = defineIntegration(_amqplibIntegration);
|
|
44777
44856
|
|
|
44778
44857
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/vercelai/constants.js
|
|
44779
|
-
var
|
|
44858
|
+
var INTEGRATION_NAME42 = "VercelAI";
|
|
44780
44859
|
|
|
44781
44860
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/vercelai/instrumentation.js
|
|
44782
44861
|
var import_instrumentation13 = __toESM(require_src6(), 1);
|
|
@@ -44879,7 +44958,7 @@ class SentryVercelAiInstrumentation extends import_instrumentation13.Instrumenta
|
|
|
44879
44958
|
const existingExperimentalTelemetry = args[0].experimental_telemetry || {};
|
|
44880
44959
|
const isEnabled3 = existingExperimentalTelemetry.isEnabled;
|
|
44881
44960
|
const client = getClient();
|
|
44882
|
-
const integration = client?.getIntegrationByName(
|
|
44961
|
+
const integration = client?.getIntegrationByName(INTEGRATION_NAME42);
|
|
44883
44962
|
const integrationOptions = integration?.options;
|
|
44884
44963
|
const shouldRecordInputsAndOutputs = integration ? Boolean(client?.getOptions().sendDefaultPii) : false;
|
|
44885
44964
|
const { recordInputs, recordOutputs } = determineRecordingSettings(integrationOptions, existingExperimentalTelemetry, isEnabled3, shouldRecordInputsAndOutputs);
|
|
@@ -44915,7 +44994,7 @@ class SentryVercelAiInstrumentation extends import_instrumentation13.Instrumenta
|
|
|
44915
44994
|
}
|
|
44916
44995
|
|
|
44917
44996
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/vercelai/index.js
|
|
44918
|
-
var instrumentVercelAi = generateInstrumentOnce(
|
|
44997
|
+
var instrumentVercelAi = generateInstrumentOnce(INTEGRATION_NAME42, () => new SentryVercelAiInstrumentation({}));
|
|
44919
44998
|
function shouldForceIntegration(client) {
|
|
44920
44999
|
const modules = client.getIntegrationByName("Modules");
|
|
44921
45000
|
return !!modules?.getModules?.()?.ai;
|
|
@@ -44923,7 +45002,7 @@ function shouldForceIntegration(client) {
|
|
|
44923
45002
|
var _vercelAIIntegration = (options = {}) => {
|
|
44924
45003
|
let instrumentation;
|
|
44925
45004
|
return {
|
|
44926
|
-
name:
|
|
45005
|
+
name: INTEGRATION_NAME42,
|
|
44927
45006
|
options,
|
|
44928
45007
|
setupOnce() {
|
|
44929
45008
|
instrumentation = instrumentVercelAi();
|
|
@@ -45157,7 +45236,7 @@ var googleGenAIIntegration = defineIntegration(_googleGenAIIntegration);
|
|
|
45157
45236
|
var import_instrumentation22 = __toESM(require_src6(), 1);
|
|
45158
45237
|
|
|
45159
45238
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/firebase/otel/patches/firestore.js
|
|
45160
|
-
var
|
|
45239
|
+
var import_api20 = __toESM(require_src(), 1);
|
|
45161
45240
|
var import_instrumentation21 = __toESM(require_src6(), 1);
|
|
45162
45241
|
var import_semantic_conventions8 = __toESM(require_src2(), 1);
|
|
45163
45242
|
import * as net2 from "node:net";
|
|
@@ -45171,7 +45250,7 @@ function patchFirestore(tracer, firestoreSupportedVersions, wrap, unwrap, config
|
|
|
45171
45250
|
if (!error2) {
|
|
45172
45251
|
return;
|
|
45173
45252
|
}
|
|
45174
|
-
|
|
45253
|
+
import_api20.diag.error(error2?.message);
|
|
45175
45254
|
}, true);
|
|
45176
45255
|
};
|
|
45177
45256
|
}
|
|
@@ -45248,7 +45327,7 @@ function patchSetDoc(tracer, firestoreSpanCreationHook) {
|
|
|
45248
45327
|
};
|
|
45249
45328
|
}
|
|
45250
45329
|
function executeContextWithSpan(span, callback) {
|
|
45251
|
-
return
|
|
45330
|
+
return import_api20.context.with(import_api20.trace.setSpan(import_api20.context.active(), span), () => {
|
|
45252
45331
|
return import_instrumentation21.safeExecuteInTheMiddle(() => {
|
|
45253
45332
|
return callback();
|
|
45254
45333
|
}, (err) => {
|
|
@@ -45260,7 +45339,7 @@ function executeContextWithSpan(span, callback) {
|
|
|
45260
45339
|
});
|
|
45261
45340
|
}
|
|
45262
45341
|
function startDBSpan(tracer, spanName, reference) {
|
|
45263
|
-
const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind:
|
|
45342
|
+
const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind: import_api20.SpanKind.CLIENT });
|
|
45264
45343
|
addAttributes(span, reference);
|
|
45265
45344
|
span.setAttribute(import_semantic_conventions8.ATTR_DB_OPERATION_NAME, spanName);
|
|
45266
45345
|
return span;
|
|
@@ -45342,17 +45421,17 @@ class FirebaseInstrumentation extends import_instrumentation22.InstrumentationBa
|
|
|
45342
45421
|
}
|
|
45343
45422
|
|
|
45344
45423
|
// ../../node_modules/@sentry/node/build/esm/integrations/tracing/firebase/firebase.js
|
|
45345
|
-
var
|
|
45424
|
+
var INTEGRATION_NAME43 = "Firebase";
|
|
45346
45425
|
var config2 = {
|
|
45347
45426
|
firestoreSpanCreationHook: (span) => {
|
|
45348
45427
|
addOriginToSpan2(span, "auto.firebase.otel.firestore");
|
|
45349
45428
|
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, "db.query");
|
|
45350
45429
|
}
|
|
45351
45430
|
};
|
|
45352
|
-
var instrumentFirebase = generateInstrumentOnce(
|
|
45431
|
+
var instrumentFirebase = generateInstrumentOnce(INTEGRATION_NAME43, () => new FirebaseInstrumentation(config2));
|
|
45353
45432
|
var _firebaseIntegration = () => {
|
|
45354
45433
|
return {
|
|
45355
|
-
name:
|
|
45434
|
+
name: INTEGRATION_NAME43,
|
|
45356
45435
|
setupOnce() {
|
|
45357
45436
|
instrumentFirebase();
|
|
45358
45437
|
}
|
|
@@ -45392,7 +45471,7 @@ function getAutoPerformanceIntegrations() {
|
|
|
45392
45471
|
}
|
|
45393
45472
|
|
|
45394
45473
|
// ../../node_modules/@sentry/node/build/esm/sdk/initOtel.js
|
|
45395
|
-
var
|
|
45474
|
+
var import_api21 = __toESM(require_src(), 1);
|
|
45396
45475
|
var import_resources = __toESM(require_src8(), 1);
|
|
45397
45476
|
var import_sdk_trace_base2 = __toESM(require_src9(), 1);
|
|
45398
45477
|
var import_semantic_conventions9 = __toESM(require_src2(), 1);
|
|
@@ -45420,9 +45499,9 @@ function setupOtel(client, options = {}) {
|
|
|
45420
45499
|
...options.spanProcessors || []
|
|
45421
45500
|
]
|
|
45422
45501
|
});
|
|
45423
|
-
|
|
45424
|
-
|
|
45425
|
-
|
|
45502
|
+
import_api21.trace.setGlobalTracerProvider(provider);
|
|
45503
|
+
import_api21.propagation.setGlobalPropagator(new SentryPropagator);
|
|
45504
|
+
import_api21.context.setGlobalContextManager(new SentryContextManager);
|
|
45426
45505
|
return provider;
|
|
45427
45506
|
}
|
|
45428
45507
|
function _clampSpanProcessorTimeout(maxSpanWaitDuration) {
|