root: implement APM support

This commit is contained in:
Jens Langhammer
2020-07-07 17:43:10 +02:00
parent b048a1fb4f
commit 9021bbd5de
6 changed files with 61 additions and 1 deletions

View File

@ -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(