1

We have an Azure PaaS environment for Sitecore 9.3 and Solr App services created. Is there any way to connect Application Insights for the Solr App service? For CM and CD services we have setup the application insights by providing the instrumentation key on the connection string. For Solr, how should we do that? Please help!

0
4

Since Solr is a Java application, you can instrument it using the Application Insights Java Agent, following these steps:

  1. Download the Application Insights Java agent from the official GitHub repository releases page.

  2. Copy the downloaded agent on the Azure VM where your Solr instance is hosted.

  3. Add the -javaagent to your Solr application's JVM arguments, editing the solr.in.cmd file in your solr\bin folder and adding the following solr options definition:

set SOLR_OPTS=%SOLR_OPTS% -javaagent:"path\to\applicationinsights-agent-3.0.2.jar"
  1. If Solr is configured with its own certificate keystore, you will need to import the SSL certificate of the Azure services that the agent sends telemetry data to, using the keytool Java tool. Instructions to import an SSL certificate in a keystore are described in the agent troubleshooting guide here. If this step is not correctly executed, you will see errors logged by the agent in the applicationinsights.log file (generated in the same folder location where the Java agent is hosted), with the description Unable to find valid certification path to requested target. There are two services that the agent uses:

  2. Restart the Solr service.

If the Application Insights Java agent runs successfully, you should have only an INFO record in the applicationinsights.log file confirming that the agent started successfully and no error recorded:

INFO  c.m.applicationinsights.agent - ApplicationInsights Java Agent 3.0.2 started successfully

In your Application Insights instance, you should see Solr logs collected in traces and Solr service requests collected in requests: enter image description here

Additional official Microsoft documentation about the Application Insights codeless Java application instrumentation can be found here.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.