root: implement APM support
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
import re
|
||||
from textwrap import indent
|
||||
from typing import Any, Dict, Iterable, Optional
|
||||
from elasticapm import capture_span
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from requests import Session
|
||||
@ -68,6 +69,7 @@ class BaseEvaluator:
|
||||
full_expression += f"\nresult = handler({handler_signature})"
|
||||
return full_expression
|
||||
|
||||
@capture_span(name="BaseEvaluator", span_type="lib.evaluator.evaluate")
|
||||
def evaluate(self, expression_source: str) -> Any:
|
||||
"""Parse and evaluate expression. If the syntax is incorrect, a SyntaxError is raised.
|
||||
If any exception is raised during execution, it is raised.
|
||||
|
Reference in New Issue
Block a user