-
Notifications
You must be signed in to change notification settings - Fork 71
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
fix: add docker container id discovery for SystemData #966
Conversation
💚 CLA has been signed |
@zobo Thank you very much for your contribution! Could you please sign the Contributor Agreement? |
Hum, did sign it, but CLA has not changed. Do I need to do anything else? |
Will fix issues with tests. |
run elasticsearch-ci/docs |
Found a bug stemming from the refactoring. The second clause would not execute because the |
Changes for PR 966 (add docker container id discovery for SystemData)
Fantastic. I did not initially focus so much on the tests side of the project, just plugged in the code I used in an old agent implementation I used. Now that I'm looking at it more closely I see it's really clean. Thanks for keeping the quality so high! |
Eh, I choose merge instead of rebase by accident, hope that's ok. |
run elasticsearch-ci/docs |
@zobo Do you have an example of BTW I missed a bug in this PR in the review :( but we fixed it in PR #975 and it's already merged. |
You are right, I just realized that too. I do not currently have any running beanstalks with containerized projects. I will ask around, but best if the OP provides some data. |
* Fixed a few formatting issues (#925) * Improved formatting in AllOptionsMetadata.php * Improved formatting in Logger_tests.c * Improved formatting in src/ext/log.c * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/AllComponentTestsOptionsMetadata.php * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/RawDataFromAgent.php * Improved formatting in tests.ElasticApmTests.ComponentTests.ConfigSettingTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/PDOTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php (part 2) * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed a few naming issues (#926) * Improved formatting in AllOptionsMetadata.php * Improved formatting in Logger_tests.c * Improved formatting in src/ext/log.c * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/AllComponentTestsOptionsMetadata.php * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/RawDataFromAgent.php * Improved formatting in tests.ElasticApmTests.ComponentTests.ConfigSettingTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/PDOTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php (part 2) * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Renamed BootstrapStageLogger::logLevel to logWithLevel * Renamed ELASTIC_APM_LOG_WRITE_TO_SYSLOG to ELASTIC_APM_LOG_TO_BACKGROUND_SINK * Fixed typo in local variable name * Added clarification in the online documentation that log_* configuration is for supportability only (#939) * Clarified that log_* is for supportability only * Apply suggestions from code review Co-authored-by: Brandon Morelli <[email protected]> --------- Co-authored-by: Brandon Morelli <[email protected]> * Refactored some code (#927) * Improved formatting in AllOptionsMetadata.php * Improved formatting in Logger_tests.c * Improved formatting in src/ext/log.c * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/AllComponentTestsOptionsMetadata.php * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/RawDataFromAgent.php * Improved formatting in tests.ElasticApmTests.ComponentTests.ConfigSettingTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/PDOTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php (part 2) * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Renamed BootstrapStageLogger::logLevel to logWithLevel * Renamed ELASTIC_APM_LOG_WRITE_TO_SYSLOG to ELASTIC_APM_LOG_TO_BACKGROUND_SINK * Fixed typo in local variable name * Added Logger::if*LevelEnabledNoLine for all the remaining log levels * Added ability to inherit context from LoggerFactory * Make ArrayUtil::getValueIfKeyExists a template instead of mixed * Added ArrayUtil::append * Marked captureInClassicFormatExcludeElasticApm $loggerFactory as nullable StackTraceUtil::captureInClassicFormatExcludeElasticApm * Removed redundant type-hint * Added ELASTIC_APM_BUILD_PHP_VERSION_ID * Removed declaration of unused makeDynamicArray() * Added src/ext/ArrayView.h * Added string related utility functions * Added string related utility functions (part 2) * Split ConfigManager.h into multiple more manageable headers * Split ConfigManager.h into multiple more manageable headers (part 2) * Split ConfigManager.h into multiple more manageable headers (part 3) * Split ConfigManager.h into multiple more manageable headers (part 4) * Added string related utility functions (part 3) * Split ConfigManager.h into multiple more manageable headers (part 5) * Split big header files into multiple more manageable headers (part 6) * Split big header files into multiple more manageable headers (part 7) * enum LogLevel to a separate header (LogLevel.h) * Added maxEnabledLogLevel() * Added ELASTIC_APM_LOG_DIRECT_INFO * Added missing include * Added // NOLINT for ELASTIC_APM_FOR_EACH_INDEX_START_END * Clarified structure of a header added to each allocation for track it * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h * Extracted OptionalBool to its own header (OptionalBool.h) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 2) * Made implicit casts explcit * Added openFile to have "safe fopen" similar to fopen_s available on Windows * Added openFile to have "safe fopen" similar to fopen_s available on Windows (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 3) * Added resultBufferIsTooSmall to ResultCode * Renamed ELASTIC_APM_CALL_EARLY_GOTO_FINALLY_WITH_SUCCESS to ELASTIC_APM_SET_RESULT_CODE_TO_SUCCESS_AND_GOTO_FINALLY * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 4) * Split ConfigManager.h into multiple more manageable headers (part 6) * Split ConfigManager.h into multiple more manageable headers (part 7) * Removed unused ELASTIC_APM_PHP_PART_ON_PHP_ERROR_FUNC and ELASTIC_APM_PHP_PART_SET_LAST_THROWN_FUNC * Split ConfigManager.h into multiple more manageable headers (part 8) * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 5) * Added zend_string related utility functions * Added missing include-s * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part * Removed unused import (tests/ElasticApmTests/ComponentTests/Util/ResourcesClient.php) * Replaced ComponentTestCaseBase::getMandatoryAppCodeArg + assertIs<expected type> by get<expected type>FromMap * Removed unused import (tests/ElasticApmTests/Util/Deserialization/ServerApiSchemaValidator.php) * Added /* in,out */ to ArrayUtilForTests::append * Added AssertMessageBuilder::buildString * Removed unused import (tests/ElasticApmTests/Util/TestCaseBase.php) * DataProviderForTestBuilder: Have keys included in logged data-set * Added MixedMap * Made IterableUtilForTests::iterableToGenerator a function template instead of being based on mixed type-hint * Added comments to calls of ArrayUtilForTests::append * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part (part 2) * Fixed imports in ComponentTestCaseBase.php * Fixed incorrect merge * Added missing include * Added retries on "composer install" has an intermittent failure * Log PhpUnitExtensionBase::$timestampBeforeTest when setting it * Use TimeUtilForTests::timestampToLoggable in assertLessThanOrEqualTimestamp * Applied runAndEscalateLogLevelOnFailure to testAllWaysToSetConfig from ConfigSettingTest class * Improved supportability (#941) * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Added INTERNAL_CHECKS_LEVEL to OptionNames.php * Added maxNumberOfStackFrames as parameter to LoggableStackTrace::buildForCurrent instead having hardcoded * Removed static from constructConfigManagerMetadata to have on stack trace * Log stack trace on failed ASSERT in native part * Set g_elasticApmDirectLogLevel* to default values so that they can be used even before configuration is parsed * Documented that agent uses PHP's error_reporting (#938) * Documented that agent uses PHP's error_reporting * Reworded part of "PHP errors as APM error events" section * Made sure all the supported configuration options are documented (#940) * Documented that agent uses PHP's error_reporting * Clarified that log_* is for supportability only * Documented capture_errors * Fixed incorrect quotes placement * Improved description for disable_instrumentations * Apply suggestions from code review Co-authored-by: Brandon Morelli <[email protected]> * Fixed merge --------- Co-authored-by: Brandon Morelli <[email protected]> * Update supported-technologies.asciidoc (#952) Added Laravel 10 to the list of versions of Laravel * Update supported-technologies.asciidoc (#952) Added Laravel 10 to the list of versions of Laravel * Update supported-technologies.asciidoc (#952) Added Laravel 10 to the list of versions of Laravel * Fixed addDelayToAbsTimeSpec for the case when (#953) when delayInNanoseconds >= NANOSECONDS_IN_SECOND * Extended span compression support to spans without service target (#944) * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Removed unused imports * Extended span compression to spans without service target * Removed redundant comment * Clarified docs * Added workaround for false positives from static analysis * Simplified parallel-lint invocation * Fixed unit tests failing on PHP 7.2 * Fixed issue found by static analysis * Fixed formatting * Fixed formatting * Added --exclude ./tests/polyfills/ * Removed TestCaseBaseShim * Fixed failing unit test * Added ELASTIC_APM_PHP_TESTS_IS_LONG_RUN_MODE * Reduced number of datasets from dataProviderForTestReasonsCompressionStops * Run testOneCompressedSequence only in isLongRunMode * Added check for isLongRunMode dataProviderForTestReasonsCompressionStops * Fixed static analysis issue * Fixed failing unit tests * Temporarily hide TransactionMaxSpansUnitTest behind isLongRunMode * Fixed unit tests * Added diagnostics * Fixed failing unit tests * Added re-run with escalated log level to HttpTransactionTest::testHttpStatus * Fixed failing component test * Re-enabled SpanCompressionUnitTest::testReasonsCompressionStops * chore: Updated the content of the file "/tmp/updatecli/github/elastic... (#942) ... /apm-agent-php/tests/APM_Agents_shared/gherkin-specs/otel_bridge.feature" Made with ❤️️ by updatecli Co-authored-by: apmmachine <[email protected]> * Prepare for additional instrumentation kind (#946) * Improved formatting in AllOptionsMetadata.php * Improved formatting in Logger_tests.c * Improved formatting in src/ext/log.c * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/AllComponentTestsOptionsMetadata.php * Improved formatting in tests/ElasticApmTests/ComponentTests/Util/RawDataFromAgent.php * Improved formatting in tests.ElasticApmTests.ComponentTests.ConfigSettingTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/PDOTest.php * Improved formatting in tests/ElasticApmTests/ComponentTests/MySQLiTest.php (part 2) * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Renamed BootstrapStageLogger::logLevel to logWithLevel * Renamed ELASTIC_APM_LOG_WRITE_TO_SYSLOG to ELASTIC_APM_LOG_TO_BACKGROUND_SINK * Fixed typo in local variable name * Added Logger::if*LevelEnabledNoLine for all the remaining log levels * Added ability to inherit context from LoggerFactory * Make ArrayUtil::getValueIfKeyExists a template instead of mixed * Added ArrayUtil::append * Marked captureInClassicFormatExcludeElasticApm $loggerFactory as nullable StackTraceUtil::captureInClassicFormatExcludeElasticApm * Removed redundant type-hint * Added ELASTIC_APM_BUILD_PHP_VERSION_ID * Removed declaration of unused makeDynamicArray() * Added src/ext/ArrayView.h * Added string related utility functions * Added string related utility functions (part 2) * Split ConfigManager.h into multiple more manageable headers * Split ConfigManager.h into multiple more manageable headers (part 2) * Split ConfigManager.h into multiple more manageable headers (part 3) * Split ConfigManager.h into multiple more manageable headers (part 4) * Added string related utility functions (part 3) * Split ConfigManager.h into multiple more manageable headers (part 5) * Split big header files into multiple more manageable headers (part 6) * Split big header files into multiple more manageable headers (part 7) * enum LogLevel to a separate header (LogLevel.h) * Added maxEnabledLogLevel() * Added ELASTIC_APM_LOG_DIRECT_INFO * Added missing include * Added // NOLINT for ELASTIC_APM_FOR_EACH_INDEX_START_END * Clarified structure of a header added to each allocation for track it * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h * Extracted OptionalBool to its own header (OptionalBool.h) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 2) * Made implicit casts explcit * Added openFile to have "safe fopen" similar to fopen_s available on Windows * Added openFile to have "safe fopen" similar to fopen_s available on Windows (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 3) * Added resultBufferIsTooSmall to ResultCode * Renamed ELASTIC_APM_CALL_EARLY_GOTO_FINALLY_WITH_SUCCESS to ELASTIC_APM_SET_RESULT_CODE_TO_SUCCESS_AND_GOTO_FINALLY * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 4) * Split ConfigManager.h into multiple more manageable headers (part 6) * Split ConfigManager.h into multiple more manageable headers (part 7) * Removed unused ELASTIC_APM_PHP_PART_ON_PHP_ERROR_FUNC and ELASTIC_APM_PHP_PART_SET_LAST_THROWN_FUNC * Split ConfigManager.h into multiple more manageable headers (part 8) * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 5) * Added zend_string related utility functions * Added missing include-s * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part * Removed unused import (tests/ElasticApmTests/ComponentTests/Util/ResourcesClient.php) * Replaced ComponentTestCaseBase::getMandatoryAppCodeArg + assertIs<expected type> by get<expected type>FromMap * Removed unused import (tests/ElasticApmTests/Util/Deserialization/ServerApiSchemaValidator.php) * Added /* in,out */ to ArrayUtilForTests::append * Added AssertMessageBuilder::buildString * Removed unused import (tests/ElasticApmTests/Util/TestCaseBase.php) * DataProviderForTestBuilder: Have keys included in logged data-set * Added MixedMap * Made IterableUtilForTests::iterableToGenerator a function template instead of being based on mixed type-hint * Added comments to calls of ArrayUtilForTests::append * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part (part 2) * Fixed imports in ComponentTestCaseBase.php * Fixed incorrect merge * Added missing include * Added retries on "composer install" has an intermittent failure * Log PhpUnitExtensionBase::$timestampBeforeTest when setting it * Use TimeUtilForTests::timestampToLoggable in assertLessThanOrEqualTimestamp * Applied runAndEscalateLogLevelOnFailure to testAllWaysToSetConfig from ConfigSettingTest class * Added INTERNAL_CHECKS_LEVEL to OptionNames.php * Added maxNumberOfStackFrames as parameter to LoggableStackTrace::buildForCurrent instead having hardcoded * Removed static from constructConfigManagerMetadata to have on stack trace * Log stack trace on failed ASSERT in native part * Set g_elasticApmDirectLogLevel* to default values so that they can be used even before configuration is parsed * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Added optional dbgParamName for better diagnostics * Distinguish between plugin name and keywords Both name and keywords can be used to disable a plugin * Removed unused imports * Added 'internal-func' to names related to existing instrumentation (part 2) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added 'internal-func' to names related to existing instrumentation (part 3) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Removed unused imports * Extended span compression to spans without service target * Removed redundant comment * Clarified docs * Added workaround for false positives from static analysis * Simplified parallel-lint invocation * Fixed unit tests failing on PHP 7.2 * Fixed issue found by static analysis * Fixed formatting * Fixed formatting * Added --exclude ./tests/polyfills/ * Removed TestCaseBaseShim * Fixed failing unit test * Added ELASTIC_APM_PHP_TESTS_IS_LONG_RUN_MODE * Reduced number of datasets from dataProviderForTestReasonsCompressionStops * Run testOneCompressedSequence only in isLongRunMode * Added check for isLongRunMode dataProviderForTestReasonsCompressionStops * Fixed static analysis issue * Fixed failing unit tests * Removed unused import * Fixed merge * Fixed merge * Fixed merge * Fixed merge * Temporarily hide TransactionMaxSpansUnitTest behind isLongRunMode * Fixed unit tests * Added diagnostics * Fixed failing unit tests * Added re-run with escalated log level to HttpTransactionTest::testHttpStatus * Fixed failing component test * Re-enabled SpanCompressionUnitTest::testReasonsCompressionStops * Fixed merge * Fixed line endings * Fixed line endings (CRLF -> LF) (#956) * Fixed not joining background sender thread if there was fork after module init (#959) * Fixed line endings (CRLF -> LF) * Fixed not joining background sender thread if there was fork Fixed not joining background sender thread if there was fork after module init * Fixed not cleaning up connection data in sync backend comm. mode (#957) * Fixed line endings (CRLF -> LF) * Fixed not cleaning up connection data in sync backend comm. mode * Fixed registration of pthread_atfork handlers (876) (#964) * Fixed verify_server_cert=false not disabling all the checks related to HTTPS certificate (#965) * Fixed verify_server_cert=false not disabling all the checks * Removed setting CURLOPT_SSL_VERIFYSTATUS to 0 since 0 is the default * Prevent deadloop in exception and error handlers (#955) * added logging in case of potential deadloop * moved hook registration into MINIT/MSHUTDOWN * Prepared for 1.8.4 release (#967) * fix: add docker container id discovery for SystemData (#966) * fix: add docker container id discovery for SystemData * Refactor to handle possible false from file_get_contents * fix semantic error and change priority from cgroups to mountinfo * Fix tests to know about container.id in SystemData * Fixed issue found by static analysis * Refactored MetadataDiscoverer::detectContainerId to make it testable * Added unit test for MetadataDiscoverer::detectContainerId --------- Co-authored-by: Sergey Kleyman <[email protected]> * Added dev_internal_backend_comm_log_verbose to use CURLOPT_VERBOSE on demand (#407) * Added CURLOPT_VERBOSE * Added CURLOPT_VERBOSE * Redirected libcurl's verbose output to file and then syslog * Fixed merge * Added dev_internal_backend_comm_log_verbose * Fixed default in documentation for dev_internal_backend_comm_log_verbose (#972) * Added ELASTIC_APM_PHP_TESTS_ESCALATED_RERUNS_PROD_CODE_LOG_LEVEL_OPTION_NAME option (#971) * Added ELASTIC_APM_PHP_TESTS_ESCALATED_RERUNS_PROD_CODE_LOG_LEVEL_OPTION_NAME * Fixed option name in metadata * On after failure re-run escalate all log levels on CentOS * Fixed $escalatedRerunsProdCodeLogLevelOptionName declared type * Fixed not unregistering signal handler on module shutdown (#960) * Simplified logging of the current process command line (#973) * Added logging curl info (#974) * Added curl info when logging curl related errors * Log curlOptionId also as used constant * Made logged curl info have JSON-like structure * Log curl info on initConnectionData entry * Simplified logging of the current process command line * Fixed metadata container ID detected but not stored (#975) * Fixed system.container.id being detected but not stored in metadata * Added component test for metadata's system.container.id detection * Updated docs for service_node_name configuration option * WordPress instrumentation (capturing plugins, hooks and theme) (#948) * Renamed BootstrapStageLogger::logLevel to logWithLevel * Renamed ELASTIC_APM_LOG_WRITE_TO_SYSLOG to ELASTIC_APM_LOG_TO_BACKGROUND_SINK * Fixed typo in local variable name * Added Logger::if*LevelEnabledNoLine for all the remaining log levels * Added ability to inherit context from LoggerFactory * Make ArrayUtil::getValueIfKeyExists a template instead of mixed * Added ArrayUtil::append * Marked captureInClassicFormatExcludeElasticApm $loggerFactory as nullable StackTraceUtil::captureInClassicFormatExcludeElasticApm * Removed redundant type-hint * Added ELASTIC_APM_BUILD_PHP_VERSION_ID * Removed declaration of unused makeDynamicArray() * Added src/ext/ArrayView.h * Added string related utility functions * Added string related utility functions (part 2) * Split ConfigManager.h into multiple more manageable headers * Split ConfigManager.h into multiple more manageable headers (part 2) * Split ConfigManager.h into multiple more manageable headers (part 3) * Split ConfigManager.h into multiple more manageable headers (part 4) * Added string related utility functions (part 3) * Split ConfigManager.h into multiple more manageable headers (part 5) * Split big header files into multiple more manageable headers (part 6) * Split big header files into multiple more manageable headers (part 7) * enum LogLevel to a separate header (LogLevel.h) * Added maxEnabledLogLevel() * Added ELASTIC_APM_LOG_DIRECT_INFO * Added missing include * Added // NOLINT for ELASTIC_APM_FOR_EACH_INDEX_START_END * Clarified structure of a header added to each allocation for track it * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h * Extracted OptionalBool to its own header (OptionalBool.h) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 2) * Made implicit casts explcit * Added openFile to have "safe fopen" similar to fopen_s available on Windows * Added openFile to have "safe fopen" similar to fopen_s available on Windows (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 3) * Added resultBufferIsTooSmall to ResultCode * Renamed ELASTIC_APM_CALL_EARLY_GOTO_FINALLY_WITH_SUCCESS to ELASTIC_APM_SET_RESULT_CODE_TO_SUCCESS_AND_GOTO_FINALLY * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 4) * Split ConfigManager.h into multiple more manageable headers (part 6) * Split ConfigManager.h into multiple more manageable headers (part 7) * Removed unused ELASTIC_APM_PHP_PART_ON_PHP_ERROR_FUNC and ELASTIC_APM_PHP_PART_SET_LAST_THROWN_FUNC * Split ConfigManager.h into multiple more manageable headers (part 8) * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 5) * Added zend_string related utility functions * Added missing include-s * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part * Removed unused import (tests/ElasticApmTests/ComponentTests/Util/ResourcesClient.php) * Replaced ComponentTestCaseBase::getMandatoryAppCodeArg + assertIs<expected type> by get<expected type>FromMap * Removed unused import (tests/ElasticApmTests/Util/Deserialization/ServerApiSchemaValidator.php) * Added /* in,out */ to ArrayUtilForTests::append * Added AssertMessageBuilder::buildString * Removed unused import (tests/ElasticApmTests/Util/TestCaseBase.php) * DataProviderForTestBuilder: Have keys included in logged data-set * Added MixedMap * Made IterableUtilForTests::iterableToGenerator a function template instead of being based on mixed type-hint * Added comments to calls of ArrayUtilForTests::append * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part (part 2) * Fixed imports in ComponentTestCaseBase.php * Fixed incorrect merge * Added missing include * Added retries on "composer install" has an intermittent failure * Log PhpUnitExtensionBase::$timestampBeforeTest when setting it * Use TimeUtilForTests::timestampToLoggable in assertLessThanOrEqualTimestamp * Applied runAndEscalateLogLevelOnFailure to testAllWaysToSetConfig from ConfigSettingTest class * Added INTERNAL_CHECKS_LEVEL to OptionNames.php * Added maxNumberOfStackFrames as parameter to LoggableStackTrace::buildForCurrent instead having hardcoded * Removed static from constructConfigManagerMetadata to have on stack trace * Log stack trace on failed ASSERT in native part * Set g_elasticApmDirectLogLevel* to default values so that they can be used even before configuration is parsed * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Added optional dbgParamName for better diagnostics * Distinguish between plugin name and keywords Both name and keywords can be used to disable a plugin * Removed unused imports * Added 'internal-func' to names related to existing instrumentation (part 2) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added 'internal-func' to names related to existing instrumentation (part 3) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added 'internal-func' to names related to existing instrumentation (part 3) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added verifyExactArgsCount * Implemented WordPress instrumentation - part 1 * Added AST_PROCESS_* options to AllOptionsMetadata.php * Added option names to OptionNames.php * Added AST processing options to Config/Snapshot.php * Switch to span types wordpress_plugin and wordpress_theme * Fixed issue with assertDirectoryDoesNotExist assertDirectoryDoesNotExist that was added only in PHPUnit 9 and it does not exist in PHPUnit 8.5 that we still use when testing under older PHP versions * Removed unused imports * Added isStringViewSuffix * Added new .c files to src/ext/config.m4 * Added AST processing related options to src/ext/ConfigManager.c * Added AST processing related options to src/ext/ConfigManager.h * Added ELASTIC_APM_WORDPRESS_DIRECT_CALL_METHOD_SET_READY_TO_WRAP_FILTER_CALLBACKS* constants * Added AST processing related options to src/ext/elastic_apm.c * Added AST processing related API from extension (native part) to PHP part of the agent * Added AST processing related APIs to src/ext/elastic_apm_API.h * Added calls for AST processing from lifecycle stages * Instrumentation using AST processing (files src/ext/tracer_PHP_part.c|h) files src/ext/tracer_PHP_part.h and src/ext/tracer_PHP_part.c) * Removed duplicate isStringViewSuffix * Added streamZVal * Added ELASTIC_APM_PHP_TESTS_COMPARE_AST_CONVERTED_BACK_TO_SOURCE * Added AppCodeHostParams::setAgentOptionIfNotDefaultValue * Added AppCodeHostParams::setAgentOptions * Excluded WordPress mock source from static analysis * Instrumentation using AST processing (file tests/ElasticApmTests/ComponentTests/Util/ComponentTestCaseBase.php) * Added ELASTIC_APM_PHP_TESTS_COMPARE_AST_CONVERTED_BACK_TO_SOURCE (part 2) * Added AppCodeHostParams::setAgentOptionIfNotDefaultValue (part 2) * Moved ArrayUtil::append back to ArrayUtilForTests::append * Removed unused imports * Added AST processing related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * Added testReferencesInArray * Added FileUtilForTests::createTempSubDir * Added missing import * Removed redundant local variable * Added clarifying comments * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Removed unused imports * Extended span compression to spans without service target * Removed redundant comment * Clarified docs * Added workaround for false positives from static analysis * Simplified parallel-lint invocation * Fixed unit tests failing on PHP 7.2 * Fixed issue found by static analysis * Fixed formatting * Fixed formatting * Added --exclude ./tests/polyfills/ * Removed TestCaseBaseShim * Fixed failing unit test * Added ELASTIC_APM_PHP_TESTS_IS_LONG_RUN_MODE * Reduced number of datasets from dataProviderForTestReasonsCompressionStops * Run testOneCompressedSequence only in isLongRunMode * Added check for isLongRunMode dataProviderForTestReasonsCompressionStops * Fixed static analysis issue * Fixed failing unit tests * Removed unused import * Fixed merge * Fixed merge * Fixed merge * Fixed merge * Temporarily hide TransactionMaxSpansUnitTest behind isLongRunMode * Temporarily disable unit tests * Fixed unit tests * Added diagnostics * Fixed failing unit tests * Added re-run with escalated log level to HttpTransactionTest::testHttpStatus * Fixed failing component test * Revert "Temporarily disable unit tests" This reverts commit 3c26cc5095d8eb53631e1300da054e3c7437f208. * Re-enabled SpanCompressionUnitTest::testReasonsCompressionStops * Fixed merge * Temporarily disabled component tests * Fixed bad merge * Temporarily run only PDOAutoInstrumentationTest * Fixed merge * Re-enabled component tests * Fixed line endings * Fixed line endings (CRLF -> LF) * Fixed not cleaning up connection data in sync backend comm. mode * Fixed not joining background sender thread if there was fork Fixed not joining background sender thread if there was fork after module init * Fixed system.container.id being detected but not stored in metadata * Added component test for metadata's system.container.id detection * Updated docs for service_node_name configuration option * Set metadata's service.framework to WordPress/<version> * Added check for stack trace to WordPressAutoInstrumentationTest * Fixed ErrorComponentTest * Fixed ErrorComponentTest * Added WordPress and MySQLi to supported technologies * Converted file path to Linux directory separators * Added count for number of calls to WordPressFilterCallbackWrapper ctor/dtor For supportability and component tests * Replaced emalloc in cloneAstDecl with an array on stack * Run composer install with retries for unit tests as well (#979) * Documented TransactionInterface->ensureParentId() API (#981) * Refactored call stack trace capturing code (#992) * Marked captureInClassicFormatExcludeElasticApm $loggerFactory as nullable StackTraceUtil::captureInClassicFormatExcludeElasticApm * Removed redundant type-hint * Added ELASTIC_APM_BUILD_PHP_VERSION_ID * Removed declaration of unused makeDynamicArray() * Added src/ext/ArrayView.h * Added string related utility functions * Added string related utility functions (part 2) * Split ConfigManager.h into multiple more manageable headers * Split ConfigManager.h into multiple more manageable headers (part 2) * Split ConfigManager.h into multiple more manageable headers (part 3) * Split ConfigManager.h into multiple more manageable headers (part 4) * Added string related utility functions (part 3) * Split ConfigManager.h into multiple more manageable headers (part 5) * Split big header files into multiple more manageable headers (part 6) * Split big header files into multiple more manageable headers (part 7) * enum LogLevel to a separate header (LogLevel.h) * Added maxEnabledLogLevel() * Added ELASTIC_APM_LOG_DIRECT_INFO * Added missing include * Added // NOLINT for ELASTIC_APM_FOR_EACH_INDEX_START_END * Clarified structure of a header added to each allocation for track it * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h * Extracted OptionalBool to its own header (OptionalBool.h) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 2) * Made implicit casts explcit * Added openFile to have "safe fopen" similar to fopen_s available on Windows * Added openFile to have "safe fopen" similar to fopen_s available on Windows (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 3) * Added resultBufferIsTooSmall to ResultCode * Renamed ELASTIC_APM_CALL_EARLY_GOTO_FINALLY_WITH_SUCCESS to ELASTIC_APM_SET_RESULT_CODE_TO_SUCCESS_AND_GOTO_FINALLY * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 4) * Split ConfigManager.h into multiple more manageable headers (part 6) * Split ConfigManager.h into multiple more manageable headers (part 7) * Removed unused ELASTIC_APM_PHP_PART_ON_PHP_ERROR_FUNC and ELASTIC_APM_PHP_PART_SET_LAST_THROWN_FUNC * Split ConfigManager.h into multiple more manageable headers (part 8) * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 5) * Added zend_string related utility functions * Added missing include-s * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part * Removed unused import (tests/ElasticApmTests/ComponentTests/Util/ResourcesClient.php) * Replaced ComponentTestCaseBase::getMandatoryAppCodeArg + assertIs<expected type> by get<expected type>FromMap * Removed unused import (tests/ElasticApmTests/Util/Deserialization/ServerApiSchemaValidator.php) * Added /* in,out */ to ArrayUtilForTests::append * Added AssertMessageBuilder::buildString * Removed unused import (tests/ElasticApmTests/Util/TestCaseBase.php) * DataProviderForTestBuilder: Have keys included in logged data-set * Added MixedMap * Made IterableUtilForTests::iterableToGenerator a function template instead of being based on mixed type-hint * Added comments to calls of ArrayUtilForTests::append * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part (part 2) * Fixed imports in ComponentTestCaseBase.php * Fixed incorrect merge * Added missing include * Added retries on "composer install" has an intermittent failure * Log PhpUnitExtensionBase::$timestampBeforeTest when setting it * Use TimeUtilForTests::timestampToLoggable in assertLessThanOrEqualTimestamp * Applied runAndEscalateLogLevelOnFailure to testAllWaysToSetConfig from ConfigSettingTest class * Added INTERNAL_CHECKS_LEVEL to OptionNames.php * Added maxNumberOfStackFrames as parameter to LoggableStackTrace::buildForCurrent instead having hardcoded * Removed static from constructConfigManagerMetadata to have on stack trace * Log stack trace on failed ASSERT in native part * Set g_elasticApmDirectLogLevel* to default values so that they can be used even before configuration is parsed * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Added optional dbgParamName for better diagnostics * Distinguish between plugin name and keywords Both name and keywords can be used to disable a plugin * Removed unused imports * Added 'internal-func' to names related to existing instrumentation (part 2) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added 'internal-func' to names related to existing instrumentation (part 3) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added 'internal-func' to names related to existing instrumentation (part 3) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added verifyExactArgsCount * Implemented WordPress instrumentation - part 1 * Added AST_PROCESS_* options to AllOptionsMetadata.php * Added option names to OptionNames.php * Added AST processing options to Config/Snapshot.php * Switch to span types wordpress_plugin and wordpress_theme * Fixed issue with assertDirectoryDoesNotExist assertDirectoryDoesNotExist that was added only in PHPUnit 9 and it does not exist in PHPUnit 8.5 that we still use when testing under older PHP versions * Removed unused imports * Added isStringViewSuffix * Added new .c files to src/ext/config.m4 * Added AST processing related options to src/ext/ConfigManager.c * Added AST processing related options to src/ext/ConfigManager.h * Added ELASTIC_APM_WORDPRESS_DIRECT_CALL_METHOD_SET_READY_TO_WRAP_FILTER_CALLBACKS* constants * Added AST processing related options to src/ext/elastic_apm.c * Added AST processing related API from extension (native part) to PHP part of the agent * Added AST processing related APIs to src/ext/elastic_apm_API.h * Added calls for AST processing from lifecycle stages * Instrumentation using AST processing (files src/ext/tracer_PHP_part.c|h) files src/ext/tracer_PHP_part.h and src/ext/tracer_PHP_part.c) * Removed duplicate isStringViewSuffix * Added streamZVal * Added ELASTIC_APM_PHP_TESTS_COMPARE_AST_CONVERTED_BACK_TO_SOURCE * Added AppCodeHostParams::setAgentOptionIfNotDefaultValue * Added AppCodeHostParams::setAgentOptions * Excluded WordPress mock source from static analysis * Instrumentation using AST processing (file tests/ElasticApmTests/ComponentTests/Util/ComponentTestCaseBase.php) * Added ELASTIC_APM_PHP_TESTS_COMPARE_AST_CONVERTED_BACK_TO_SOURCE (part 2) * Added AppCodeHostParams::setAgentOptionIfNotDefaultValue (part 2) * Moved ArrayUtil::append back to ArrayUtilForTests::append * Removed unused imports * Added AST processing related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * Added testReferencesInArray * Added FileUtilForTests::createTempSubDir * Added missing import * Removed redundant local variable * Added clarifying comments * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Removed unused imports * Extended span compression to spans without service target * Removed redundant comment * Clarified docs * Added workaround for false positives from static analysis * Simplified parallel-lint invocation * Fixed unit tests failing on PHP 7.2 * Fixed issue found by static analysis * Fixed formatting * Fixed formatting * Added --exclude ./tests/polyfills/ * Removed TestCaseBaseShim * Fixed failing unit test * Added ELASTIC_APM_PHP_TESTS_IS_LONG_RUN_MODE * Reduced number of datasets from dataProviderForTestReasonsCompressionStops * Run testOneCompressedSequence only in isLongRunMode * Added check for isLongRunMode dataProviderForTestReasonsCompressionStops * Fixed static analysis issue * Fixed failing unit tests * Removed unused import * Fixed merge * Fixed merge * Fixed merge * Fixed merge * Temporarily hide TransactionMaxSpansUnitTest behind isLongRunMode * Temporarily disable unit tests * Fixed unit tests * Added diagnostics * Fixed failing unit tests * Added re-run with escalated log level to HttpTransactionTest::testHttpStatus * Fixed failing component test * Revert "Temporarily disable unit tests" This reverts commit 3c26cc5095d8eb53631e1300da054e3c7437f208. * Re-enabled SpanCompressionUnitTest::testReasonsCompressionStops * Fixed merge * Temporarily disabled component tests * Fixed bad merge * Temporarily run only PDOAutoInstrumentationTest * Fixed merge * Re-enabled component tests * Fixed line endings * Fixed line endings (CRLF -> LF) * Fixed not cleaning up connection data in sync backend comm. mode * Fixed not joining background sender thread if there was fork Fixed not joining background sender thread if there was fork after module init * Fixed system.container.id being detected but not stored in metadata * Added component test for metadata's system.container.id detection * Updated docs for service_node_name configuration option * Set metadata's service.framework to WordPress/<version> * Added check for stack trace to WordPressAutoInstrumentationTest * Fixed ErrorComponentTest * Fixed ErrorComponentTest * Added WordPress and MySQLi to supported technologies * Converted file path to Linux directory separators * Added count for number of calls to WordPressFilterCallbackWrapper ctor/dtor For supportability and component tests * Replaced emalloc in cloneAstDecl with an array on stack * Make all properties of StackTraceFrameExpectations be Optional * Made StackTraceUtil instance class * Refactored call stack trace capturing code * Refactor AutoInstrumentationUtil->captureCurrentSpan * Fixed static analysis failure * Improved testing of stack trace capture part of WordPress auto instrumentation (#994) * Added string related utility functions (part 2) * Split ConfigManager.h into multiple more manageable headers * Split ConfigManager.h into multiple more manageable headers (part 2) * Split ConfigManager.h into multiple more manageable headers (part 3) * Split ConfigManager.h into multiple more manageable headers (part 4) * Added string related utility functions (part 3) * Split ConfigManager.h into multiple more manageable headers (part 5) * Split big header files into multiple more manageable headers (part 6) * Split big header files into multiple more manageable headers (part 7) * enum LogLevel to a separate header (LogLevel.h) * Added maxEnabledLogLevel() * Added ELASTIC_APM_LOG_DIRECT_INFO * Added missing include * Added // NOLINT for ELASTIC_APM_FOR_EACH_INDEX_START_END * Clarified structure of a header added to each allocation for track it * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h * Extracted OptionalBool to its own header (OptionalBool.h) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 2) * Made implicit casts explcit * Added openFile to have "safe fopen" similar to fopen_s available on Windows * Added openFile to have "safe fopen" similar to fopen_s available on Windows (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 3) * Added resultBufferIsTooSmall to ResultCode * Renamed ELASTIC_APM_CALL_EARLY_GOTO_FINALLY_WITH_SUCCESS to ELASTIC_APM_SET_RESULT_CODE_TO_SUCCESS_AND_GOTO_FINALLY * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 4) * Split ConfigManager.h into multiple more manageable headers (part 6) * Split ConfigManager.h into multiple more manageable headers (part 7) * Removed unused ELASTIC_APM_PHP_PART_ON_PHP_ERROR_FUNC and ELASTIC_APM_PHP_PART_SET_LAST_THROWN_FUNC * Split ConfigManager.h into multiple more manageable headers (part 8) * Added ELASTIC_APM_EMPTY_STRING_VIEW instead of makeEmptyStringView so it can be used to init static (part 2) * Extracted TextOutputStream_forward_decl.h from TextOutputStream.h (part 5) * Added zend_string related utility functions * Added missing include-s * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part * Removed unused import (tests/ElasticApmTests/ComponentTests/Util/ResourcesClient.php) * Replaced ComponentTestCaseBase::getMandatoryAppCodeArg + assertIs<expected type> by get<expected type>FromMap * Removed unused import (tests/ElasticApmTests/Util/Deserialization/ServerApiSchemaValidator.php) * Added /* in,out */ to ArrayUtilForTests::append * Added AssertMessageBuilder::buildString * Removed unused import (tests/ElasticApmTests/Util/TestCaseBase.php) * DataProviderForTestBuilder: Have keys included in logged data-set * Added MixedMap * Made IterableUtilForTests::iterableToGenerator a function template instead of being based on mixed type-hint * Added comments to calls of ArrayUtilForTests::append * Refactored TextUtilForTests::iterateLines to allow finer control over end-of-line part (part 2) * Fixed imports in ComponentTestCaseBase.php * Fixed incorrect merge * Added missing include * Added retries on "composer install" has an intermittent failure * Log PhpUnitExtensionBase::$timestampBeforeTest when setting it * Use TimeUtilForTests::timestampToLoggable in assertLessThanOrEqualTimestamp * Applied runAndEscalateLogLevelOnFailure to testAllWaysToSetConfig from ConfigSettingTest class * Added INTERNAL_CHECKS_LEVEL to OptionNames.php * Added maxNumberOfStackFrames as parameter to LoggableStackTrace::buildForCurrent instead having hardcoded * Removed static from constructConfigManagerMetadata to have on stack trace * Log stack trace on failed ASSERT in native part * Set g_elasticApmDirectLogLevel* to default values so that they can be used even before configuration is parsed * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Added optional dbgParamName for better diagnostics * Distinguish between plugin name and keywords Both name and keywords can be used to disable a plugin * Removed unused imports * Added 'internal-func' to names related to existing instrumentation (part 2) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added 'internal-func' to names related to existing instrumentation (part 3) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added 'internal-func' to names related to existing instrumentation (part 3) to distinguish from other instrumentation mechanisms (for example the upcoming AST processing based) * Added verifyExactArgsCount * Implemented WordPress instrumentation - part 1 * Added AST_PROCESS_* options to AllOptionsMetadata.php * Added option names to OptionNames.php * Added AST processing options to Config/Snapshot.php * Switch to span types wordpress_plugin and wordpress_theme * Fixed issue with assertDirectoryDoesNotExist assertDirectoryDoesNotExist that was added only in PHPUnit 9 and it does not exist in PHPUnit 8.5 that we still use when testing under older PHP versions * Removed unused imports * Added isStringViewSuffix * Added new .c files to src/ext/config.m4 * Added AST processing related options to src/ext/ConfigManager.c * Added AST processing related options to src/ext/ConfigManager.h * Added ELASTIC_APM_WORDPRESS_DIRECT_CALL_METHOD_SET_READY_TO_WRAP_FILTER_CALLBACKS* constants * Added AST processing related options to src/ext/elastic_apm.c * Added AST processing related API from extension (native part) to PHP part of the agent * Added AST processing related APIs to src/ext/elastic_apm_API.h * Added calls for AST processing from lifecycle stages * Instrumentation using AST processing (files src/ext/tracer_PHP_part.c|h) files src/ext/tracer_PHP_part.h and src/ext/tracer_PHP_part.c) * Removed duplicate isStringViewSuffix * Added streamZVal * Added ELASTIC_APM_PHP_TESTS_COMPARE_AST_CONVERTED_BACK_TO_SOURCE * Added AppCodeHostParams::setAgentOptionIfNotDefaultValue * Added AppCodeHostParams::setAgentOptions * Excluded WordPress mock source from static analysis * Instrumentation using AST processing (file tests/ElasticApmTests/ComponentTests/Util/ComponentTestCaseBase.php) * Added ELASTIC_APM_PHP_TESTS_COMPARE_AST_CONVERTED_BACK_TO_SOURCE (part 2) * Added AppCodeHostParams::setAgentOptionIfNotDefaultValue (part 2) * Moved ArrayUtil::append back to ArrayUtilForTests::append * Removed unused imports * Added AST processing related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * Added testReferencesInArray * Added FileUtilForTests::createTempSubDir * Added missing import * Removed redundant local variable * Added clarifying comments * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Reverted references of ELASTIC_APM_EMPTY_STRING_VIEW back to makeEmptyStringView() since ELASTIC_APM_EMPTY_STRING_VIEW is added in a later PR * Fixed incorrect merge * Added documentation for configuration options * Added options to AllOptionsMetadata.php * Added SPAN_COMPRESSION_* option names to OptionNames.php * Added Span Compression options to Config/Snapshot.php * Added COMPRESSION_STRATEGY_* constants * Added implementation * Added Span Compression related options to src/ext/ConfigManager.c * Added Span Compression related options to src/ext/ConfigManager.h * Added Span Compression related options to src/ext/elastic_apm.c * Added Span Compression related options to tests/ElasticApmTests/ComponentTests/ConfigSettingTest.php * MySQLiTest: Disable Span Compression feature to have all the expected spans individually * PDOTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/ComponentTests/SpanCompressionComponentTest.php * Clarified comment about "Disable Span Compression" * StackTraceComponentTest: Disable Span Compression feature to have all the expected spans individually * Added TracerUnitTestCaseBase::isCompatibleWithSpanCompression * InferredSpansBuilderTest: Disable Span Compression feature to have all the expected spans individually * StackTraceUnitTest: Disable Span Compression feature to have all the expected spans individually * Added tests/ElasticApmTests/UnitTests/SpanCompressionUnitTest.php * Added tests\ElasticApmTests\Util\AssertValidTrait::assertValidNonNullableString * Updated ElasticApmTests\Util\SpanDto * Updated SpanExpectations * Removed unused imports * Extended span compression to spans without service target * Removed redundant comment * Clarified docs * Added workaround for false positives from static analysis * Simplified parallel-lint invocation * Fixed unit tests failing on PHP 7.2 * Fixed issue found by static analysis * Fixed formatting * Fixed formatting * Added --exclude ./tests/polyfills/ * Removed TestCaseBaseShim * Fixed failing unit test * Added ELASTIC_APM_PHP_TESTS_IS_LONG_RUN_MO…
Closes #823