Syntax
NewRelic.setInteractionName(string $interactionName)
Set a new name for an interaction that is already being tracked by New Relic.
Requirements
Compatible with all agent versions.
Description
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.
Parameters
Parameter | Description |
---|---|
string | Required. The name you want to give to the interaction. |
Examples
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 {
@Override protected void onCreate(Bundle savedInstanceState) {
//Rename the in-flight interaction NewRelic.setInteractionName("Display MyCustomInteraction"); }
// ... continue methods ...
}
その他のヘルプ
さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:
- Explorers Hubでは、コミュニティからのサポートを受けたり、ディスカッションに参加したりすることができます。
- 当社サイトで答えを見つけて、サポートポータルの使用方法を確認してください。
- Linux、Windows、およびmacOS向けトラブルシューティングツールであるNew Relic Diagnosticsを実行してください。
- New Relicの とandドキュメント をご確認ください。