-
Notifications
You must be signed in to change notification settings - Fork 3
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
[APM][Tags] Configure Datadog request resource names #620
Comments
timmc-edx
added a commit
to openedx-unsupported/configuration
that referenced
this issue
May 3, 2024
This switches us from method+urlpattern resource naming (e.g. `GET ^/`) to using handler (e.g. `lms.djangoapps.branding.views.index`). This is applied to the root span as the `resource_name` tag. As method and urlpattern are available on the root span as `http.method` and `http.route` but there doesn't seem to be any other way to get the handler info, this is our only option for ensuring that the handler will be available as a tag (without having to parse after the fact or write more custom code.) Part of edx/edx-arch-experiments#620
4 tasks
timmc-edx
added a commit
to openedx-unsupported/configuration
that referenced
this issue
May 3, 2024
This switches us from method+urlpattern resource naming (e.g. `GET ^/`) to using handler (e.g. `lms.djangoapps.branding.views.index`). This is applied to the root span as the `resource_name` tag. As method and urlpattern are available on the root span as `http.method` and `http.route` but there doesn't seem to be any other way to get the handler info, this is our only option for ensuring that the handler will be available as a tag (without having to parse after the fact or write more custom code.) Part of edx/edx-arch-experiments#620
timmc-edx
added a commit
to openedx-unsupported/configuration
that referenced
this issue
May 6, 2024
This switches us from method+urlpattern resource naming (e.g. `GET ^/`) to using handler (e.g. `lms.djangoapps.branding.views.index`). This is applied to the root span as the `resource_name` tag. As method and urlpattern are available on the root span as `http.method` and `http.route` but there doesn't seem to be any other way to get the handler info, this is our only option for ensuring that the handler will be available as a tag (without having to parse after the fact or write more custom code.) Part of edx/edx-arch-experiments#620
We'll use the spreadsheet to ensure deployments happen. |
timmc-edx
changed the title
Configure Datadog request resource names
[APM][Tags] Configure Datadog request resource names
May 15, 2024
timmc-edx
added a commit
to edx/configuration
that referenced
this issue
May 16, 2024
Replaces all instances of `DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT` with `DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT`. Now resource names will be prefixed with the HTTP method, like `GET lms.djangoapps.branding.views.index`. This is not ideal and loses us some precision in the resource name but gives us something more readable, writable, and pronounceable. See edx/edx-arch-experiments#620 for more background.
3 tasks
timmc-edx
added a commit
to edx/configuration
that referenced
this issue
May 20, 2024
Replaces all instances of `DD_DJANGO_USE_LEGACY_RESOURCE_FORMAT` with `DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT`. Now resource names will be prefixed with the HTTP method, like `GET lms.djangoapps.branding.views.index`. This is not ideal and loses us some precision in the resource name but gives us something more readable, writable, and pronounceable. See edx/edx-arch-experiments#620 for more background.
Verified in edxapp-lms and demographics in stage. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to settle on a
resource_name
format for Python APM. This has implications for trace metrics, browsing the UI, and monitoring.As of 2024-05-15 we're using a handler-only format but we need to make a final decision.
A/C:
Resources
This is applied to the root span as the
resource_name
tag. HTTP method and urlpattern are also available on the root span as custom span tagshttp.method
andhttp.route
but there doesn't seem to be any other way to get the handler info.Pros and cons
^/
(for the home page) or really nasty like^courses/(?P<course_id>[^/+]+(/|\+)[^/+]+(/|\+)[^/?]+)/xblock/(?P<usage_id>(?:i4x://?[^/]+/[^/]+/[^/]+/[^@]+(?:@[^/]+)?)|(?:[^/]+))/handler/(?P<handler>[^/]*)(?:/(?P<suffix>.*))?$
(xblock_handler).DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
orDD_DJANGO_USE_LEGACY_RESOURCE_FORMAT=true
respectively.lms.djangoapps.branding.views.index
(the view functionindex
in the modulelms.djangoapps.branding.views
) or to a class, e.g.enterprise.api.v1.views.enterprise_customer:EnterpriseCustomerViewSet
.EnterpriseCustomerViewSet
haslist
,retrieve
,dashboard_list
,enroll_learners_in_courses
,basic_list
,toggle_universal_link
, andpartial_update
. These can generally be distinguished by method + urlpattern, but not by handler class alone.WebTransaction/Function/enterprise.api.v1.views.enterprise_customer:EnterpriseCustomerViewSet.enroll_learners_in_courses
Decision
DD_DJANGO_USE_HANDLER_RESOURCE_FORMAT=true
resource name format (method + handler):read
,create
,delete
, etc. It does not help when the view functions are distinct operations such asretirement_queue
andcleanup
.@http.route
,@django.view
, and similar tags) to be more specific than the resource name. They will have less granularity in the built-in dashboards and in certain other features.The text was updated successfully, but these errors were encountered: