• /
  • Log in
  • Free account

setInteractionName (Android SDK API)


NewRelic.setInteractionName(string $interactionName)

Set a new name for an interaction that is already being tracked by New Relic.


Compatible with all agent versions.


Use setInteractionName() to change the name of an interaction in an instrumented app.

For example, you have an interaction that is being reported under a single activity name, like FragmentActivity, or under an obfuscated name, like baseclass.a, and you want to rename the interaction to be more descriptive,. You could use setInteractionName at the beginning of each onCreate() method to change the name.

To create a new interaction, see startInteraction().

For general info on using this API, see the Android SDK API usage guide.






Required. The name you want to give to the interaction.


Name an interaction

This example uses NewRelic.setInteractionName() at the beginning of the onCreate() method as part of the Activity class.

public class MainActivity extends Activity {
protected void onCreate(Bundle savedInstanceState) {
//Rename the in-flight interaction
NewRelic.setInteractionName("Display MyCustomInteraction");
// ... continue methods ...

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.