Skip to content

Commit e7ef962

Browse files
committed
refactor: re-use same type
1 parent 3d3e596 commit e7ef962

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

packages/nuxt/src/runtime/plugins/database.server.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,12 @@ import { defineNitroPlugin, useDatabase } from 'nitropack/runtime';
1616
import type { DatabaseConnectionConfig as DatabaseConfig } from 'nitropack/types';
1717
// @ts-expect-error - This is a virtual module
1818
import { databaseConfig } from '#sentry/database-config.mjs';
19-
import { getDatabaseSpanData } from '../utils/database-span-data';
19+
import { type DatabaseSpanData, getDatabaseSpanData } from '../utils/database-span-data';
2020

2121
type MaybeInstrumentedDatabase = Database & {
2222
__sentry_instrumented__?: boolean;
2323
};
2424

25-
interface DatabaseSpanData {
26-
[key: string]: string | undefined;
27-
'db.system.name': string;
28-
}
29-
3025
/**
3126
* Keeps track of prepared statements that have been patched.
3227
*/

packages/nuxt/src/runtime/utils/database-span-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ConnectorName } from 'db0';
22
import type { DatabaseConnectionConfig as DatabaseConfig } from 'nitropack/types';
33

4-
interface DatabaseSpanData {
4+
export interface DatabaseSpanData {
55
[key: string]: string | number | undefined;
66
}
77

0 commit comments

Comments
 (0)