File tree Expand file tree Collapse file tree 1 file changed +8
-19
lines changed
packages/browser/src/integrations Expand file tree Collapse file tree 1 file changed +8
-19
lines changed Original file line number Diff line number Diff line change 1- import { convertIntegrationFnToClass , defineIntegration } from '@sentry/core' ;
2- import type { Event , Integration , IntegrationClass , IntegrationFn } from '@sentry/types' ;
3-
1+ import { defineIntegration } from '@sentry/core' ;
42import { WINDOW } from '../helpers' ;
53
6- const INTEGRATION_NAME = 'HttpContext' ;
7-
8- const _httpContextIntegration = ( ( ) => {
4+ /**
5+ * Collects information about HTTP request headers and
6+ * attaches them to the event.
7+ */
8+ export const httpContextIntegration = defineIntegration ( ( ) => {
99 return {
10- name : INTEGRATION_NAME ,
10+ name : 'HttpContext' ,
1111 preprocessEvent ( event ) {
1212 // if none of the information we want exists, don't bother
1313 if ( ! WINDOW . navigator && ! WINDOW . location && ! WINDOW . document ) {
@@ -29,15 +29,4 @@ const _httpContextIntegration = (() => {
2929 event . request = request ;
3030 } ,
3131 } ;
32- } ) satisfies IntegrationFn ;
33-
34- export const httpContextIntegration = defineIntegration ( _httpContextIntegration ) ;
35-
36- /**
37- * HttpContext integration collects information about HTTP request headers.
38- * @deprecated Use `httpContextIntegration()` instead.
39- */
40- // eslint-disable-next-line deprecation/deprecation
41- export const HttpContext = convertIntegrationFnToClass ( INTEGRATION_NAME , httpContextIntegration ) as IntegrationClass <
42- Integration & { preprocessEvent : ( event : Event ) => void }
43- > ;
32+ } ) ;
You can’t perform that action at this time.
0 commit comments