Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added SPAN_STACK_TRACE_MIN_DURATION configuration option (#996)
* 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 3c26cc5. * 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 * Converted StackTraceUtil from static class to class with instance state * Added option part 1 * Remove outdated comment * Added AssertMessageStack begin/end markers * Added verification of top stack frame in WordPressAutoInstrumentationTest * Make all properties of StackTraceFrameExpectations be Optional * Made StackTraceUtil instance class * Refactored call stack trace capturing code * Refactor AutoInstrumentationUtil->captureCurrentSpan * Fixed static analysis failure * Use StackTraceFrameExpectations for $expectedCallbackStackTraceTopFrame * Added docs for stack_trace_limit config * Added tests * Fixed failing component test * Removed redundant import * Added timestamps to static-check-unit-test.sh * Added timeout to .phpt tests runs * Added SPAN_STACK_TRACE_MIN_DURATION config to native part * Removed unrelated changes * Removed ELASTIC_APM_PHP_TESTS_PHPT_TIMEOUT_SECONDS * Use fixed run-tests.php from PHP8.0 * modified run-tests.php * disabled non-blocking read on std streams * changed reading method * Added test for config STACK_TRACE_LIMIT for inferred spans * Updated documentation * Removed redundant redirection * Removed redundant comments * Revert changes related to phpt_timeout to merge them separately * Added documentation * Allow any integer value for STACK_TRACE_LIMIT * Added adaptToSmoke to StackTraceLimitComponentTest * Fixed $cachedStackTraceLimitConfig type hint * Removed redundant static analysis suppression * Updated description in the documentation * Implemented SPAN_STACK_TRACE_MIN_DURATION (production code) * Added tests for SPAN_STACK_TRACE_MIN_DURATION * Added tests for SPAN_STACK_TRACE_MIN_DURATION part 2 * Fixed failing SpanStackTraceComponentTest * Update docs/configuration.asciidoc Co-authored-by: Brandon Morelli <[email protected]> * Updated documentation * Refactored to disableTimingDependentFeatures * Removed redundant import * Fix issue found by static analysis * Update docs/configuration.asciidoc Co-authored-by: Brandon Morelli <[email protected]> * Fixed wording in SPAN_STACK_TRACE_MIN_DURATION description --------- Co-authored-by: Pawel Filipczak <[email protected]> Co-authored-by: Brandon Morelli <[email protected]>
- Loading branch information