mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-08 22:00:25 -04:00
fix(sentry): use environments
This commit is contained in:
@@ -2,7 +2,7 @@ import type { FastifyPluginCallback } from 'fastify';
|
||||
import fastifySentry from '@immobiliarelabs/fastify-sentry';
|
||||
import fp from 'fastify-plugin';
|
||||
|
||||
import { SENTRY_DSN } from '../utils/env';
|
||||
import { SENTRY_DSN, SENTRY_ENVIRONMENT } from '../utils/env';
|
||||
import { getRedirectParams } from '../utils/redirection';
|
||||
|
||||
/**
|
||||
@@ -15,6 +15,7 @@ import { getRedirectParams } from '../utils/redirection';
|
||||
const errorHandling: FastifyPluginCallback = (fastify, _options, done) => {
|
||||
void fastify.register(fastifySentry, {
|
||||
dsn: SENTRY_DSN,
|
||||
environment: SENTRY_ENVIRONMENT,
|
||||
maxValueLength: 8192, // the default is 250, which is too small.
|
||||
// No need to initialize if DSN is not provided (e.g. in development and
|
||||
// test environments)
|
||||
|
||||
Reference in New Issue
Block a user