• /
  • ログイン
  • 無料アカウント

Scala instrumentation

The New Relic Java agent is compatible with Scala, and supports New Relic API calls, annotations, and custom instrumentation. All information below is supplemental to New Relic's Java agent installation directions.

ヒント

For Heroku, see Java agent with Scala on Heroku.

If your framework is not natively supported by New Relic, or if you want to set up additional monitoring, custom instrumentation is a great way to dig deeper into your application.

Instrument Scala with the Java agent API

Instrument Scala to use the New Relic API class or annotations.

  1. Add the following information to your Scala configuration file:

  2. Import the NewRelic class and use it in your application:

    import com.newrelic.api.agent.NewRelic
    ...
    NewRelic.setTransactionName(null, "/myTransaction");

More API functions

For more about the Java agent API and its functionality, see the Java agent API introduction.

Additional instrumentation

If you use Kamon, take a look at the New Relic Kamon reporter.

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.