stop calling spans scopes

This commit is contained in:
Andrew Dolgov
2023-10-20 22:39:41 +03:00
parent bf6e3c381b
commit d3fadc0bd0
13 changed files with 187 additions and 167 deletions

View File

@@ -63,8 +63,8 @@ class Sanitizer {
* @return false|string The HTML, or false if an error occurred.
*/
public static function sanitize(string $str, ?bool $force_remove_images = false, int $owner = null, string $site_url = null, array $highlight_words = null, int $article_id = null) {
$scope = OpenTelemetry\API\Trace\Span::getCurrent();
$scope->addEvent("Sanitizer::sanitize");
$span = OpenTelemetry\API\Trace\Span::getCurrent();
$span->addEvent("Sanitizer::sanitize");
if (!$owner && isset($_SESSION["uid"]))
$owner = $_SESSION["uid"];