Provides instrumentation of both the client and server sides of Ktor. This includes support for distributed tracing between the client and the server.
It is recommended to also use the instrumentation for Kotlin Coroutines: https://github.com/newrelic/newrelic-java-kotlin-coroutines
This use this instrumentation.
- Download the latest release.
- In the New Relic Java Agent directory (directory containing newrelic.jar), create a directory named extensions if it doe not already exist.
- Copy the jars into the extensions directory.
- Restart the application.
After deployment, you should get route names for your web transactions instead of the generic name provided by the agent.
You should also see deeper visibiity into what is happening in your application via the enhanced transaction traces/distributed traces provided by this instrumentation.
Ktor intiates a long running lazy Coroutine that will dominate the transaction times for your application unless it is ignored. Please use this version or later (https://github.com/newrelic/newrelic-java-kotlin-coroutines/releases/tag/v1.0.4) to enable this feature and add io.ktor.server.netty.cio.RequestBodyHandler to the scopes elemeent in the Coroutines stanza in newrelic.yml as shown here: https://github.com/newrelic/newrelic-java-kotlin-coroutines?tab=readme-ov-file#configuring-scopes-to-ignore
New Relic has open-sourced this project. This project is provided AS-IS WITHOUT WARRANTY OR DEDICATED SUPPORT. Issues and contributions should be reported to the project here on GitHub.
We encourage you to bring your experiences and questions to the Explorers Hub where our community members collaborate on solutions and new ideas.
We encourage your contributions to improve Salesforce Commerce Cloud for New Relic Browser! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at opensource@newrelic.com.
A note about vulnerabilities
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.
New Relic Java Instrumentation for Ktor is licensed under the Apache 2.0 License.
[If applicable: [Project Name] also uses source code from third-party libraries. You can find full details on which libraries are used and the terms under which they are licensed in the third-party notices document.]