-
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
Fix telemetry for asset-serving middleware in edxapp #618
Comments
@timmc-edx: I moved this to the Future epic, because I think this is probably a lower priority than wrapping up other migration work. Does that sound right? |
Yes, that sounds right. I do have a PR for this (openedx/edx-platform#34703) but it can wait. |
Suggestion from Datadog support as to how we could patch into the middleware and get this functionality:
|
Updates:
|
@timmc-edx: Is this ticket done? If not, can you clarify what is needed? Thanks. |
Yes, I think it's done -- based on the timestamps, I suspect I filed this issue originally as "here is the problem" (agnostic of solution) and then later filed the edx-platform issue as "implement this solution". Now that we've got a solution, we can close this problem-tracking issue. |
It turns out we don't handle requests like
/asset-v1:...
in a Django view, but rather in the StaticContentServer middleware. This is very weird, and it messes with our telemetry—Django's resolver can't match this to a view, so the request is treated as a 404 right up until StaticContentServer "rescues" the request and provides a 200 response (or a 404, 304, etc. as the case may be.)New Relic handles this OK because it detects that this middleware is what produced the response. But Datadog relies entirely on the Django resolver and calls the resource a
GET 404
even when the response is a 200:(Frankly, the asset server should probably just be changed to a view. We'll need to find out why it was done this way.)
The text was updated successfully, but these errors were encountered: