Skip to content

Commit efa196c

Browse files
committed
ref(server-utils): Streamline mongoose integration
1 parent 86df700 commit efa196c

5 files changed

Lines changed: 11 additions & 45 deletions

File tree

packages/server-utils/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export * from './exports';
22

33
// Exports using diagnostics channels
4-
export { mongooseIntegration } from './mongoose';
54
export { mysql2Integration } from './mysql2';
65
export { instrumentPrisma, prismaIntegration } from './prisma';
76
export type { PrismaInstrumentationConfig, PrismaOptions } from './prisma';

packages/server-utils/src/integrations/mongoose.ts renamed to packages/server-utils/src/integrations/mongoose/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import * as diagnosticsChannel from 'node:diagnostics_channel';
22
import type { IntegrationFn, Span } from '@sentry/core';
33
import { defineIntegration, getActiveSpan, waitForTracingChannelBinding } from '@sentry/core';
4-
import { subscribeMongooseDiagnosticChannels } from '../mongoose/mongoose-dc-subscriber';
5-
import type { MongooseLegacyCollection } from '../mongoose/mongoose-legacy-span';
6-
import { startMongooseLegacySpan } from '../mongoose/mongoose-legacy-span';
7-
import { CHANNELS } from '../orchestrion/channels';
8-
import { MONGOOSE_CONTEXT_CAPTURE_CHANNELS } from '../orchestrion/config/mongoose';
9-
import type { SentryTracingChannel } from '../tracing-channel';
10-
import { bindTracingChannelToSpan } from '../tracing-channel';
11-
import { mongooseModuleNames } from '../orchestrion/config/mongoose';
12-
import { invokeOrchestrionInstrumentation } from '../orchestrion/instrumentation';
4+
import { subscribeMongooseDiagnosticChannels } from './mongoose-dc-subscriber';
5+
import type { MongooseLegacyCollection } from './mongoose-legacy-span';
6+
import { startMongooseLegacySpan } from './mongoose-legacy-span';
7+
import { CHANNELS } from '../../orchestrion/channels';
8+
import { MONGOOSE_CONTEXT_CAPTURE_CHANNELS } from '../../orchestrion/config/mongoose';
9+
import type { SentryTracingChannel } from '../../tracing-channel';
10+
import { bindTracingChannelToSpan } from '../../tracing-channel';
11+
import { mongooseModuleNames } from '../../orchestrion/config/mongoose';
12+
import { invokeOrchestrionInstrumentation } from '../../orchestrion/instrumentation';
1313

1414
const INTEGRATION_NAME = 'Mongoose' as const;
1515

packages/server-utils/src/mongoose/mongoose-dc-subscriber.ts renamed to packages/server-utils/src/integrations/mongoose/mongoose-dc-subscriber.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import {
1616
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
1717
startInactiveSpan,
1818
} from '@sentry/core';
19-
import { DEBUG_BUILD } from '../debug-build';
20-
import { bindTracingChannelToSpan } from '../tracing-channel';
19+
import { DEBUG_BUILD } from '../../debug-build';
20+
import { bindTracingChannelToSpan } from '../../tracing-channel';
2121

2222
// Channel names published by mongoose >= 9.7.0 (see mongoose `lib/tracing.js`,
2323
// `lib/query.js`, `lib/aggregate.js`, `lib/model.js` and `lib/cursor/*`).

packages/server-utils/src/mongoose/mongoose-legacy-span.ts renamed to packages/server-utils/src/integrations/mongoose/mongoose-legacy-span.ts

File renamed without changes.

packages/server-utils/src/mongoose/index.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)