1010#include " Hooking.h"
1111#include " InternalFunctionInstrumentation.h"
1212#include " ModuleIniEntries.h"
13- #include " ModuleFunctions.h"
1413#include " ModuleGlobals.h"
15- #include " PeriodicTaskExecutor.h"
16- #include " RequestScope.h"
1714#include " SigSegvHandler.h"
1815#include " os/OsUtils.h"
19- #include " transport/OpAmp.h"
2016#include " coordinator/CoordinatorProcess.h"
17+ #include " VendorCustomizationsInterface.h"
2118
2219#include < curl/curl.h>
2320#include < inttypes.h> // PRIu64
3128
3229namespace opentelemetry ::php {
3330
34- extern ConfigurationManager configManager;
35-
3631void logStartupPreamble (opentelemetry::php::LoggerInterface *logger) {
3732 constexpr LogLevel level = LogLevel::logLevel_debug;
3833 constexpr int colWidth = 40 ;
3934
4035 using namespace std ::literals;
41- ELOGF_NF (logger, level, OTEL_DISTRO_PRODUCT_NAME);
42- ELOGF_NF (logger, level, " %*s%s" , -colWidth, " Native part version:" , OTEL_DISTRO_VERSION);
36+
37+ if (OTEL_G (globals)->vendorCustomizations_ ) {
38+ ELOG_NF (logger, level, " {} version: {}" , OTEL_G (globals)->vendorCustomizations_ ->getDistributionName (), OTEL_G (globals)->vendorCustomizations_ ->getDistributionVersion ());
39+ ELOG_NF (logger, level, " {:<{}}{}" , " OpenTelemetry distro base version:" , colWidth, OTEL_DISTRO_VERSION);
40+ } else {
41+ ELOG_NF (logger, level, OTEL_DISTRO_PRODUCT_NAME);
42+ ELOGF_NF (logger, level, " %*s%s" , -colWidth, " Native part version:" , OTEL_DISTRO_VERSION);
43+ }
44+
4345 ELOGF_NF (logger, level, " %*s%s" , -colWidth, " Process command line:" , opentelemetry::utils::sanitizeKeyValueString (" OTEL_EXPORTER_OTLP_HEADERS" , opentelemetry::osutils::getCommandLine ()).c_str ());
4446 ELOGF_NF (logger, level, " %*s%s" , -colWidth, " Process environment:" , opentelemetry::utils::sanitizeKeyValueString (" OTEL_EXPORTER_OTLP_HEADERS" , opentelemetry::osutils::getProcessEnvironment ()).c_str ());
4547}
@@ -49,7 +51,7 @@ void moduleInit(int moduleType, int moduleNumber) {
4951 auto globals = OTEL_G (globals);
5052
5153 opentelemetry::php::registerIniEntries (OTEL_GL (logger_).get (), moduleNumber);
52- configManager. update ();
54+ globals-> configManager_ -> update ();
5355 globals->config_ ->update ();
5456
5557 ELOGF_DEBUG (globals->logger_ , MODULE, " %s entered: moduleType: %d, moduleNumber: %d, parent PID: %d, SAPI: %s (%d) is %s" , __FUNCTION__, moduleType, moduleNumber, static_cast <int >(opentelemetry::osutils::getParentProcessId ()), sapi.getName ().data (), static_cast <uint8_t >(sapi.getType ()), sapi.isSupported () ? " supported" : " unsupported" );
@@ -79,7 +81,7 @@ void moduleInit(int moduleType, int moduleNumber) {
7981 // add config update watcher in worker process
8082 globals->coordinatorConfigProvider_ ->addConfigUpdateWatcher ([globals](opentelemetry::php::coordinator::CoordinatorConfigurationProvider::configFiles_t const &cfgFiles) {
8183 ELOG_DEBUG (globals->logger_ , COORDINATOR, " Received config update with {} files. Updating dynamic config and global config storage" , cfgFiles.size ());
82- configManager. update (cfgFiles);
84+ globals-> configManager_ -> update (cfgFiles);
8385 });
8486
8587 globals->coordinatorConfigProvider_ ->triggerUpdateIfChanged ();
@@ -123,4 +125,4 @@ void moduleShutdown( int moduleType, int moduleNumber ) {
123125 unregisterSigSegvHandler ();
124126}
125127
126- }
128+ } // namespace opentelemetry::php
0 commit comments