Skip to content

Commit

Permalink
feat(): Add environment support
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Apr 30, 2024
1 parent 51ab8f8 commit 8376066
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/medusa-plugin-sentry/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function (rootDirectory, pluginOptions: SentryOptions): Router {
enableRequestHandler = true,
webHookOptions,
apiToken,
environment,
...options
} = pluginOptions;

Expand Down
3 changes: 2 additions & 1 deletion packages/medusa-plugin-sentry/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NodeOptions } from '@sentry/node/types/types';
import { Integration } from '@sentry/types/types/integration';
import { Router } from 'express';
import * as Sentry from '@sentry/node';
import * as Tracing from '@sentry/tracing';
import { RequestHandlerOptions } from '@sentry/node/types/handlers';
import { Integration } from '@sentry/types/types-ts3.8/integration';

export type SentryWebHookOptions = {
path: string;
Expand All @@ -22,6 +22,7 @@ export type SentryOptions = Omit<NodeOptions, 'integrations'> & {
enableRequestHandler?: boolean;
enableTracing?: boolean;
webHookOptions?: SentryWebHookOptions;
environment?: string;
};

export enum SentryWebHookEvent {
Expand Down

0 comments on commit 8376066

Please sign in to comment.