Files
klz-cables.com/.pnpm-store/v10/files/14/496ca00308b160c539b6c8d3a514f5eee85366287468b36a2df1d9ae0ca42478f96b68ec4c1425babfe4a58bdc6f046dc0677ef0b0195ea7fb2d14e022361f
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

48 lines
1.3 KiB
Plaintext

import { defineIntegration, captureException, flush, SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
import { generateInstrumentOnce, addOriginToSpan } from '@sentry/node-core';
import { FirebaseInstrumentation } from './otel/firebaseInstrumentation.js';
const INTEGRATION_NAME = 'Firebase';
const config = {
firestoreSpanCreationHook: span => {
addOriginToSpan(span, 'auto.firebase.otel.firestore');
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'db.query');
},
functions: {
requestHook: span => {
addOriginToSpan(span, 'auto.firebase.otel.functions');
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'http.request');
},
errorHook: async (_, error) => {
if (error) {
captureException(error, {
mechanism: {
type: 'auto.firebase.otel.functions',
handled: false,
},
});
await flush(2000);
}
},
},
};
const instrumentFirebase = generateInstrumentOnce(INTEGRATION_NAME, () => new FirebaseInstrumentation(config));
const _firebaseIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentFirebase();
},
};
}) ;
const firebaseIntegration = defineIntegration(_firebaseIntegration);
export { firebaseIntegration, instrumentFirebase };
//# sourceMappingURL=firebase.js.map