Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add newrelic tracing #439

Merged
merged 4 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Please See the `releases tab <https://github.com/openedx/xblock-lti-consumer/rel

Unreleased
~~~~~~~~~~
9.8.2 - 2024-01-19
------------------
* Add NewRelic traces to functions suspected of causing performance issues.

9.8.1 - 2023-11-17
------------------
Expand Down
2 changes: 1 addition & 1 deletion lti_consumer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
from .apps import LTIConsumerApp
from .lti_xblock import LtiConsumerXBlock

__version__ = '9.8.1'
__version__ = '9.8.2'
2 changes: 2 additions & 0 deletions lti_consumer/lti_1p3/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from urllib.parse import urlencode
import uuid

from edx_django_utils.monitoring import function_trace
from django.conf import settings

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

return list(lti_user_roles)

@function_trace('lti_consumer.lti_1p3.consumer.prepare_preflight_url')
def prepare_preflight_url(
self,
launch_data,
Expand Down
3 changes: 3 additions & 0 deletions lti_consumer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from config_models.models import ConfigurationModel
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _
from edx_django_utils.monitoring import function_trace
from lti_consumer.filters import get_external_config_from_filter

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

@function_trace('lti_consumer.models.LtiConfiguration.sync_configurations')
def sync_configurations(self):
"""Syncronize main/children configurations.

Expand Down Expand Up @@ -611,6 +613,7 @@ def _get_lti_1p3_consumer(self):

return consumer

@function_trace('lti_consumer.models.LtiConfiguration.get_lti_consumer')
def get_lti_consumer(self):
"""
Returns an instanced class of LTI 1.1 or 1.3 consumer.
Expand Down
Loading