root: implement APM support
This commit is contained in:
@ -4,6 +4,7 @@ from multiprocessing.connection import Connection
|
||||
from typing import Optional
|
||||
|
||||
from django.core.cache import cache
|
||||
from elasticapm import capture_span
|
||||
from structlog import get_logger
|
||||
|
||||
from passbook.policies.exceptions import PolicyException
|
||||
@ -44,6 +45,7 @@ class PolicyProcess(Process):
|
||||
if connection:
|
||||
self.connection = connection
|
||||
|
||||
@capture_span(name="PolicyEngine", span_type="policy.process.execute")
|
||||
def execute(self) -> PolicyResult:
|
||||
"""Run actual policy, returns result"""
|
||||
LOGGER.debug(
|
||||
|
||||
Reference in New Issue
Block a user