Heroku 🔗
The Splunk OpenTelemetry Connector for Heroku is a buildpack for the Splunk Distribution of OpenTelemetry Collector. The buildpack installs and runs the Splunk OpenTelemetry Connector on a Dyno to receive, process and export metric and trace data for Splunk Observability Cloud:
Splunk APM through the
sapm
exporter. Theotlphttp
exporter can be used with a custom configuration.Splunk Infrastructure Monitoring through the
signalfx
exporter.
To learn more about the Splunk Distribution of OpenTelemetry Collector, see Install and configure the Splunk Distribution of OpenTelemetry Collector
Installation 🔗
Prerequisites 🔗
Before you can install the Heroku buildpack to collect metrics, you need to have a Heroku app. To learn how to install the Heroku CLI and create an app, see the Heroku documentation for developers.
Installation steps 🔗
Follow these steps to collect metrics with the Heroku buildpack for the Splunk Distribution of OpenTelemetry Collector:
In the command-line interface, navigate to the Heroku project directory.
cd <HEROKU_APP_DIRECTORY>
Note: Running
heroku
command outside of project directories results in unexpected behavior.Configure the Heroku app to expose Dyno metadata, which is required by Splunk OpenTelemetry Connector to set global dimensions such as
app_name
,app_id
anddyno_id
. See here for more information.heroku labs:enable runtime-dyno-metadata
Run both of the following commands together to add the Heroku buildpack.
heroku buildpacks:add https://github.com/signalfx/splunk-otel-collector-heroku.git#\ $(curl -s https://api.github.com/repos/signalfx/splunk-otel-collector-heroku/releases | grep '"tag_name"' | head -n 1 | cut -d'"' -f4)
Note: If you want to use an explict version number for production environment, replace the first command with the following command:
heroku buildpacks:add https://github.com/signalfx/splunk-otel-collector-heroku.git#<TAG_NAME>
Set the required environment variables.
heroku config:set SPLUNK_ACCESS_TOKEN=<YOUR_ACCESS_TOKEN> heroku config:set SPLUNK_REALM=<YOUR_REALM>
(Optional) Define custom configuration file in your Heroku project directory.
heroku config:set SPLUNK_CONFIG=/app/mydir/myconfig.yaml
To add the buildpack to an existing project, you must create an empty commit before deploying the app.
git commit --allow-empty -m "empty commit"
Run the following command to deploy the app.
git push heroku main
Run the following command to check the logs.
heroku logs -a <app-name> --tail
Configuration 🔗
Use the following environment variables to configure the Heroku buildpack.
Environment Variable |
Required |
Default |
Description |
---|---|---|---|
|
Yes |
||
|
Yes |
||
|
No |
|
The Splunk API base URL. |
|
No |
|
The configuration to use. |
|
No |
|
The Splunk Infrastructure Monitoring base URL. |
|
No |
|
Specify location of agent logs. If not specified, logs will go to stdout. |
|
No |
|
Total available memory to agent. |
|
No |
|
Version of Splunk OTel Connector to use. Defaults to latest. |
|
No |
|
The Splunk APM base URL. |
Troubleshooting 🔗
If you are not able to see your data in Splunk Observability Cloud, try these tips:
Submit a case in the Splunk Support Portal
Available to Splunk Observability Cloud customers
-
Available to Splunk Observability Cloud customers
Ask a question and get answers through community support at Splunk Answers
Available to Splunk Observability Cloud customers and free trial users
Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide
Available to Splunk Observability Cloud customers and free trial users
To learn how to join, see Get Started with Splunk Community - Chat groups
To learn about even more support options, see Splunk Customer Success.