-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathindex.ts
More file actions
32 lines (30 loc) · 827 Bytes
/
index.ts
File metadata and controls
32 lines (30 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import type { NodeOptions } from '@sentry/node-core';
import * as EffectLayer from 'effect/Layer';
/**
* Options for the Sentry Effect server layer.
*/
export type EffectServerLayerOptions = NodeOptions;
/**
* Creates an empty Effect Layer
*
* @example
* ```typescript
* import * as Sentry from '@sentry/effect/server';
* import { NodeRuntime } from '@effect/platform-node';
* import { Layer } from 'effect';
* import { HttpLive } from './Http.js';
*
* const MainLive = HttpLive.pipe(
* Layer.provide(Sentry.effectLayer({
* dsn: '__DSN__',
* enableLogs: true,
* enableMetrics: true,
* })),
* );
*
* MainLive.pipe(Layer.launch, NodeRuntime.runMain);
* ```
*/
export function effectLayer(_: EffectServerLayerOptions): EffectLayer.Layer<never, never, never> {
return EffectLayer.empty;
}