Configuring profiling
You can configure Instana AutoProfile™ on Java, Node.js, Go, Python, Ruby, .NET Core, and PHP applications. See the following sections to learn how to configure AutoProfile.
Configuring on Java
Supported JVMs
AutoProfile is currently supported on Java Virtual Machines (JVM) that are based on HotSpot and OpenJ9.
See the following list for all the supported HotSpot-based distributions with JVM versions 1.8.152
and later:
- AdoptOpenJDK HotSpot
- Amazon Corretto
- Azul Zulu
- Eclipse Temurin
- OpenJDK
- Oracle HotSpot
- Sun HotSpot
See the following list for all the supported OpenJ9-based JVMs with versions 0.29.0
and later:
- IBM Semeru
Currently, AutoProfile is only supported on x86_64-bit Linux (glibc-based and musl-based OS).
Configuring AutoProfile
To enable AutoProfile™, add the following settings to the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml
:
com.instana.plugin.profiling.java:
enabled: true
Additional configuration options
The following table provides additional configuration options for AutoProfile:
Parameter | Description |
---|---|
cpu-sampler-enabled |
When set to true , enables CPU profiles. |
contention-sampler-enabled |
When set to true , enables contention profiles. |
Troubleshooting AutoProfile on Java
Problem: You might notice the error Cannot load JVM TI agent library: /tmp/libprofsensor-X.X.X-linux-x64-28c63c.so: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
.
Solution: For JVMs running in Apline images, the profiler expects musl
libc
to be available. In such cases, where glibc
is also installed for compatibility reasons, make sure the path
to the musl
versions of the libraries is not overwritten or broken.
Configuring on Node.js
To enable AutoProfile, set the environment variable INSTANA_AUTO_PROFILE=true
or add autoProfile: true
option when initializing the collector. See the following example:
require('@instana/collector')({
autoProfile: true
});
This feature requires @instana/collector@1.98.1
or later and at least Node.js 6.4.0.
For more information, see Node.js Collector Configuration.
Configuring on Go
To enable AutoProfile, add EnableAutoProfile: true
option to instana.InitSensor(opt)
, or set the environment variable INSTANA_AUTO_PROFILE=true
for github.com/instana/go-sensor@1.13.2
and above.
This feature requires Instana sensor to be activated inside the application code. For more information on how to activate the Instana sensor for AutoProfile, see Instana AutoProfile.
For more information, see Go Collector Configuration.
Configuring on Python
To enable AutoProfile, set the environment variable INSTANA_AUTOPROFILE=true
.
This feature requires the Instana Python sensor to be activated inside the app code. For more information on how to activate the Instana sensor for AutoProfile,, see Manual Installation.
For more information, see Python Configuration.
Configuring on Ruby
To enable AutoProfile™, add the following settings to the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml
:
com.instana.plugin.rubyprofile:
enabled: true
You can also enable AutoProfile™ by setting the environment variable INSTANA_AUTO_PROFILE
to true
.
For more information, see AutoProfile.
Configuring on .NET Core
For .NET users, AutoProfile is available only for .NET Core applications that run on Linux. For more information, see Monitoring .NET Core on Linux.
To enable AutoProfile™, add the following settings to the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml
:
com.instana.plugin.netcore:
profiling:
enabled: true
Configuring on PHP
For PHP users, AutoProfile is available only for applications that run on Linux. For more information, see Profiling PHP.
To enable AutoProfile™, set the environment variable INSTANA_AUTO_PROFILE=true
or add the following settings to the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml
:
com.instana.plugin.php:
profiling:
enabled: true