This page includes notes related to .


NewRelic Built-in Attributes

traceId

Use traceId, which is a NewRelic provided field to track transaction calls made through various NewRelic apps.  This can be used further when  lands Distributed Tracing

SELECT appName, name, traceId from Transaction WHERE traceId = '7f695092a81bf3ad'

NewRelic Custom Attributes

oauth_*

See documentation for the oauth_* custom attributes documented on the Custom Attributes in New Relic page.

Additionally, you can see some of these attributes in use on the Authentication Dashboard in NewRelic Insights.

You can also find these attributess using the Data Explorer

Here is an example query using multiple attributes:

SELECT oauth_adapter, request_client_name, appName from Transaction where oauth_adapter = 'dot' and request_client_name is not null SINCE 1 week ago

request_auth_type

Actual values seen in Production:

SELECT uniques(request_auth_type) from Transaction SINCE 5 hours ago

request_user_agent

NewRelic has its own "request.headers.userAgent" field.  At this time, it seems that some transactions have a value for "request_user_agent", and others for "request.headers.userAgent", but not both.  This is true even for Python user agents.

SELECT request_user_agent, `request.headers.userAgent` from Transaction WHERE request_user_agent != `request.headers.userAgent` AND (request_user_agent is NOT NULL OR `request.headers.userAgent` IS NOT NULL)

request_client_name

The request_client_name is taken from the user agent string for calls made using edx-rest-api-client v1.8.2+.

Note that this will often return an app (such as prod-edx-ecommerce) but will default back to the hostname of the machine.

SELECT request_client_name FROM Transaction WHERE request_client_name IS NOT NULL AND request_client_name !='unknown_client_name'

request_referer

Seems to be working as expected.  Only appears on certain transactions.

SELECT request_referer from Transaction WHERE request_referer is not null

Update IDAs and NewRelic Applications

NewRelic Applications (RequestMetricsMiddleware)

NewRelic Applications (Workers)

NewRelic Applications (Skipped)

Additional edx-rest-api-client Upgrades Possible

We need to determine when and if to update each of these.  It is moot if the user agent string isn't being updated correctly.

IDA Updates Completed

For working with all IDAs, see  for a list of IDAs and example PRs.