LogRocket offers two-way integrations with Splunk.
With our Splunk integration, you can jump directly from an issue in a network request on the frontend into your backend traces to help you uncover the root of an issue faster.
Visit the "Settings" page in LogRocket and click "Integrations". Scroll down to find the Splunk card and follow the instructions in-app to enable this integration.
Once enabled, you will see a link to Splunk from within a network request in LogRocket:
This links you to a list of relevant logs within Splunk, with search parameters matching the timeframe of the selected network request. You must be logged into Splunk to view the list.
In order to help you arrive more quickly at the relevant logs within Splunk, you can also choose to add custom parameters to your search query based on the network request.
The parameters you can select from are as follows:
|The full requested URL
|The HTTP method of the request
|The request's referrer
|The full value of a request header (if present). E.g., to retrieve the value of the accept header, specify request.header.accept
|The HTTP status of the response
|The full value of a response header (if present). Behavior is identical to request headers above.
|The MIME type of the resource.
|The entity or element that triggered this request
You can enter these within the Settings page for the integration.
If a particular variable is not available for a specific request, it will be ignored when constructing the Splunk query.
In addition to jumping from LogRocket into Splunk, you can also go from your Splunk traces to a specific LogRocket session. Add the LogRocket session URL in a header to your API calls to backends which have Splunk set up:
recordingURL = sessionURL;
// example API call
// other headers
Splunk has a number of backend SDKs as well as a comprehensive REST API which all of them use. These SDKs will record the above header, allowing you to view the LogRocket URL for any tracked API call.
Updated almost 4 years ago