diff --git a/prod/native/extension/code/ModuleFunctions.cpp b/prod/native/extension/code/ModuleFunctions.cpp index a6d6245..7925216 100644 --- a/prod/native/extension/code/ModuleFunctions.cpp +++ b/prod/native/extension/code/ModuleFunctions.cpp @@ -277,13 +277,13 @@ PHP_FUNCTION(enqueue) { EAPM_GL(httpTransportAsync_)->enqueue(ZSTR_HASH(endpoint), std::span(reinterpret_cast(ZSTR_VAL(payload)), ZSTR_LEN(payload))); } -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(elastic_otel_force_set_object_propety_value_arginfo, 0, 3, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(elastic_otel_force_set_object_property_value_arginfo, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_ARG_TYPE_INFO(0, property_name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0) ZEND_END_ARG_INFO() -PHP_FUNCTION(force_set_object_propety_value) { +PHP_FUNCTION(force_set_object_property_value) { zend_object *object = nullptr; zend_string *property_name = nullptr; zval *value = nullptr; @@ -307,9 +307,9 @@ const zend_function_entry elastic_otel_functions[] = { 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_FE( "Elastic\\Otel\\HttpTransport", initialize, ArgInfoInitialize) - ZEND_NS_FE( "Elastic\\Otel\\HttpTransport", enqueue, elastic_otel_no_paramters_arginfo) - ZEND_NS_FE( "Elastic\\Otel\\InferredSpans", force_set_object_propety_value, elastic_otel_force_set_object_propety_value_arginfo) + ZEND_NS_FE( "Elastic\\OTel\\HttpTransport", initialize, ArgInfoInitialize) + ZEND_NS_FE( "Elastic\\OTel\\HttpTransport", enqueue, elastic_otel_no_paramters_arginfo) + ZEND_NS_FE( "Elastic\\OTel\\InferredSpans", force_set_object_property_value, elastic_otel_force_set_object_property_value_arginfo) PHP_FE_END }; diff --git a/prod/php/ElasticOTel/InferredSpans/InferredSpans.php b/prod/php/ElasticOTel/InferredSpans/InferredSpans.php index 56fcc09..620acf6 100644 --- a/prod/php/ElasticOTel/InferredSpans/InferredSpans.php +++ b/prod/php/ElasticOTel/InferredSpans/InferredSpans.php @@ -90,7 +90,6 @@ public function captureStackTrace(int $durationMs, bool $topFrameIsInternalFunct array_splice($stackTrace, 0, InferredSpans::FRAMES_TO_SKIP); // skip PhpFacade/Inferred spans logic frames $apmFramesFilteredOutCount = $this->filterOutAPMFrames($stackTrace); - $apmFramesFilteredOutCount = null; $this->compareStackTraces($stackTrace, $durationMs, $topFrameIsInternalFunction, $apmFramesFilteredOutCount); } catch (\Throwable $throwable) { @@ -229,7 +228,6 @@ private function getHowManyStackFramesAreIdenticalFromStackBottom(array $stackTr $count = min($stackTraceCount, $lastStackTraceCount); - $index = 0; for ($index = 1; $index <= $count; $index++) { $stFrame = &$stackTrace[$stackTraceCount - $index]; $lastStFrame = &$this->lastStackTrace[$lastStackTraceCount - $index]; @@ -279,7 +277,7 @@ private function shouldReduceFrame(int $index, int $oldFramesCount, int &$previo /** @noinspection PhpFullyQualifiedNameUsageInspection, PhpUndefinedFunctionInspection * @phpstan-ignore function.notFound */ - $forceParentChangeFailed = !force_set_object_propety_value($span, "parentSpanContext", $lastSpanParent); + $forceParentChangeFailed = !force_set_object_property_value($span, "parentSpanContext", $lastSpanParent); } }