Migrate from the Splunk instrumentation for C++ to the OpenTelemetry instrumentation for C++
Learn how to migrate from the deprecated Splunk C++ agent to the upstream OpenTelemetry Collector.
The upstream OpenTelemetry instrumentation for C++ replaces the Splunk instrumentation for C++. The Splunk instrumentation for C++ is deprecated as of March 15, 2024 and will reach end of support on September 15, 2025.
Follow these steps to migrate from the Splunk instrumentation to the OpenTelemetry instrumentation.
Compatibility and requirements
Make sure that you have the correct requirements for the OpenTelemetry C++ instrumentation. See Prerequisities.
Migrate to the OpenTelemetry instrumentation for C++
To migrate from the Splunk instrumentation for C++ to the OpenTelemetry instrumentation for C++, follow these steps:
-
Deactivate the Splunk instrumentation for C++.
-
Install and activate the OpenTelemetry instrumentation for C++. See Instrument your C++ application for Splunk Observability Cloud.
-
Update your configuration settings.
-
Restart the server and application.
Deactivate the Splunk instrumentation for C++
Because the Splunk instrumentation for C++ is a wrapper for the OpenTelemetry instrumentation, there isn’t an official process for uninstalling.
Instead, you can remove the Splunk Distribution of OpenTelemetry C++ repository and its submodules. When you install and configure your application for OpenTelemetry C++, remove any code that uses the Splunk distribution and replace it with new code for OpenTelemetry C++ instrumentation.
Change configuration settings
Options passed through splunk::OpenTelemetryOptions
are no longer supported.
If you passed any options through splunk::OpenTelemetryOptions
, change these options to environment variables.
For example, imagine you had the following option in your C++ code:
splunk::OpenTelemetryOptions options = splunk::OpenTelemetryOptions().WithServiceName("my-service")
To change the option to an environment variable, delete the code and run the following command:
export OTEL_SERVICE_NAME="my-service"