@@ -65,6 +65,7 @@ export type SDKConfig = {
6565 detectResources ?: boolean ;
6666 disableLogs ?: boolean ;
6767 disableMetrics ?: boolean ;
68+ disableStartupLogs ?: boolean ;
6869 disableTracing ?: boolean ;
6970 enableInternalProfiling ?: boolean ;
7071 experimentalExceptionCapture ?: boolean ;
@@ -168,8 +169,11 @@ const healthCheckUrl = async (
168169} ;
169170
170171export const initSDK = ( config : SDKConfig ) => {
172+ const defaultDisableStartupLogs =
173+ config . disableStartupLogs ?? ! DEFAULT_HDX_STARTUP_LOGS ;
174+
171175 const ui = ora ( {
172- isSilent : ! DEFAULT_HDX_STARTUP_LOGS ,
176+ isSilent : defaultDisableStartupLogs ,
173177 prefixText : UI_LOG_PREFIX ,
174178 spinner : cliSpinners . dots ,
175179 text : 'Initializing OpenTelemetry SDK...' ,
@@ -610,7 +614,7 @@ export const initSDK = (config: SDKConfig) => {
610614 symbol : '🦄' ,
611615 } ) ;
612616
613- if ( DEFAULT_HDX_STARTUP_LOGS ) {
617+ if ( ! defaultDisableStartupLogs ) {
614618 setTimeout ( ( ) => {
615619 const _targetUrl = `https://www.hyperdx.io/services?service=${ encodeURIComponent (
616620 defaultServiceName ,
@@ -655,7 +659,6 @@ export const init = (config?: Omit<SDKConfig, 'programmaticImports'>) =>
655659
656660const _shutdown = ( ) => {
657661 const ui = ora ( {
658- isSilent : ! DEFAULT_HDX_STARTUP_LOGS ,
659662 spinner : cliSpinners . dots ,
660663 text : 'Shutting down OpenTelemetry SDK...' ,
661664 } ) . start ( ) ;
0 commit comments