Skip to content

Commit fdfbe5b

Browse files
authored
feat: add newrelic tracing (#439)
1 parent 44d0126 commit fdfbe5b

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

CHANGELOG.rst

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Please See the `releases tab <https://github.com/openedx/xblock-lti-consumer/rel
1515

1616
Unreleased
1717
~~~~~~~~~~
18+
9.8.2 - 2024-01-19
19+
------------------
20+
* Add NewRelic traces to functions suspected of causing performance issues.
1821

1922
9.8.1 - 2023-11-17
2023
------------------

lti_consumer/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .apps import LTIConsumerApp
55
from .lti_xblock import LtiConsumerXBlock
66

7-
__version__ = '9.8.1'
7+
__version__ = '9.8.2'

lti_consumer/lti_1p3/consumer.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from urllib.parse import urlencode
66
import uuid
77

8+
from edx_django_utils.monitoring import function_trace
89
from django.conf import settings
910

1011
from lti_consumer.lti_1p3.exceptions import InvalidClaimValue
@@ -103,6 +104,7 @@ def _get_user_roles(role):
103104

104105
return list(lti_user_roles)
105106

107+
@function_trace('lti_consumer.lti_1p3.consumer.prepare_preflight_url')
106108
def prepare_preflight_url(
107109
self,
108110
launch_data,

lti_consumer/models.py

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from config_models.models import ConfigurationModel
1818
from django.utils.functional import cached_property
1919
from django.utils.translation import gettext_lazy as _
20+
from edx_django_utils.monitoring import function_trace
2021
from lti_consumer.filters import get_external_config_from_filter
2122

2223
# LTI 1.1
@@ -280,6 +281,7 @@ def clean(self):
280281
if consumer is None:
281282
raise ValidationError(_("Invalid LTI configuration."))
282283

284+
@function_trace('lti_consumer.models.LtiConfiguration.sync_configurations')
283285
def sync_configurations(self):
284286
"""Syncronize main/children configurations.
285287
@@ -611,6 +613,7 @@ def _get_lti_1p3_consumer(self):
611613

612614
return consumer
613615

616+
@function_trace('lti_consumer.models.LtiConfiguration.get_lti_consumer')
614617
def get_lti_consumer(self):
615618
"""
616619
Returns an instanced class of LTI 1.1 or 1.3 consumer.

0 commit comments

Comments
 (0)