Skip to content

Commit dbb2b61

Browse files
committed
Fix passing client options.
1 parent 470749b commit dbb2b61

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/remix/src/utils/integrations/opentelemetry.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { RemixInstrumentation } from 'opentelemetry-instrumentation-remix';
22

33
import { defineIntegration } from '@sentry/core';
4-
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, generateInstrumentOnce, spanToJSON } from '@sentry/node';
4+
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, generateInstrumentOnce, getClient, spanToJSON } from '@sentry/node';
55
import type { Client, IntegrationFn, Span } from '@sentry/types';
66
import type { RemixOptions } from '../remixOptions';
77

@@ -15,10 +15,13 @@ const instrumentRemix = generateInstrumentOnce<RemixOptions>(
1515
}),
1616
);
1717

18-
const _remixIntegration = ((options?: RemixOptions) => {
18+
const _remixIntegration = (() => {
1919
return {
2020
name: 'Remix',
2121
setupOnce() {
22+
const client = getClient();
23+
const options = client?.getOptions();
24+
2225
instrumentRemix(options);
2326
},
2427

0 commit comments

Comments
 (0)