File tree 1 file changed +25
-0
lines changed
packages/node/src/integrations/tracing
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { LruMemoizerInstrumentation } from '@opentelemetry/instrumentation-lru-memoizer' ;
2
+
3
+ import { defineIntegration } from '@sentry/core' ;
4
+ import type { IntegrationFn } from '@sentry/types' ;
5
+ import { generateInstrumentOnce } from '../../otel/instrument' ;
6
+
7
+ const INTEGRATION_NAME = 'LruMemoizer' ;
8
+
9
+ export const instrumentLruMemoizer = generateInstrumentOnce ( INTEGRATION_NAME , ( ) => new LruMemoizerInstrumentation ( ) ) ;
10
+
11
+ const _lruMemoizerIntegration = ( ( ) => {
12
+ return {
13
+ name : INTEGRATION_NAME ,
14
+ setupOnce ( ) {
15
+ instrumentLruMemoizer ( ) ;
16
+ } ,
17
+ } ;
18
+ } ) satisfies IntegrationFn ;
19
+
20
+ /**
21
+ * LruMemoizer integration
22
+ *
23
+ * Propagate traces through LruMemoizer.
24
+ */
25
+ export const lruMemoizerIntegration = defineIntegration ( _lruMemoizerIntegration ) ;
You can’t perform that action at this time.
0 commit comments