Skip to content

Commit abebece

Browse files
committed
refactor(graphql): Rename graphqlChannelIntegration to graphqlIntegration
Runtimes that use the server-utils integration directly expose it to users, so 'channel' in the name leaks an implementation detail. Node imports it under an internal alias since it keeps its own composed graphqlIntegration.
1 parent 3da22d3 commit abebece

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/node/src/integrations/tracing/graphql/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { GraphQLInstrumentation } from './vendored/instrumentation';
22
import type { IntegrationFn } from '@sentry/core';
33
import { defineIntegration, extendIntegration } from '@sentry/core';
44
import { generateInstrumentOnce } from '@sentry/node-core';
5-
import { graphqlChannelIntegration } from '@sentry/server-utils';
5+
import { graphqlIntegration as graphqlChannelIntegration } from '@sentry/server-utils';
66

77
interface GraphqlOptions {
88
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineIntegration, type IntegrationFn } from '@sentry/core';
22
import * as dc from 'node:diagnostics_channel';
33
import { type GraphqlDiagnosticChannelsOptions, subscribeGraphqlDiagnosticChannels } from './graphql-dc-subscriber';
44

5-
const _graphqlChannelIntegration = ((options: GraphqlDiagnosticChannelsOptions = {}) => {
5+
const _graphqlIntegration = ((options: GraphqlDiagnosticChannelsOptions = {}) => {
66
return {
77
name: 'Graphql',
88
setupOnce() {
@@ -28,4 +28,4 @@ const _graphqlChannelIntegration = ((options: GraphqlDiagnosticChannelsOptions =
2828
* On older graphql versions the channels are never published to, so this integration is inert and
2929
* the vendored OTel instrumentation (gated to `< 17`) handles instrumentation instead.
3030
*/
31-
export const graphqlChannelIntegration = defineIntegration(_graphqlChannelIntegration);
31+
export const graphqlIntegration = defineIntegration(_graphqlIntegration);

packages/server-utils/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @module
55
*/
66

7-
export { graphqlChannelIntegration } from './graphql';
7+
export { graphqlIntegration } from './graphql';
88
export {
99
IOREDIS_DC_CHANNEL_COMMAND,
1010
IOREDIS_DC_CHANNEL_CONNECT,

0 commit comments

Comments
 (0)