Closed Bug 1354484 Opened 7 years ago Closed 7 years ago

Annotate New Relic transactions with request User Agent

Categories

(Tree Management :: Treeherder: Infrastructure, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

Earlier I was trying to track down which tool is making requests to the deprecated ArtifactViewSet.list() endpoint (which has only returned HTTP 405s for some time), however was unable to do so, since the User Agent isn't visible in Insights (even though it appears in the errors panel and slow transactions view).

I previously reported this to New Relic (https://support.newrelic.com/tickets/172627/edit), who said they've entered a feature request, but for now if we want the user agent there, we'll have to add it as a custom attribute, to make it report for all requests and not just slow/failing ones.
Commits pushed to master at https://github.com/mozilla/treeherder

https://github.com/mozilla/treeherder/commit/80492905ba46f5815572f862f8d83e6f82508936
Bug 1354484 - Rename whitenoise_custom.py to middleware.py

Since we're about to add more Treeherder-specific middleware. Also moves
it outside of `config/` to a more usual location for Django projects.

https://github.com/mozilla/treeherder/commit/a88108fa195addc33871a983223ff50873ffc16e
Bug 1354484 - Report request User Agent to New Relic

This is required since the New Relic Python agent only submits the User
Agent to APM (which only handles certain transactions) and not also to
Insights:
https://support.newrelic.com/tickets/172627

The attributes of requests are documented here:
https://docs.djangoproject.com/en/1.10/ref/request-response/#django.http.HttpRequest.META
Confirmed working:
https://insights.newrelic.com/accounts/677903/explorer/events?eventType=Transaction&duration=604800000&facet=user_agent
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: