@@ -26,18 +26,19 @@ import {
2626import { ibmPlexMono , inter , roboto , robotoMono } from '@/fonts' ;
2727import { AppThemeProvider , useAppTheme } from '@/theme/ThemeProvider' ;
2828import { ThemeWrapper } from '@/ThemeWrapper' ;
29+ import { NextApiConfigResponseData } from '@/types' ;
2930import { useConfirmModal } from '@/useConfirm' ;
3031import { QueryParamProvider as HDXQueryParamProvider } from '@/useQueryParam' ;
3132import { useUserPreferences } from '@/useUserPreferences' ;
3233
3334import '@mantine/core/styles.css' ;
34- import '@mantine/notifications/styles.css' ;
3535import '@mantine/dates/styles.css' ;
3636import '@mantine/dropzone/styles.css' ;
37- import '@styles/globals .css' ;
37+ import '@mantine/notifications/styles .css' ;
3838import '@styles/app.scss' ;
39- import 'uplot/dist/uPlot.min .css' ;
39+ import '@styles/globals .css' ;
4040import '@xyflow/react/dist/style.css' ;
41+ import 'uplot/dist/uPlot.min.css' ;
4142
4243// Polyfill crypto.randomUUID for non-HTTPS environments
4344if ( typeof crypto !== 'undefined' && ! crypto . randomUUID ) {
@@ -137,15 +138,8 @@ export default function MyApp({ Component, pageProps }: AppPropsWithLayout) {
137138 }
138139 fetch ( '/api/config' )
139140 . then ( res => res . json ( ) )
140- . then ( _jsonData => {
141+ . then ( ( _jsonData ?: NextApiConfigResponseData ) => {
141142 if ( _jsonData ?. apiKey ) {
142- let hostname ;
143- try {
144- const url = new URL ( _jsonData . apiServerUrl ) ;
145- hostname = url . hostname ;
146- } catch ( err ) {
147- // ignore
148- }
149143 HyperDX . init ( {
150144 apiKey : _jsonData . apiKey ,
151145 consoleCapture : true ,
@@ -156,7 +150,7 @@ export default function MyApp({ Component, pageProps }: AppPropsWithLayout) {
156150 url : _jsonData . collectorUrl ,
157151 } ) ;
158152 } else {
159- console . warn ( 'No API key found' ) ;
153+ console . warn ( 'No API key found to enable OTEL exporter ' ) ;
160154 }
161155 } )
162156 . catch ( err => {
0 commit comments