From 9b24c3e4b67f493528af6d3d03c5e2c7ac2a3bcd Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 11 Sep 2023 15:51:40 +0300 Subject: [PATCH] Log value of enabled configuration --- agent/native/ext/lifecycle.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/agent/native/ext/lifecycle.cpp b/agent/native/ext/lifecycle.cpp index 07b2351be..e4f8df3bf 100644 --- a/agent/native/ext/lifecycle.cpp +++ b/agent/native/ext/lifecycle.cpp @@ -526,15 +526,19 @@ void elasticApmModuleInit( int moduleType, int moduleNumber ) ELASTIC_APM_CALL_IF_FAILED_GOTO( ensureLoggerInitialConfigIsLatest( tracer ) ); ELASTIC_APM_CALL_IF_FAILED_GOTO( ensureAllComponentsHaveLatestConfig( tracer ) ); + config = getTracerCurrentConfigSnapshot( tracer ); + ELASTIC_APM_LOG_INFO( - "Custom build (based on version: " PHP_ELASTIC_APM_VERSION ") with " - "- span stack trace disabled by default (stack_trace_min_duration: -1)" - "- WordPress instrumentation disabled by default (ast_process_enabled: false)" + "Custom build based on version: %s." + " Enabled: %s." + " Custom changes: " + "- span stack trace disabled by default (stack_trace_min_duration: -1)" + "- WordPress instrumentation disabled by default (ast_process_enabled: false)" + , PHP_ELASTIC_APM_VERSION + , boolToString(config->enabled) ); logSupportabilityInfo( logLevel_debug ); - config = getTracerCurrentConfigSnapshot( tracer ); - if ( ! config->enabled ) { resultCode = resultSuccess;