application

For general information on how the Python agent API calls relate to each other, see the API guide.

newrelic.agent.application(name=None)
Returns object corresponding to a New Relic-monitored app; required by some Python agent API calls.

Description

This call returns an object corresponding to a New Relic-monitored application. If no name value is set, the name set via the Python agent configuration is used.

The returned application object does not present any public API, but is required by some other API calls.

This call only returns the application object. It won't attempt to register the application with the data collector if this has not already occurred.

Parameters

Parameter Description

name

string

Optional. The name of the application. If set, this overrides the application name set via Python agent configuration.

Return value(s)

Returns an application object. The object itself does not present any public API, but is required by some other API calls.

Example(s)

Generate and use an application object

To generate an application object, use:

newrelic.agent.application(name=None) 

Some other Python agent API calls take the application object as a parameter. For an example, see the record_exception call.

For more help

Recommendations for learning more: