Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous (background) transport for traces, logs and metrics (#101) #102

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ linux-arm64
linuxmusl-arm64
```

If you want to enable debug logging in tested classes, you need to export environment variable `ELASTIC_OTEL_DEBUG_LOG_TESTS=1` before run.

### Testing the native library

The following script will run the phpt tests for the native library, which should be built in the previous step - make sure to use the same architecture. You can run tests for multiple PHP versions simultaneously by providing several versions separated by a space to the `--php_versions` parameter.
Expand Down
15 changes: 11 additions & 4 deletions docs/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,15 @@ _Currently there are no additional `OTEL_` options waiting to be contributed ups

`ELASTIC_OTEL_` options that are specific to Elastic and will always live in EDOT PHP (in other words, they will _not_ be added upstream):

<!--
| Option(s) | Default | Description |
|---|---|---|

| Option(s) | Default | Accepted values | Description |
|---|---|---|---|
|ELASTIC_OTEL_ENABLED|true|true or false|Enables the automatic bootstrapping of instrumentation code|
|ELASTIC_OTEL_ASYNC_TRANSPORT|true| true or false | Use asynchronous (background) transfer of traces, metrics and logs. If false - brings back original OpenTelemetry SDK transfer modes|
|ELASTIC_OTEL_MAX_SEND_QUEUE_SIZE|2MB| integer number with optional units: B, MB or GB | Set the maximum buffer size for asynchronous (background) transfer. It is set per worker process.|
|ELASTIC_OTEL_VERIFY_SERVER_CERT|true|true or false|Enables server certificate verification for asynchronous sending|
|ELASTIC_OTEL_LOG_FILE||Filesystem path|Log file name. You can use the %p placeholder where the process ID will appear in the file name, and %t where the timestamp will appear. Please note that the PHP process must have write permissions for the specified path.|
|ELASTIC_OTEL_LOG_LEVEL_FILE|OFF|OFF, CRITICAL, ERROR, WARNING, INFO, DEBUG, TRACE|Log level for file sink. Set to OFF if you don't want to log to file.
|ELASTIC_OTEL_LOG_LEVEL_STDERR|OFF|OFF, CRITICAL, ERROR, WARNING, INFO, DEBUG, TRACE|Log level for the stderr sink. Set to OFF if you don't want to log to a file. This sink is recommended when running the application in a container.
|ELASTIC_OTEL_LOG_LEVEL_SYSLOG|OFF|OFF, CRITICAL, ERROR, WARNING, INFO, DEBUG, TRACE|Log level for file sink. Set to OFF if you don't want to log to file. This sink is recommended when you don't have write access to file system.
| <option> | <default value> | <description> |
-->
2 changes: 1 addition & 1 deletion prod/native/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
Expand Down
11 changes: 10 additions & 1 deletion prod/native/extension/code/ForkHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,37 @@
#include "LoggerInterface.h"
#include "ModuleGlobals.h"
#include "PeriodicTaskExecutor.h"

#include "transport/HttpTransportAsync.h"

static void callbackToLogForkBeforeInParent() {
ELOG_DEBUG(EAPM_GL(logger_), "Before process fork (i.e., in parent context); its parent (i.e., grandparent) PID: %d", static_cast<int>(elasticapm::osutils::getParentProcessId()));
// TODO implement forkable registry
if (ELASTICAPM_G(globals) && ELASTICAPM_G(globals)->periodicTaskExecutor_) {
ELASTICAPM_G(globals)->periodicTaskExecutor_->prefork();
}
if (ELASTICAPM_G(globals) && ELASTICAPM_G(globals)->httpTransportAsync_) {
ELASTICAPM_G(globals)->httpTransportAsync_->prefork();
}
}

static void callbackToLogForkAfterInParent() {
ELOG_DEBUG(EAPM_GL(logger_), "After process fork (in parent context)");
if (ELASTICAPM_G(globals) && ELASTICAPM_G(globals)->periodicTaskExecutor_) {
ELASTICAPM_G(globals)->periodicTaskExecutor_->postfork(false);
}
if (ELASTICAPM_G(globals) && ELASTICAPM_G(globals)->httpTransportAsync_) {
ELASTICAPM_G(globals)->httpTransportAsync_->postfork(false);
}
}

static void callbackToLogForkAfterInChild() {
ELOG_DEBUG(EAPM_GL(logger_), "After process fork (in child context); parent PID: %d", static_cast<int>(elasticapm::osutils::getParentProcessId()));
if (ELASTICAPM_G(globals) && ELASTICAPM_G(globals)->periodicTaskExecutor_) {
ELASTICAPM_G(globals)->periodicTaskExecutor_->postfork(true);
}
if (ELASTICAPM_G(globals) && ELASTICAPM_G(globals)->httpTransportAsync_) {
ELASTICAPM_G(globals)->httpTransportAsync_->postfork(true);
}
}

void registerCallbacksToLogFork() {
Expand Down
90 changes: 60 additions & 30 deletions prod/native/extension/code/ModuleFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "ModuleGlobals.h"
#include "ModuleFunctionsImpl.h"
#include "InternalFunctionInstrumentation.h"
#include "transport/HttpTransportAsync.h"

#include <main/php.h>
#include <Zend/zend_API.h>
Expand Down Expand Up @@ -55,34 +56,6 @@ PHP_FUNCTION(elastic_otel_get_config_option_by_name) {
elasticApmGetConfigOption({optionName, optionNameLength}, /* out */ return_value);
}

ZEND_BEGIN_ARG_INFO_EX(elastic_otel_send_to_server_arginfo, /* _unused: */ 0, /* return_reference: */ 0, /* required_num_args: */ 2)
ZEND_ARG_TYPE_INFO(/* pass_by_ref: */ 0, userAgentHttpHeader, IS_STRING, /* allow_null: */ 0)
ZEND_ARG_TYPE_INFO(/* pass_by_ref: */ 0, serializedEvents, IS_STRING, /* allow_null: */ 0)
ZEND_END_ARG_INFO()

/* {{{ elastic_otel_send_to_server(
* string userAgentHttpHeader,
* string $serializedEvents ): bool
*/
PHP_FUNCTION(elastic_otel_send_to_server) {
char *userAgentHttpHeader = nullptr;
size_t userAgentHttpHeaderLength = 0;
char *serializedEvents = nullptr;
size_t serializedEventsLength = 0;

ZEND_PARSE_PARAMETERS_START(/* min_num_args: */ 2, /* max_num_args: */ 2)
Z_PARAM_STRING(userAgentHttpHeader, userAgentHttpHeaderLength)
Z_PARAM_STRING(serializedEvents, serializedEventsLength)
ZEND_PARSE_PARAMETERS_END();

// if (elasticApmSendToServer({ userAgentHttpHeader, userAgentHttpHeaderLength } , { serializedEvents, serializedEventsLength }) != resultSuccess) {
RETURN_BOOL(false);
// }

// RETURN_BOOL(true);
}
/* }}} */

ZEND_BEGIN_ARG_INFO_EX(elastic_otel_log_arginfo, /* _unused: */ 0, /* return_reference: */ 0, /* required_num_args: */ 7)
ZEND_ARG_TYPE_INFO(/* pass_by_ref: */ 0, isForced, IS_LONG, /* allow_null: */ 0)
ZEND_ARG_TYPE_INFO(/* pass_by_ref: */ 0, level, IS_LONG, /* allow_null: */ 0)
Expand Down Expand Up @@ -187,17 +160,74 @@ PHP_FUNCTION(elastic_otel_hook) {
RETURN_BOOL(elasticapm::php::instrumentFunction(EAPM_GL(logger_).get(), className, functionName, pre, post));
}

ZEND_BEGIN_ARG_INFO_EX(ArgInfoInitialize, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, endpoint, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, contentType, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, headers, IS_ARRAY, 0)
ZEND_END_ARG_INFO()

PHP_FUNCTION(initialize) {
zend_string *endpoint;
zend_string *contentType;
zval *headers;

double timeout = 0.0; // s
long retryDelay = 0; // ms
long maxRetries = 0;

ZEND_PARSE_PARAMETERS_START(6, 6)
Z_PARAM_STR(endpoint)
Z_PARAM_STR(contentType)
Z_PARAM_ARRAY(headers)
Z_PARAM_DOUBLE(timeout)
Z_PARAM_LONG(retryDelay)
Z_PARAM_LONG(maxRetries)
ZEND_PARSE_PARAMETERS_END();

HashTable *ht = Z_ARRVAL_P(headers);

zval *value = nullptr;
zend_string *arrkey = nullptr;

std::vector<std::pair<std::string_view, std::string_view>> endpointHeaders;

ZEND_HASH_FOREACH_STR_KEY_VAL(ht, arrkey, value) {
if (value && Z_TYPE_P(value) == IS_STRING) {
endpointHeaders.emplace_back(std::make_pair(std::string_view(ZSTR_VAL(arrkey), ZSTR_LEN(arrkey)), std::string_view(Z_STRVAL_P(value), Z_STRLEN_P(value))));
}
}
ZEND_HASH_FOREACH_END();

EAPM_GL(httpTransportAsync_)->initializeConnection(std::string(ZSTR_VAL(endpoint), ZSTR_LEN(endpoint)), ZSTR_HASH(endpoint), std::string(ZSTR_VAL(contentType), ZSTR_LEN(contentType)), endpointHeaders, std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>(timeout)), static_cast<std::size_t>(maxRetries), std::chrono::milliseconds(retryDelay));
}

ZEND_BEGIN_ARG_INFO_EX(ArgInfoSend, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, endpoint, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, payload, IS_STRING, 1)
ZEND_END_ARG_INFO()

PHP_FUNCTION(enqueue) {
zend_string *payload = nullptr;
zend_string *endpoint = nullptr;
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_STR(endpoint)
Z_PARAM_STR(payload)
ZEND_PARSE_PARAMETERS_END();

EAPM_GL(httpTransportAsync_)->enqueue(ZSTR_HASH(endpoint), std::span<std::byte>(reinterpret_cast<std::byte *>(ZSTR_VAL(payload)), ZSTR_LEN(payload)));
}

// clang-format off
const zend_function_entry elastic_otel_functions[] = {
PHP_FE( elastic_otel_is_enabled, elastic_otel_no_paramters_arginfo )
PHP_FE( elastic_otel_get_config_option_by_name, elastic_otel_get_config_option_by_name_arginfo )
// PHP_FE( elastic_otel_send_to_server, elastic_otel_send_to_server_arginfo )
PHP_FE( elastic_otel_log, elastic_otel_log_arginfo )
PHP_FE( elastic_otel_get_last_thrown, elastic_otel_get_last_thrown_arginfo )
PHP_FE( elastic_otel_get_last_php_error, elastic_otel_get_last_php_error_arginfo )
PHP_FE( elastic_otel_hook, elastic_otel_hook_arginfo )

// ZEND_NS_FALIAS("OpenTelemetry\\Instrumentation", hook, elastic_otel_hook, elastic_otel_hook_arginfo) ZEND_FE_END,
ZEND_NS_FE( "Elastic\\Otel\\HttpTransport", initialize, ArgInfoInitialize)
ZEND_NS_FE( "Elastic\\Otel\\HttpTransport", enqueue, elastic_otel_no_paramters_arginfo)

PHP_FE_END
};
Expand Down
3 changes: 3 additions & 0 deletions prod/native/extension/code/ModuleFunctionsImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ void elasticApmGetConfigOption(std::string_view optionName, zval *return_value)
} else if constexpr (std::is_same_v<T, std::string>) {
ZVAL_STRINGL(return_value, arg.c_str(), arg.length());
return;
} else if constexpr (std::is_same_v<T, std::size_t>) {
ZVAL_LONG(return_value, arg);
return;
} else {
ZVAL_NULL(return_value);
}
Expand Down
34 changes: 4 additions & 30 deletions prod/native/extension/code/ModuleIniEntries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,8 @@ extern elasticapm::php::ConfigurationManager configManager;
#define ELASTIC_OTEL_NOT_RELOADABLE_INI_ENTRY( optName ) ELASTIC_OTEL_INI_ENTRY_IMPL( optName, PHP_INI_PERDIR )

PHP_INI_BEGIN() // expands to: static const zend_ini_entry_def ini_entries[] = {
// #ifdef PHP_WIN32
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_ALLOW_ABORT_DIALOG) )
// #endif
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_API_KEY) )
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_BOOTSTRAP_PHP_PART_FILE))
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_BREAKDOWN_METRICS) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_CAPTURE_ERRORS) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_DEV_INTERNAL) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_DISABLE_INSTRUMENTATIONS) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_DISABLE_SEND) )
ELASTIC_OTEL_NOT_RELOADABLE_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_ENABLED))
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_GLOBAL_LABELS) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_ENVIRONMENT) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_HOSTNAME) )
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_LOG_FILE))
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_LOG_LEVEL))
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_LOG_LEVEL_FILE))
Expand All @@ -72,26 +60,12 @@ ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_LOG_LEVEL_SYSLOG))
#ifdef PHP_WIN32
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_LOG_LEVEL_WIN_SYS_DEBUG))
#endif
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_NON_KEYWORD_STRING_MAX_LENGTH) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SANITIZE_FIELD_NAMES) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SECRET_TOKEN) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SERVER_TIMEOUT) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SERVER_URL) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SERVICE_NAME) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SERVICE_NODE_NAME) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SERVICE_VERSION) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SPAN_COMPRESSION_ENABLED) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SPAN_COMPRESSION_EXACT_MATCH_MAX_DURATION) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SPAN_COMPRESSION_SAME_KIND_MAX_DURATION) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_SPAN_STACK_TRACE_MIN_DURATION) )
// ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_STACK_TRACE_LIMIT))
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_TRANSACTION_IGNORE_URLS) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_TRANSACTION_MAX_SPANS) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_TRANSACTION_SAMPLE_RATE) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_URL_GROUPS) )
// ELASTIC_OTEL_INI_ENTRY( EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_VERIFY_SERVER_CERT) )
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_VERIFY_SERVER_CERT))

ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_DEBUG_DIAGNOSTICS_FILE))
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_MAX_SEND_QUEUE_SIZE))
ELASTIC_OTEL_INI_ENTRY(EL_STRINGIFY(ELASTIC_OTEL_CFG_OPT_NAME_ASYNC_TRANSPORT))

PHP_INI_END()

namespace elasticapm::php {
Expand Down
6 changes: 0 additions & 6 deletions prod/native/extension/code/ModuleInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ void elasticApmModuleInit(int moduleType, int moduleNumber) {
return;
}

// curlCode = curl_global_init(CURL_GLOBAL_ALL);
// if (curlCode != CURLE_OK) {
// ELOG_ERROR(globals->logger_, "curl_global_init failed: %s (%d)", curl_easy_strerror(curlCode), (int)curlCode);
// return;
// }

ELOG_DEBUG(globals->logger_, "MINIT Replacing hooks");
elasticapm::php::Hooking::getInstance().replaceHooks();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--TEST--
instrumentation - user method - static
--ENV--
ELASTIC_OTEL_LOG_LEVEL_STDERR=INFO
--INI--
extension=/elastic/elastic_otel_php.so
elastic_otel.bootstrap_php_part_file={PWD}/includes/bootstrap_mock.inc
--FILE--
<?php
declare(strict_types=1);


class TestClass
{
static function userspace($arg1, $arg2, $arg3)
{
echo "* userspace()\n";
}
}

elastic_otel_hook("testclass", "userspace", function () {
echo "*** prehook userspace()\n";
}, function (): void {
echo "*** posthook userspace()\n";
});


TestClass::userspace("first", 2, 3);

echo "Test completed\n";
?>
--EXPECTF--
*** prehook userspace()
* userspace()
*** posthook userspace()
Test completed
3 changes: 3 additions & 0 deletions prod/native/libcommon/code/AgentGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
#include "ConfigurationStorage.h"
#include "InstrumentedFunctionHooksStorage.h"
#include "CommonUtils.h"
#include "transport/HttpTransportAsync.h"

namespace elasticapm::php {
// clang-format off

AgentGlobals::AgentGlobals(std::shared_ptr<LoggerInterface> logger,
std::shared_ptr<LoggerSinkInterface> logSinkStdErr,
Expand All @@ -44,6 +46,7 @@ AgentGlobals::AgentGlobals(std::shared_ptr<LoggerInterface> logger,
hooksStorage_(std::move(hooksStorage)),
sapi_(std::make_shared<elasticapm::php::PhpSapi>(bridge_->getPhpSapiName())),
periodicTaskExecutor_(),
httpTransportAsync_(std::make_unique<elasticapm::php::transport::HttpTransportAsync<>>(logger_, config_)),
sharedMemory_(std::make_shared<elasticapm::php::SharedMemoryState>()),
requestScope_(std::make_shared<elasticapm::php::RequestScope>(logger_, bridge_, sapi_, sharedMemory_, config_, [hs = hooksStorage_]() { hs->clear(); })),
logSinkStdErr_(std::move(logSinkStdErr)),
Expand Down
7 changes: 7 additions & 0 deletions prod/native/libcommon/code/AgentGlobals.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ class ConfigurationSnapshot;
class LoggerSinkInterface;
class LogSinkFile;
class InstrumentedFunctionHooksStorageInterface;
namespace transport {
class CurlSender;
template <typename Sender> class HttpTransportAsync;
}

// clang-format off

class AgentGlobals {
public:
Expand All @@ -55,6 +61,7 @@ class AgentGlobals {
std::shared_ptr<InstrumentedFunctionHooksStorageInterface> hooksStorage_;
std::shared_ptr<PhpSapi> sapi_;
std::unique_ptr<PeriodicTaskExecutor> periodicTaskExecutor_;
std::unique_ptr<transport::HttpTransportAsync<transport::CurlSender>> httpTransportAsync_;
std::shared_ptr<SharedMemoryState> sharedMemory_;
std::shared_ptr<RequestScope> requestScope_;

Expand Down
2 changes: 2 additions & 0 deletions prod/native/libcommon/code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ add_library (${_Target}

target_link_libraries(${_Target}
PRIVATE CONAN_PKG::libunwind
PRIVATE CONAN_PKG::libcurl

)

configure_file("elastic_otel_version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/generated/elastic_otel_version.h")
Expand Down
Loading