Files
klz-cables.com/.pnpm-store/v10/files/76/2e308aebd53bf6c5b71aa583fcc6dcdfe2cddc9f64490213b648ed4b85fd660d698b5b120b7f282046912f202045f940affa377de078ccd8874f8ea86aeeb7
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

58 lines
1.7 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrumentationKnex = require('@opentelemetry/instrumentation-knex');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const INTEGRATION_NAME = 'Knex';
const instrumentKnex = nodeCore.generateInstrumentOnce(
INTEGRATION_NAME,
() => new instrumentationKnex.KnexInstrumentation({ requireParentSpan: true }),
);
const _knexIntegration = (() => {
let instrumentationWrappedCallback;
return {
name: INTEGRATION_NAME,
setupOnce() {
const instrumentation = instrumentKnex();
instrumentationWrappedCallback = nodeCore.instrumentWhenWrapped(instrumentation);
},
setup(client) {
instrumentationWrappedCallback?.(() =>
client.on('spanStart', span => {
const { data } = core.spanToJSON(span);
// knex.version is always set in the span data
// https://github.com/open-telemetry/opentelemetry-js-contrib/blob/0309caeafc44ac9cb13a3345b790b01b76d0497d/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts#L138
if ('knex.version' in data) {
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.knex');
}
}),
);
},
};
}) ;
/**
* Knex integration
*
* Capture tracing data for [Knex](https://knexjs.org/).
*
* @example
* ```javascript
* import * as Sentry from '@sentry/node';
*
* Sentry.init({
* integrations: [Sentry.knexIntegration()],
* });
* ```
*/
const knexIntegration = core.defineIntegration(_knexIntegration);
exports.instrumentKnex = instrumentKnex;
exports.knexIntegration = knexIntegration;
//# sourceMappingURL=knex.js.map