From 8376066c8ec0cd50a6f0ee6ebddb57cf084aa20c Mon Sep 17 00:00:00 2001 From: adrien2p Date: Tue, 30 Apr 2024 16:53:01 +0200 Subject: [PATCH] feat(): Add environment support --- packages/medusa-plugin-sentry/src/api/index.ts | 1 + packages/medusa-plugin-sentry/src/types/index.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/medusa-plugin-sentry/src/api/index.ts b/packages/medusa-plugin-sentry/src/api/index.ts index ca3d202e..2d949e91 100644 --- a/packages/medusa-plugin-sentry/src/api/index.ts +++ b/packages/medusa-plugin-sentry/src/api/index.ts @@ -22,6 +22,7 @@ export default function (rootDirectory, pluginOptions: SentryOptions): Router { enableRequestHandler = true, webHookOptions, apiToken, + environment, ...options } = pluginOptions; diff --git a/packages/medusa-plugin-sentry/src/types/index.ts b/packages/medusa-plugin-sentry/src/types/index.ts index 1e82b243..a62a83fb 100644 --- a/packages/medusa-plugin-sentry/src/types/index.ts +++ b/packages/medusa-plugin-sentry/src/types/index.ts @@ -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; @@ -22,6 +22,7 @@ export type SentryOptions = Omit & { enableRequestHandler?: boolean; enableTracing?: boolean; webHookOptions?: SentryWebHookOptions; + environment?: string; }; export enum SentryWebHookEvent {