vuApp360 Deployment & Configuration
vuSmartMaps Configuration: Enabling Distributed Traces Telemetry
Traces O11ySource collects Distributed Traces telemetry from applications to provide comprehensive observability, offering deep insights into application performance through standard applications performance monitoring dashboards.
Enabling Traces O11ySource
-
Navigate to O11ySources:
- vuSmartMaps O11ySources can be accessed by navigating from the left navigation menu (Integrations > O11ySources).
-
Locate Traces O11ySource on the landing page.

- Enable Traces O11ySources:
- Click the Enable button to activate Traces O11ySource.


Configuring Data Sources
To add and configure a Traces data source:
- Go to the Sources tab inside the Traces O11ySource. Click Source (top-right) → Configure New.

- This opens the Configure New Data Source(s) wizard, which includes:
Step 1: Add Data Source
In this step, you provide the basic details required for configuring Traces.

Fill in the following fields:
- Application Group: Enter the name of the application group to which this service belongs.
- SSL Required: Select Yes to enable TLS for secure communication, or No if TLS is not required.
- Attributes to be used as Additional Dimensions (Optional): Specify trace attributes that should be used as additional dimensions while calculating metrics.
- Separate multiple attributes using commas (for example:
attribute1, attribute2). - For HTTP request headers, use the format:
http.request.header.<attribute_name> - For HTTP response headers, use the format:
http.response.header.<attribute_name> - For other attributes, use the exact field name as available in the raw trace data.
- Separate multiple attributes using commas (for example:
- Enable Tail Sampling: Select Yes to apply the tail sampling policies configured in the Settings tab to determine which traces are stored. Select No to store 100% of the collected traces.
- Application Services: Define the application and service names as they should appear in the observability UI.
- In a monolithic application, the application name and service name are usually the same.
- In a microservices architecture, a single application can include multiple services.
- Language: Select the programming language used to develop the service (Java, NodeJS, .NET, or GoLang).
- Application Name: Enter the name of the target application.
- Service Name: Enter the name of the service within the application.
- Export HTTP Header: Enable this option if HTTP headers need to be captured as part of trace data.
After entering the required details, click Proceed.
Step 2: Configuration Setup
In this step, you define how the Traces data source will be managed by the platform. The table displays the configured source with the following details:

- Host IP – The host or application identifier added in the previous step.
- Dataset – Automatically set to Traces.
- Managed by – Specifies how trace data will be collected for the source. Only management modes supported for Traces are displayed.
Management Modes
- OmniAgent Managed: Tracing is handled automatically by OmniAgent. Once the OmniAgent is discovered on the host, trace collection starts automatically. Until discovery, the source remains in a Pending state.
- Manually Managed: Tracing is managed manually using client-side instrumentation.
- Download the required instrumentation package for the selected programming language, refer Download Source section.
- Deploy and configure the instrumentation manually on the application host.
- Trace data collection starts once the instrumentation is integrated and the application is running.
- Remote Collection: Trace data is collected remotely without installing OmniAgent on the host, where supported. Data collection proceeds automatically once the configuration is applied.
After selecting the appropriate Managed by option, click Proceed to continue to the Review step.
Step 3: Review
The Review step displays the configured Traces data sources and provides guidance on how data collection will proceed based on the selected management mode.

In this view, you can:
- Review the host, dataset, and management mode for each configured source.
- Filter sources using the Managed by options (OmniAgent, Manual, Remote).
- Search for specific configurations using the search bar.
Based on the selected management mode:
- Manually Managed – Download the required client instrumentation packages from the configured Sources table and deploy them manually.
- Remote Collection – Data collection proceeds automatically without requiring agent installation.
- OmniAgent Managed – Data collection proceeds automatically once OmniAgent is discovered. Until then, the source remains in a Pending state. The OmniAgent package can be downloaded if required.
After reviewing the configuration, click Finish to complete the setup. The Traces data source will then be available in the Sources list and begin collecting data according to the selected configuration.
Download Source
If the data source uses Manually Managed mode, you must download the client instrumentation package. To download:
- Go to the Sources table.
- Click the Download icon in the Actions column.
- Select the required configuration for the chosen language.
- Click Submit.
This provides the client instrumentation package required for trace collection. Follow the instructions provided in the Client Side Traces Instrumentation section to complete the setup.
Configuring Sampling Policies
Sampling configuration allows the system to selectively decide on which traces to store. This helps in reducing the amount of data kept in the system.
There are two types of sampling policies that can be configured for traces:
- Global Policies: Apply to all types of traces coming into the system.
- Service-Specific Policies: Apply to a specific set of services.
A separate page for sampling-related configurations is introduced. These configurations are controlled from the Settings tab on the Traces O11ySource page. The Settings tab includes three sections:
- Sampling Policy
Defines policies for deciding which traces to store. Policies can use inline rules or refer to rules defined in the Sampling Rules section. - Sampling Rule
Provides a way to define individual rules that can be referred to in Sampling Policies to form compound rules. - Additional Configuration
Controls data enrichments and transformations on received traces using optional YAML configurations.

The dashboards provided in vuApp360 are designed to display pre-sampled data.
Sampling Policy
Sampling Policies configured here allow vuSmartMaps to intelligently decide on which traces to store, helping to reduce the amount of data kept in the system by selecting only important traces. This is an optional functionality. If no sampling policies are configured, vuSmartMaps will store 100% of the traces collected.
Sampling policies can use rules defined inline within them or refer to rules defined in the Sampling Rules section. Using rules from sampling rules in policies enables users to define compound policies that can refer to more than one rule. When multiple sampling policies are configured, vuSmartMaps will apply all the policies to all traces received and will take a final decision based on the following:
- The trace is dropped when there is one explicit 'Do not sample' decision based on an inverted match.
- The trace is stored when there is one 'Sample' decision.
- The trace is stored when there is one 'Sample' decision based on an inverted match and there are no 'Do not sample' decisions.
- The trace is dropped in all other cases.
To configure a new sampling policy, use the + button and provide the following details in the modal:

- Policy Name: Unique name assigned by the user.
- Scope: Specify whether the policy applies to all traces (Global) or to a specific set of services. Options include All, For These Services, For Services Except These.
- Definition Type: Choose to define the policy details inline or refer to a rule defined in the Sampling Rules Section.
- Inline: If this option is selected, the configured policy type becomes applicable:
- Policy Type: Specify the type of sampling policy. vuSmartMaps offers following seven policy types:
- Allow All: Marks all traces received to be stored.
- Data Rate: Tracks spans per second rate of traces and drops traces beyond the configured threshold.
- Spans per Second: Maximum number of spans that can be processed each second.
- Latency: Stores only those traces with latency greater than the configured threshold.
- Threshold in Milliseconds: Only traces with latency greater than the given threshold (in ms) will be allowed.
- Number Attribute: Stores only those traces with the value of the configured attribute falling within a specified range.
- Attribute: Select the attribute key to match data received from applications (e.g., HTTP Status Code).
- Minimum Value: Enter the minimum acceptable value (e.g., 400 for HTTP Status codes).
- Maximum Value: Enter the maximum acceptable value (e.g., 500 for HTTP Status codes).
- Percentage: Stores only a specified percentage of traces received, dropping the rest.
- Sampling Percentage: The percentage rate at which traces are sampled.
- Status: Stores traces with specified statuses, dropping the rest.
- Status Type: Status value for which traces will be retained. Options: Error, OK, Unset.
- String Attribute: Stores only those traces with the value of a configured attribute matching the configured condition.
- Attribute: Select the attribute key to match data received from applications (e.g., Application, Service Name, Host Name, HTTP Host, HTTP Target, HTTP Route, HTTP URL, DB Name, DB System, Messaging System, Transaction).
- Values: Enter the values to match against (e.g., health, metrics, etc.).
- Regular Expression: When 'True', the system will match the attribute values by regular expression string.
- Invert Match: When 'True', the system will reverse the match condition.
- Use Predefined Rule Sets: If this option is selected, choose one of the following policy types and select the relevant rules from the Sampling Rules section:
- AND of Multiple Rules: Build a compound rule with an AND of multiple rules defined in the Sampling Rules section.
- Rate Distribution: Allocate portions of the total allowed rate to a set of rules from the Sampling Rules Section. Traces matching each rule will be allocated a portion of the total rate allowed.
- Single Rule: Use a single rule defined in the Sampling Rules section.
Sampling Rule
Sampling rules provide a way to define individual rules that can be referred to in Sampling Policies to form compound rules. The rules defined in Sampling Rules are not used unless referred to by a policy in Sampling Policies. Using rules from Sampling Rules in policies enables users to define compound policies that can refer to more than one rule.
To configure a new sampling rule, use the + button and provide the following details in the modal:
- Rule Name: Unique name assigned by the user.
- Rule Type: Specify the type of sampling rule. vuSmartMaps offers seven predefined rule types (as explained above for inline policy types).

Additional Configuration
The Additional Configuration section can be used to control data enrichments and transformations done on traces received. Users can add optional YAML configurations. Below is an example:
transform:
trace_statements:
- context: span
statements:
- set(attributes["instrumentation_library_name"], instrumentation_scope.name)
- set(attributes["library"], attributes["db.system"])
- set(attributes["library"], attributes["messaging.system"])
- set(attributes["library"], "Express") where instrumentation_scope.name == "@opentelemetry/instrumentation-express"
- set(attributes["library"], "MongoDB") where instrumentation_scope.name == "io.opentelemetry.mongo-3.1"
- set(attributes["library"], "Go-kit") where instrumentation_scope.name == "go.opentelemetry.io/contrib/instrumentation/github.com/go-kit/kit/otelkit"
- set(attributes["library"], "RabbitMQ") where instrumentation_scope.name == "io.opentelemetry.rabbitmq-2.7"
- set(attributes["library"], "NodeJS HTTP Client / Server") where instrumentation_scope.name == "@opentelemetry/instrumentation-http"
- set(attributes["library"], "Redis") where instrumentation_scope.name == "@opentelemetry/instrumentation-redis"
- set(attributes["library"], "Spring MVC") where instrumentation_scope.name == "io.opentelemetry.spring-webmvc-3.1"
- set(attributes["library"], "Tomcat") where instrumentation_scope.name == "io.opentelemetry.tomcat-7.0"
- set(attributes["library"], "Servlet") where instrumentation_scope.name == "io.opentelemetry.servlet-3.0"
- set(attributes["library"], attributes["db.system"]) where instrumentation_scope.name == "io.opentelemetry.jdbc"
- set(attributes["library"], "Spring Data") where instrumentation_scope.name == "io.opentelemetry.spring-data-1.8"
- set(attributes["library"], "Hibernate") where instrumentation_scope.name == "io.opentelemetry.hibernate-4.0"
- set(attributes["library"], "Go HTTP Client / Server") where instrumentation_scope.name == "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
- set(attributes["library"], "Spring Scheduling") where instrumentation_scope.name == "io.opentelemetry.spring-scheduling-3.1 1.14.0-alpha"
- set(attributes["destination"], attributes["db.system"])
- set(attributes["destination"], attributes["messaging.system"])
- set(attributes["destination"], attributes["net.peer.name"])
- set(attributes["destination"], replace_match(attributes["http.url"], "https?://[^/]+/([^/]+)", "$1"))
- set(attributes["transaction"], Concat([attributes["http.method"], attributes["http.target"]], " ")) where (attributes["http.target"] != nil and attributes["http.method"] != nil and attributes["http.target"] != "")
- set(attributes["transaction"], Concat([attributes["http.method"], attributes["http.route"]], " ")) where (attributes["http.route"] != nil and attributes["http.method"] != nil and attributes["http.route"] != "")
- set(attributes["site"], "default")
This configuration enriches and transforms trace data, making it more meaningful and useful for analysis.
The Settings tab for Traces O11ySource provides a centralized location for configuring sampling policies, rules, and additional configurations. This setup simplifies the process, reduces user confusion, and enhances the ability to manage and control the data stored in the system effectively. By intelligently sampling traces, users can ensure that they are storing only the most relevant and important data, optimizing both storage and analysis capabilities.
Client Side Traces Instrumentation

- Java
- C# / .NET
- Go
- Kubernetes
- Node.js
- Python
- NGINX
Instrumentation Process
SpringBoot / jar
Steps to instrument the java application running as a SpringBoot / jar:
-
Download the client instrumentation package from the O11ysource, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Launch the application with the following configuration
java -javaagent:path/to/vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=<APPLICATION_NAME>
-Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none
-Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT> -jar app.jar -
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application name.SERVICE_NAME: Change it to match the service name (microservices) or application layer (monolithic)TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps.- This should be http://<vuSmartMaps Server IP>:4317.
Example:
- Here, the vuSmartMaps is running in the host with IP 10.0.0.1
java -javaagent:vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=UPI -Dotel.service.name=upi-switch
-Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://10.0.0.1:4317 -jar upi.jar
JBoss / WildFly (Standalone Mode) in Linux
Steps to instrument the java application running in JBoss / WildFly (Standalone Mode) in Linux:
-
Download the client instrumentation package, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Edit the
<JBOss_HOME>/bin/standalone.conffile and update theJAVA_OPTSenvironment variableJAVA_OPTS="-javaagent:path/to/vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT>" -
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single JBoss / Wildfly server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317
Example:
JAVA_OPTS="$JAVA_OPTS -javaagent:D:\Dev\OTel\auto_instrumentation_package_java\otel-lib\vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=APPLICATION_NAME -Dotel.service.name=SERVICE_NAME -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://localhost:4317" -
Restart JBoss
JBoss / WildFly (Domain Mode) in Linux
Steps to instrument the java application running in JBoss / WildFly (Domain Mode) in Linux:
-
Download the client instrumentation package, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Edit the
<JBOss_HOME>/bin/domain.conffile and update theJAVA_OPTSenvironment variableJAVA_OPTS="-javaagent:path/to/vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT>" -
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single JBoss / Wildfly server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317.
Example:
JAVA_OPTS="$JAVA_OPTS -javaagent:D:\Dev\OTel\auto_instrumentation_package_java\otel-lib\vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=APPLICATION_NAME -Dotel.service.name=SERVICE_NAME -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://localhost:4317" -
Restart JBoss
JBoss / WildFly (Standalone Mode) in Windows
Steps to instrument the java application running in JBoss / WildFly (Standalone Mode) in Windows:
-
Download the client instrumentation package, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Edit the
<JBOss_HOME>/bin/standalone.conf.batfile and update theJAVA_OPTSenvironment variableJAVA_OPTS="-javaagent:path/to/vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT>" -
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single JBoss / Wildfly server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317.
Example:
set "JAVA_OPTS=%$JAVA_OPTS% -javaagent:D:\Dev\OTel\auto_instrumentation_package_java\otel-lib\vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=APPLICATION_NAME -Dotel.service.name=SERVICE_NAME -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://localhost:4317" -
Restart JBoss
JBoss / WildFly (Domain Mode) in Windows
Steps to instrument the java application running in JBoss / WildFly (Domain Mode) in Windows:
-
Download the client instrumentation package, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Edit the
<JBOss_HOME>/bin/domain.conf.batfile and update theJAVA_OPTSenvironment variableJAVA_OPTS="-javaagent:path/to/vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT>" -
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single JBoss / Wildfly server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317.
Example:
set "JAVA_OPTS=%$JAVA_OPTS% -javaagent:D:\Dev\OTel\auto_instrumentation_package_java\otel-lib\vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=APPLICATION_NAME -Dotel.service.name=SERVICE_NAME -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://localhost:4317" -
Restart JBoss
Apache Tomcat running on Linux
Steps to instrument the java application running in Apache Tomcat running on Linux
-
Download the client instrumentation package, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Edit the
setenv.shin the bin directory of Tomcat and add the following content.- Create the
setenv.shin the bin directory if it doesn't existexport CATALINA_OPTS="$CATALINA_OPTS -javaagent:path/to/vunet-opentelemetry-javaagent.jar"
export OTEL_EXPORTER_OTLP_ENDPOINT=<TRACES_INGESTION_ENDPOINT>
export OTEL_RESOURCE_ATTRIBUTES=application=<APPLICATION_NAME>
export OTE_SERVICE_NAME=<SERVICE_NAME>
export OTEL_METRICS_EXPORTER=none
- Create the
-
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single Apache Tomcat server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317
-
Restart Apache Tomcat
Apache Tomcat running on Windows
Follow the below instructions to instrument the Java application running in Apache Tomcat:
- Download the client instrumentation package which contains the vunet-opentelemetry-javaagent.jar.
- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory. - Edit the setenv.bat file located in the bin directory of Tomcat.
- If it doesn’t exist, create a new one in the same directory.
Add the following content:
set "CATALINA_OPTS=%CATALINA_OPTS% -javaagent:path\to\vunet-opentelemetry-javaagent.jar"
set "OTEL_EXPORTER_OTLP_ENDPOINT=<TRACES_INGESTION_ENDPOINT>"
set "OTEL_RESOURCE_ATTRIBUTES=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME>"
set "OTEL_METRICS_EXPORTER=none"
Please update the following before using this command:
- APPLICATION_NAME – Change it to match your application name.
- SERVICE_NAME – Change it to match the service name (for microservices) or application layer (for monolithic applications).
- TRACES_INGESTION_ENDPOINT – Change it to match the URL of vuSmartMaps.
It should be in the format:
http://<vuSmartMaps Server IP>:4317
- Restart Apache Tomcat after completing the above configuration.
Apache Tomcat Running as Windows Service
Follow the below instructions to instrument the Java application running in Apache Tomcat which is running as a Windows Service:
- Download the client instrumentation package which contains the vunet-opentelemetry-javaagent.jar.
- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory. - Open the Tomcat Service Configuration
- Open the command prompt in Administrator mode
- Navigate to the bin folder of Tomcat
- Run the below command
tomcat9w.exe //ES//<SERVICE_NAME>
- Replace <SERVICE_NAME> with the actual internal service name
- For example:
tomcat9w.exe //ES//Service_1

- In the Tomcat Service Configuration, go to the Java tab.

- In the Java Options box add the following
-javaagent:path\to\vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=<APPLICATION_NAME>
-Dotel.service.name=<SERVICE_NAME>
-Dotel.metrics.exporter=none
-Dotel.exporter.otlp.endpoint=http://<vuSmartMaps Server IP>:4317
Please update the following before using this command:
- APPLICATION_NAME – Please change it to match your application name.
- SERVICE_NAME – Please change it to match the service name (microservices) or application layer (monolithic).
- TRACES_INGESTION_ENDPOINT – Please change it to match the URL of vuSmartMaps It should be in the format:
http://<vuSmartMaps Server IP>:4317
- Click Apply and OK to save
- Restart Apache Tomcat
Weblogic (Standalone Weblogic Servers)
Steps to instrument the java application running in a standalone Weblogic server:
-
Download the client instrumentation package, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Edit
startWebLogic.shlocated at<weblogic_<version#>_install_dir>/user_projects/domains/<domain_name>/bin/startWebLogic.sh.- Add the following to the beginning of your application server start script
export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:path/to/vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT>"
- Add the following to the beginning of your application server start script
-
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single Weblogic server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317
-
Restart Weblogic
Websphere Liberty
Follow the below instructions to instrument the java applications running in Websphere Liberty servers
-
Download the client instrumentation package which contains the vunet-opentelemetry-javaagent.jar. Place the vunet-opentelemetry-javaagent.jar in your preferred directory.
-
Locate the liberty server config. Each Liberty server instance has its own directory, like
$WLP_USER_DIR/servers/<server_name>/
Inside it, you will find server.xml, jvm.options etc. If you don't find jvm.options, please create the file.
- Add the following configurations to the jvm.options file
-javaagent:path/to/vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=<APPLICATION_NAME>
-Dotel.service.name=<SERVICE_NAME>
-Dotel.metrics.exporter=none
-Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT>
-Dotel.exporter.otlp.compression=gzip
- Please update the following before saving the configuration
- APPLICATION_NAME - Please change it to match your application name
- SERVICE_NAME - Please Change it to match the service name (microservices) or application layer (monolithic)
- TRACES_INGESTION_ENDPOINT - Please change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317
- Save the file and restart the liberty server using the below commands.
bin/server stop \<server\_name\>
bin/server start \<server\_name\>
-
Repeat this for all the Liberty servers that need to be instrumented.
-
Once this is done, you will see the traces in the vuSmartMaps dashboard
Weblogic (Servers managed by Admin Console)
Steps to instrument the java application running in clustered Weblogic server where the admin console is used to manage the instance:
-
Download the client instrumentation package, which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
For clustered WebLogic servers, you start and stop using Node Manager and configure server startup in the WebLogic Server Administration Console.
-
Open the WebLogic Server Administration Console.
-
Navigate to Environment > Servers and click your server in the Server List
-
Click the Server Start tab.
-
Add the javaagent argument and set the value to the path to the Java Agent
-javaagent:path/to/vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT> -Dotel.exporter.otlp.compression=gzip -
Please update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single Weblogic server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317
-
Restart the Weblogic managed server

Websphere Application Server ND
Steps to instrument the java application running in Websphere Application Server Network Deployment:
-
Download the client instrumentation package which contains the
vunet-opentelemetry-javaagent.jar.- Place the
vunet-opentelemetry-javaagent.jarin your preferred directory.
- Place the
-
Log in to the WebSphere Integrated Solutions Console
-
Navigate to Servers > Server type > WebSphere application servers.
-
Select the server.

-
Go to Java and Process Management > Process Definition.

-
Select Java Virtual Machine.

-
In Generic JVM arguments, add the following arguments.
-javaagent:path/to/vunet-opentelemetry-javaagent.jar -Dotel.resource.attributes=application=<APPLICATION_NAME> -Dotel.service.name=<SERVICE_NAME> -Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=<TRACES_INGESTION_ENDPOINT> -Dotel.exporter.otlp.compression=gzip -
Please update the following before saving the configuration
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME:- Change it to match the service name (microservices) or application layer (monolithic).
- When multiple war files are running in a single Weblogic server, then enable the auto discovery of service name using the argument
-Dotel.service.name=FROM_WEB_CONTEXT
TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317
-
Save the configuration and restart the server.
Docker
If your application is running in Docker, then modify the Dockerfile to include the JVM parameters mentioned above.
See the extract from a sample Dockerfile.
COPY ./vunet-opentelemetry-javaagent.jar /usr/local/lib/vunet-opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS "-javaagent:/usr/local/lib/vunet-opentelemetry-javaagent.jar"
ENV OTEL_RESOURCE_ATTRIBUTES "application=<Application Name>"
ENV OTEL_SERVICE_NAME "<Service Name>"
ENV OTEL_EXPORTER_OTLP_ENDPOINT "<TRACES_INGESTION_ENDPOINT>"
ENV OTEL_METRICS_EXPORTER "none"
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/urandom","-jar","./app.jar", "--port=80"]
If you don’t want to rebuild the container, then you can re-run the container with the following additional environment variables.
docker run -d \
-v ./vunet-opentelemetry-javaagent.jar:/app/opentelemetry-javaagent.jar \
-e OTEL_EXPORTER_OTLP_ENDPOINT=<TRACES_INGESTION_ENDPOINT>\
-e OTEL_SERVICE_NAME=<Service Name> \
--entrypoint java \
-javaagent:/usr/local/lib/vunet-opentelemetry-javaagent.jar \
-jar /app/myapp.jar
Ensure to update the following before using this command.
APPLICATION_NAME: Change it to match your application nameSERVICE_NAME: Change it to match the service name (microservices) or application layer (monolithic)TRACES_INGESTION_ENDPOINT: Change it to match the URL of the vuSmartMaps. It should be http://<vuSmartMaps Server IP>:4317
Kubernetes
When you run your Java applications in Kubernetes based environments, please follow the kubernetes tab.
Configuration
TLS Configuration
If the TLS is enabled on the vuSmartMaps traces receiver, please get the certificate from the server and configure the following additional parameters.
-Dotel.exporter.otlp.protocol=http/protobuf
-Dotel.exporter.otlp.certificate='/path/to/server/certificate'
The server certificate is included in the downloaded instrumentation package.
For the TLS case TRACES_INGESTION_ENDPOINT should be https://<vuSmartMaps Server IP>:4318
Capture HTTP Headers
In some applications, key transaction identifiers are passed as HTTP headers to the APIs. To capture these headers, additional instrumentation configurations are required. Below are the steps and examples for capturing HTTP headers for both HTTP servers and clients.
Capture HTTP Request Header for HTTP Server
To capture the request headers passed to a service, use the following configuration along with other instrumentation configurations mentioned in the previous sections.
OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas.
An example is given below
java -javaagent:vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=UPI -Dotel.service.name=upi-switch
-Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://10.0.0.1:4317 -jar
-Dotel.instrumentation.http.server.capture-request-headers=client_id,txn_id
upi.jar
Capture HTTP Response Header for HTTP Server
To capture the response headers passed from a service, use the following configuration along with other instrumentation configurations mentioned in the previous sections.
OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_RESPONSE_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas.
An example is given below
java -javaagent:vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=UPI -Dotel.service.name=upi-switch
-Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://10.0.0.1:4317 -jar
-Dotel.instrumentation.http.server.capture-response-headers=resp_code,resp_status
upi.jar
Capture HTTP Request Header for HTTP Client
To capture the request headers passed by a service, use the following configuration along with other instrumentation configurations mentioned in the previous sections.
OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_REQUEST_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas.
An example is given below
java -javaagent:vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=UPI -Dotel.service.name=upi-switch
-Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://10.0.0.1:4317 -jar
-Dotel.instrumentation.http.client.capture-request-headers=client_id,txn_id
upi.jar
Capture HTTP Response Header for HTTP Client
To capture the response headers received by a service, use the following configuration along with other instrumentation configurations mentioned in the previous sections
OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_RESPONSE_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas.
An example is given below
java -javaagent:vunet-opentelemetry-javaagent.jar
-Dotel.resource.attributes=application=UPI -Dotel.service.name=upi-switch
-Dotel.metrics.exporter=none -Dotel.exporter.otlp.endpoint=http://10.0.0.1:4317 -jar
-Dotel.instrumentation.http.client.capture-response-headers=resp_code,resp_status
upi.jar
Instrumentation Process
.NET Core 3.1 Application
-
The .NET Core 3.1 application does not support full auto instrumentation. It is partial auto instrumentation, which means code changes are required. The code changes are related to initializing the open telemetry.
-
Add the Open telemetry packages
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.8.0-beta.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.1" /> -
Add Open telemetry service. In the
Startup.csadd the below code
services.AddOpenTelemetry()
.ConfigureResource(resource => resource.AddService(serviceName))
.WithTracing(tracing => tracing
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddOtlpExporter()
);
-
Make sure you include the required packages
using OpenTelemetry;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using OpenTelemetry.Exporter; -
Set the following environment variables
OTEL_EXPORTER_OTLP_ENDPOINTwith value “http://<vuSmartMaps Server IP>:4318”OTEL_EXPORTER_OTLP_PROTOCOLwith value “http/protobuf”OTEL_RESOURCE_ATTRIBUTESwith value “application=<APPLICATION_NAME>”OTEL_SERVICE_NAMEwith value “<SERVICE_NAME>”
-
Build the application and run it.
.NET Application Running in Linux / MacOS (.NET Core)
Install Open Telemetry
Follow the steps below to install Open Telemetry in Linux / macOS machines. This is a one-time activity for a machine.
- Download the instrumentation package from o11ySource and extract it to your favourite folder. This is the OTel home directory.
- Install opentelemetry core files by running the bash script install.sh. This will install it in the dist folder.
Instrument the application
Every time you run the application, follow the steps below.
- Activate the auto instrumentation by running the following commands
chmod +x dist/instrument.sh
export OTEL_DOTNET_AUTO_HOME=dist
. dist/instrument.sh
- This sets the required environment variables for the current terminal session
- Set the following environment variables in the same terminal session
- OTEL_EXPORTER_OTLP_ENDPOINT with value “http://<vuSmartMaps Server IP>:4318”
- OTEL_EXPORTER_OTLP_PROTOCOL with value “http/protobuf”
- OTEL_RESOURCE_ATTRIBUTES with value “application=<APPLICATION_NAME>”
- OTEL_SERVICE_NAME with value “<SERVICE_NAME>”
- In the same terminal session, run the .NET application
Remove the instrumentation
- Go to the OTel Home directory
- Run the following commands
chmod +x remove_instrumentation.sh
. ./remove_instrumentation.sh
- This removes the instrumentation and you can run the application as usual.
.NET Application Running on Container (.NET Core)
-
Modify the Dockerfile to include the following lines to enable opentelemetry auto instrumentation
# install OpenTelemetry .NET Automatic Instrumentation
ARG OTEL_VERSION=1.4.0
ADD https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/releases/download/v${OTEL_VERSION}/otel-dotnet-auto-install.sh otel-dotnet-auto-install.sh
RUN apt-get update && apt-get install -y curl
RUN apt-get update && apt-get install -y unzip && \
OTEL_DOTNET_AUTO_HOME="/otel-dotnet-auto" sh otel-dotnet-auto-install.sh -
Build the docker image
-
Create a file called
otel-dotnet.envwith the following content# enable OpenTelemetry .NET Automatic Instrumentation
CORECLR_ENABLE_PROFILING="1"
CORECLR_PROFILER='{918728DD-259F-4A6A-AC2B-B85E1B658318}'
CORECLR_PROFILER_PATH="/otel-dotnet-auto/linux-x64/OpenTelemetry.AutoInstrumentation.Native.so"
DOTNET_ADDITIONAL_DEPS="/otel-dotnet-auto/AdditionalDeps"
DOTNET_SHARED_STORE="/otel-dotnet-auto/store"
DOTNET_STARTUP_HOOKS="/otel-dotnet-auto/net/OpenTelemetry.AutoInstrumentation.StartupHook.dll"
OTEL_DOTNET_AUTO_HOME="/otel-dotnet-auto" -
Run the Docker image with the following environment variables and env file
-env-file ./otel-dotnet.env --env OTEL_EXPORTER_OTLP_ENDPOINT="http://<vuSmartMaps Server IP>:4318" OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" OTEL_RESOURCE_ATTRIBUTES="application=<APPLICATION_NAME>" OTEL_SERVICE_NAME="<SERVICE_NAME>"
ASP.NET Application running in IIS (.NET Framework & .NET Core)
-
Download the instrumentation package (
dotnet_auto_instrumentation_offline_package.zip) from the O11ysource and extract it. -
Open Powershell in administrator mode. Go into the folder where the instrumentation packages are extracted.
-
Install open telemetry auto instrumentation by running the powershell script
OpenTelemetry.DotNet.Auto.psm1# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
# Install core files
Install-OpenTelemetryCore -InstallDir "C:\Program Files\OpenTelemetry .NET AutoInstrumentation" -LocalPath ".\opentelemetry-dotnet-instrumentation-windows.zip"By default, this is installed in the “C:\Program Files\OpenTelemetry .NET AutoInstrumentation” directory. You can install this in any folder by changing the “InstallDir” option
-
Run the command
Register-OpenTelemetryForIIS. This will restart the IIS.# Setup IIS instrumentation
Register-OpenTelemetryForIIS
Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If
you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run
D:\Dev\dotnet-instrumentation\madrid\instrumentation-package\dotnet\auto-instrumentation\pkg\otel\OpenTelemetry.DotNet.Auto.psm1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R
Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted -
Set the setting to the application.
For .NET Framework applications.Option 1: Using IIS Manager
You can set the following settings using the “Application Settings” menu from IIS manager. This is the safest option.
- Open IIS manager.
- Select your application and double click on “Application Settings”

- Add the following application settings.
- OTEL_EXPORTER_OTLP_ENDPOINT with value “http://<vuSmartMaps Server IP>:4318”
- OTEL_EXPORTER_OTLP_PROTOCOL with value “http/protobuf”
- OTEL_RESOURCE_ATTRIBUTES with value “application=<APPLICATION_NAME>,host.name=<host_name>,host.ip=<host_ip>”
- OTEL_SERVICE_NAME with value “<SERVICE_NAME>”
- OTEL_METRICS_EXPORTER with value “none”
- OTEL_DOTNET_AUTO_TRACES_WCFSERVICE_INSTRUMENTATION_ENABLED with value “false”
- Restart IIS
Option 2: Add to <appSettings> in Web.config
When your application already uses <appSettings> in the Web.config, then go ahead and add the following keys.
Note: Only one <appSettings> section is allowed in Web.config.
- Open the Web.config file of your application
- Add the following keys to the <appSettings>
- OTEL_EXPORTER_OTLP_ENDPOINT with value “http://<vuSmartMaps Server IP>:4318”
- OTEL_EXPORTER_OTLP_PROTOCOL with value “http/protobuf”
- OTEL_RESOURCE_ATTRIBUTES with value “application=<APPLICATION_NAME>,host.name=<host_name>,host.ip=<host_ip>”
- OTEL_SERVICE_NAME with value “<SERVICE_NAME>”
- OTEL_METRICS_EXPORTER with value “none”
- OTEL_DOTNET_AUTO_TRACES_WCFSERVICE_INSTRUMENTATION_ENABLED with value “false”
An example is shown below.
<appSettings>
<add key="OTEL_EXPORTER_OTLP_ENDPOINT" value="http://10.0.0.1:4318" />
<add key="OTEL_EXPORTER_OTLP_PROTOCOL" value="http/protobuf" />
<add key="OTEL_RESOURCE_ATTRIBUTES" value="application=TestApp" />
<add key="OTEL_SERVICE_NAME" value="application=TestService" />
<add key="OTEL_METRICS_EXPORTER" value="none" />
<add key="OTEL_DOTNET_AUTO_TRACES_WCFSERVICE_INSTRUMENTATION_ENABLED" value="false" />
</appSettings>Option 3: External config file
Use this when your Web.config doesn’t currently have <appSettings> and you wanna keep telemetry settings separate.
Note: Only one <appSettings> section is allowed in Web.config.
- Create a new file called “Instrumentation_Config.xml” in the publish folder and append it with the content shown below
<appSettings>
<add key="OTEL_EXPORTER_OTLP_ENDPOINT" value="http://10.0.0.1:4318" />
<add key="OTEL_EXPORTER_OTLP_PROTOCOL" value="http/protobuf" />
<add key="OTEL_RESOURCE_ATTRIBUTES" value="application=TestApp" />
<add key="OTEL_SERVICE_NAME" value="TestService" />
<add key="OTEL_METRICS_EXPORTER" value="none" />
<add key="OTEL_DOTNET_AUTO_TRACES_WCFSERVICE_INSTRUMENTATION_ENABLED" value="false" />
</appSettings>- Open the Web.config file of your application
- Add the <appSettings> section with file option that points to the Instrumentation_Config.xml as shown below
<configuration>
<appSettings file="Instrumentation_Config.xml" />
</configuration>- Save the Web.config file
- Restart IIS
Option 4: Add as Environment Variables in the Application Pool (Per-App Pool)
When your application runs in its own dedicated Application Pool, you can configure the OpenTelemetry settings as environment variables directly on that pool. These variables apply only to the worker process for that pool.
However, if the Application Pool is shared by multiple applications, you should not use this option because the instrumentation settings (such as application name and service name) would incorrectly apply to every app in that shared pool.
- Find out the application pool used by your application
- Open IIS manager and select the application
- Click on the “Basic Settings”. You can see the application pool name.
- Select the server from the left panel. Open 'Configuration Editor' from the Management section.

- Open section 'system.applicationHost/applicationPools'


-
Press '...' in the first entry of the table (Collection).


-
Select the row with your application pool name.

- At the 'Properties' section, select 'environmentVariables' and press '...'.


- Add the environment variables shown below.
- OTEL_EXPORTER_OTLP_ENDPOINT with value “http://<vuSmartMaps Server IP>:4318”
- OTEL_EXPORTER_OTLP_PROTOCOL with value “http/protobuf”
- OTEL_RESOURCE_ATTRIBUTES with value “application=<APPLICATION_NAME>,host.name=<host_name>,host.ip=<host_ip>”
- OTEL_SERVICE_NAME with value “<SERVICE_NAME>”
- OTEL_METRICS_EXPORTER with value “none”
- OTEL_DOTNET_AUTO_TRACES_WCFSERVICE_INSTRUMENTATION_ENABLED with value “false”



- Close all external windows and press 'Apply' in the main 'Configuration Editor' view.
- Restart your application.
-
For .NET Core applications.
- Add the following application settings under the
<environmentVariables>in<aspNetCore>section in web.config fileOTEL_EXPORTER_OTLP_ENDPOINTwith value “http://<vuSmartMaps Server IP>:4318”OTEL_EXPORTER_OTLP_PROTOCOLwith value “http/protobuf”OTEL_RESOURCE_ATTRIBUTESwith value “application=<APPLICATION_NAME>,host.name=<host_name>,host.ip=<host_ip>”OTEL_SERVICE_NAMEwith value “<SERVICE_NAME>”OTEL_METRICS_EXPORTERwith value “none”
Example:
<aspNetCore processPath="dotnet" arguments=".\WebApplication2.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" >
<environmentVariables>
<environmentVariable name="OTEL_EXPORTER_OTLP_ENDPOINT" value="http://<vuSmartMaps Server IP>:4318" />
<environmentVariable name="OTEL_EXPORTER_OTLP_PROTOCOL" value="http/protobuf" />
<environmentVariable name="OTEL_METRICS_EXPORTER" value="none" />
<environmentVariable name="OTEL_SERVICE_NAME" value="<SERVICE_NAME>" />
<environmentVariable name="OTEL_RESOURCE_ATTRIBUTES" value="application=<APPLICATION_NAME>,host.name=<HOST_NAME>,host.ip=<HOST_IP>" />
</environmentVariables>
</aspNetCore> - Add the following application settings under the
-
Restart IIS
Enable / Disable Instrumentation per Application Pool (.NET Framework only)
By default, all the applications are instrumented. But you can disable instrumentation per application pool.
# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
# Disable the instrumentation for the app pool
Disable-OpenTelemetryForIISAppPool -AppPoolName <App_Pool_Name>
# Restart Application Pool
Restart-WebAppPool -Name "MyAppPool"
To enable the instrumentation for the Application Pool, you can use the below command
# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
# Disable the instrumentation for the app pool
Enable-OpenTelemetryForIISAppPool -AppPoolName <App_Pool_Name>
# Restart Application Pool
Restart-WebAppPool -Name "MyAppPool"
Warning: Property is not found
If you get below error then the instrumentation will not work,
PS C:\WINDOWS\system32> Enable-OpenTelemetryForIISAppPool -AppPoolName DefaultAppPool
WARNING: Property . is not found on
/system.applicationHost/applicationPools/add[@name='DefaultAppPool']/environmentVariables at index @{name="COR_ENABLE_PROFILING"}.
To fix above issue we need to run below command
PS C:\WINDOWS\system32> Import-Module WebAdministration
PS C:\WINDOWS\system32> Set-ItemProperty IIS:\AppPools\DefaultAppPool -Name environmentVariables -Value @{name='COR_ENABLE_PROFILING';value='1'}
Remove Instrumentation
- Run the following commands to remove the instrumentation.
# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
Unregister-OpenTelemetryForIIS
Uninstall-OpenTelemetryCore
.NET Application running as exe in Terminal
Install the Opentelemetry
Installing the open telemetry is a one-time job for a machine. This will install Open Telemetry on the machine.
-
Download the instrumentation package (dotnet_auto_instrumentation_offline_package.zip) and extract it.
-
Open PowerShell in administrator mode. Go into the folder where the instrumentation packages are extracted.
-
Install OpenTelemetry auto instrumentation by running the powershell script OpenTelemetry.DotNet.Auto.psm1
# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
# Install core files
Install-OpenTelemetryCore -InstallDir "C:\Program Files\OpenTelemetry .NET AutoInstrumentation" -LocalPath ".\opentelemetry-dotnet-instrumentation-windows.zip"
By default, this is installed in the “C:\Program Files\OpenTelemetry .NET AutoInstrumentation” directory. You can install this in any folder by changing the “InstallDir” option
Instrument the application running as an exe
Once Open Telemetry is instrumented, the application can be instrumented using the steps below. These steps need to be followed every time you run the application.
- Run the command Register-OpenTelemetryForCurrentSession
Register-OpenTelemetryForCurrentSession
- Set the following environment variables
# Set environment variables for OpenTelemetry
$env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://<vuSmartMaps Server IP>:4318"
$env:OTEL_EXPORTER_OTLP_PROTOCOL = "http/protobuf"
$env:OTEL_METRICS_EXPORTER = "none"
$env:OTEL_SERVICE_NAME = "<SERVICE_NAME>"
$env:OTEL_RESOURCE_ATTRIBUTES = "application=<APPLICATION_NAME>,host.name=<HOST_NAME>,host.ip=<HOST_IP>"
- Run the application exe
Instead of running these commands every time, you can create a PowerShell script to automate this. A sample PowerShell script is shown below.
# Customize these values
$otelServiceName = “MyDotNetService”
$applicationName = “MyApp"
$exporterEndpoint = “http://<vuSmartMaps Server IP>:4318”
$hostName=”server1”
$hostIP=”10.0.0.1”
Register-OpenTelemetryForCurrentSession -OTelServiceName $otelServiceName
# Set environment variables
$env:OTEL_EXPORTER_OTLP_ENDPOINT = $exporterEndpoint
$env:OTEL_EXPORTER_OTLP_PROTOCOL = "http/protobuf"
$env:OTEL_METRICS_EXPORTER = "none"
$env:OTEL_SERVICE_NAME = $otelServiceName
$env:OTEL_RESOURCE_ATTRIBUTES = "application=$applicationName,host.name=$hostName,host.ip=$hostIP"
# Run the application
.\xyz.exe
Uninstall Open Telemetry for exe
- Install OpenTelemetry auto instrumentation by running the PowerShell script OpenTelemetry.DotNet.Auto.psm1
# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
Unregister-OpenTelemetryForCurrentSession
Uninstall-OpenTelemetryCore
Remove-Item -Path env:OTEL_EXPORTER_OTLP_ENDPOINT
Remove-Item -Path env:OTEL_EXPORTER_OTLP_PROTOCOL
Remove-Item -Path env:OTEL_METRICS_EXPORTER
Remove-Item -Path env:OTEL_SERVICE_NAME
Remove-Item -Path env:OTEL_RESOURCE_ATTRIBUTES
.NET Application running as exe in Task Scheduler
-
Download the instrumentation package (
dotnet_auto_instrumentation_offline_package.zip) from O11ysources and extract it. -
Open Powershell in administrator mode. Go into the folder where the instrumentation packages are extracted.
-
Install open telemetry auto instrumentation by running the powershell script
OpenTelemetry.DotNet.Auto.psm1# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
# Install core files
Install-OpenTelemetryCore -InstallDir "C:\Program Files\OpenTelemetry .NET AutoInstrumentation" -LocalPath ".\opentelemetry-dotnet-instrumentation-windows.zip"By default, this is installed in the “C:\Program Files\OpenTelemetry .NET AutoInstrumentation” directory. You can install this in any folder by changing the “InstallDir” option
-
Create a wrapper PowerShell script to wrap your exe
# Configure the Service Name
$OTelServiceName = "SERVICE_NAME"
# Configure the OTel installation path
$installDir = "C:\Program Files\OpenTelemetry .NET AutoInstrumentation"
# Configure your exe path
$exePath = "C:\MyDotNetApp.exe"
# Configure the resource attributes
$applicationName = "APPLICATION_NAME"
$hostName = "HOST_NAME"
$hostIp = "HOST_IP"
# Configure OpenTelemetry Exporter settings
$otelExporterOtlpEndpoint = "http://<vuSmartMaps Server IP>:4318"
$otelExporterOtlpProtocol = "http/protobuf"
$otelMetricsExporter = "none"
$otelResourceAttributes = "application=$applicationName,host.name=$hostName,host.ip=$hostIp"
# Create the environment variables directly in the script
$varsTable = @{
"OTEL_SERVICE_NAME" = $OTelServiceName
"OTEL_RESOURCE_ATTRIBUTES" = $otelResourceAttributes
"OTEL_EXPORTER_OTLP_ENDPOINT" = $otelExporterOtlpEndpoint
"OTEL_EXPORTER_OTLP_PROTOCOL" = $otelExporterOtlpProtocol
"OTEL_METRICS_EXPORTER" = $otelMetricsExporter
"COR_ENABLE_PROFILING" = "1"
"COR_PROFILER" = "{918728DD-259F-4A6A-AC2B-B85E1B658318}"
"COR_PROFILER_PATH_64" = "$installDir\win-x64\OpenTelemetry.AutoInstrumentation.Native.dll"
"COR_PROFILER_PATH_32" = "$installDir\win-x86\OpenTelemetry.AutoInstrumentation.Native.dll"
"CORECLR_ENABLE_PROFILING" = "1"
"CORECLR_PROFILER" = "{918728DD-259F-4A6A-AC2B-B85E1B658318}"
"CORECLR_PROFILER_PATH_32" = "$installDir\win-x86\OpenTelemetry.AutoInstrumentation.Native.dll"
"CORECLR_PROFILER_PATH_64" = "$installDir\win-x64\OpenTelemetry.AutoInstrumentation.Native.dll"
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES" = "OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper"
"DOTNET_ADDITIONAL_DEPS" = "$installDir\AdditionalDeps"
"DOTNET_SHARED_STORE" = "$installDir\store"
"DOTNET_STARTUP_HOOKS" = "$installDir\net\OpenTelemetry.AutoInstrumentation.StartupHook.dll"
"OTEL_DOTNET_AUTO_HOME" = $installDir
}
# Set environment variables for the current session
foreach ($var in $varsTable.Keys) {
[System.Environment]::SetEnvironmentVariable($var, $varsTable[$var], [System.EnvironmentVariableTarget]::Process)
}
# Run the .NET application
& $exePathConfigure the following to match your environment
- Service Name - Configure the correct SERVICE_NAME
- Install Dir - Configure the correct install directory of OTel
- Exe Path - Make sure you mention the correct path of the exe
- Application Name - Provide the correct application name
- Host Name - You can provide the host name. If you dont need host name then remove it from
$otelResourceAttributes = "application=$applicationName,host.name=$hostName,host.ip=$hostIp" - Host IP - You can provide the host ip. If you dont need host name then remove it from
$otelResourceAttributes = "application=$applicationName,host.name=$hostName,host.ip=$hostIp" - OTel Exporter Otlp Endpoint - Change this to the OTel collector endpoint
-
Modify your task
- Open Task Scheduler and find your task.
- Right-click the task and select Properties.
- Go to the Actions tab and click Edit.
- In the Action section, choose Start a program.
- For the Program/script, enter the full path to
powershell.exe. The path is typically “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe” - In the Add arguments (optional) field, enter the following
-ExecutionPolicy Bypass -File "<full path of the wrapper powershell script you created>"
Example:
-ExecutionPolicy Bypass -File "C:\Myne\instrument-exe\MyDotNetApp\MyApp.ps1"
Uninstall Open telemetry for exe running in Task Scheduler
- Uninstall open telemetry auto instrumentation by running the powershell script
OpenTelemetry.DotNet.Auto.psm1# Import the module
Import-Module ".\OpenTelemetry.DotNet.Auto.psm1"
Uninstall-OpenTelemetryCore - Modify your task
- Open Task Scheduler and find your task.
- Right-click the task and select Properties.
- Go to the Actions tab and click Edit.
- In the Action section, choose Start a program.
- For the Program/script, enter your exe path and save.
Configuration
Capture HTTP Headers
In some applications, key transaction identifiers are passed as HTTP headers to the APIs. To capture these headers, additional instrumentation configurations are required. Below are the steps and examples for capturing HTTP headers for both HTTP servers and clients.
Capture HTTP Request Header for ASP.NET Core
To capture the request headers of ASP.NET Core, use the following configuration along with other instrumentation configurations mentioned in the previous sections.
OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas. Based on the environment, add this additional configuration. For example
OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS=client_id,applicationid
Capture HTTP Response Header for ASP.NET Core
To capture the response headers of ASP.NET Core, use the following configuration along with other instrumentation configurations mentioned in the previous sections.
OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas. Based on the environment, add this additional configuration. For example
OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS=respo_code,resp_status
Capture HTTP Request Header for ASP.NET
To capture the request headers of ASP.NET, use the following configuration along with other instrumentation configurations mentioned in the previous sections.
OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas. Based on the environment, add this additional configuration. For example
OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS=client_id,applicationid
Capture HTTP Response Header for ASP.NET
To capture the response headers of ASP.NE, use the following configuration along with other instrumentation configurations mentioned in the previous sections.
OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS
You can configure one or more headers to be captured. If capturing multiple headers, separate them with commas. Based on the environment, add this additional configuration. For example
OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS=respo_code,resp_status
Capture HTTP Attributes for Web Forms and ASMX Applications
The .NET auto instrumentation doesn’t capture the HTTP attributes from the ASPX (Web Forms) and ASMX (SOAP Based Web services). You cannot get the HTTP URL, HTTP Status Code etc. To capture this, use a http enrichment module and add it to those specific applications. Please refer Capture HTTP Attributes for Web Forms Applications.
Pre-requisites for Auto-Instrumentation
- Due to how
eBPFworks only linux systems are supported.Autoinstrumentation doesn’t work for windows or MAC. Linuxenvironments with kernel version above4.4. To check your kernel version use the below command:
>> uname -r
6.8.0-57-generic
- Make sure the application to be instrumented uses a supported version of
go. As of 8th Apr 2025 the latest supported version isgo1.24hence the recommended go versions are>=go1.22. - The recommended processor architectures are
ARM64andAMD64. - Additionally, a user with
sudoprivileges is required to run the instrumentation binary on the host if the application is running on the host machine directly.
Supported Packages
Since Auto-Instrumentation using eBPF is a fairly new project, only a very limited and commonly used packages are supported namely:
Any http framework that relies on net/http will work as well(for ex: mux, gin). Also any database driver that implements the database/sql interface will be instrumented.
Running the Instrumentation Binary
All that is required to auto instrument a go application is to run the instrumentation alongside the application with elevated permissions (since it needs access to system level components) and configure it to point to the application binary and the exporter. We shall discuss three deployment options based on how your application is deployed and run.
Instrumentation Process
Linux
This option is suitable if you are running your application on the host machine directly as a process by running the application binary.
- Download the instrumentation binary from O11ySources.
- Run your application as usual.
- Add the following environment variables: (To see the list of all available configurations see here)
# Use grpc protocol while exporting traces
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
# endpoint to which the spans are to be exported
OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317
# path where the application binary is placed in the system
OTEL_GO_AUTO_TARGET_EXE=/go/payment_switch
# whether to include and parse sql statements for the database calls
OTEL_GO_AUTO_INCLUDE_DB_STATEMENT=true
# Sets whether to parse the SQL statement for trace data, setting db.operation.name. Only valid if OTEL_GO_AUTO_INCLUDE_DB_STATEMENT is also set.
OTEL_GO_AUTO_PARSE_DB_STATEMENT=true
# name of the application
OTEL_SERVICE_NAME=payment_switch
OTEL_PROPAGATORS=tracecontext,baggage - Finally, start the instrumentation binary:
sudo ./otel-go-instrumentation
We should now be able to see the spans being generated and being pushed to the collector configured. If the instrumentation binary is run before the application is started the instrumentation binary will wait for the application on start up.
Docker/Docker-Compose
Although not heavily used in production setups, docker-compose is one of the ways to run and orchestrate multi-layered applications. To instrument them, we shall run the instrumentation binary as a side car container to them.
- Add the below service to the
docker-compose.ymlfile where you defined the application:go-auto:
depends_on:
- payment_switch
image: otel/autoinstrumentation-go
privileged: true
pid: "host"
volumes:
- /proc:/host/proc
environment:
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317
- OTEL_GO_AUTO_TARGET_EXE=/go/payment_switch
- OTEL_GO_AUTO_INCLUDE_DB_STATEMENT=true
- OTEL_GO_AUTO_PARSE_DB_STATEMENT=true
- OTEL_SERVICE_NAME=payment_switch
payment_switch:
pid: "host"
volumes:
- /proc:/host/proc
...- Save the file and run
docker-compose up
notepid: “container:payment_switch”allows the instrumentation binary to access and interact with the processes running in thepayment_switchcontainer. And this is how the instrumentation binary gets access to the running application. - Save the file and run
Steps for Instrumentation
The following steps should be followed:
- Install the OpenTelemetry Operator
- Install the vuTraces Auto Instrumentation CRD
- Add the required annotations to the workload based on the programming language
- Configure the application name
- Configure the HTTP headers to be captured, if required
Step 1: Install OTel Operator / Instrumentation CRD
Using Helm
The detailed instructions for all these steps are shown below.
- Download the OpenTelemetry Operator helm chart and install it using the command below.
Please replace the placeholder with your namespace, e.g.:
<namespace-to-be-used-for-operator>
helm install opentelemetry-operator opentelemetry-operator-0.71.0.tgz \
--namespace <namespace-to-be-used-for-operator> \
--create-namespace \
--set "manager.collectorImage.repository=otel/opentelemetry-collector-k8s" \
--set admissionWebhooks.certManager.enabled=false \
--set admissionWebhooks.autoGenerateCert.enabled=true
- Download the vuTraces auto instrumentation helm chart and install it:
helm install vutraces-auto-instrumentation vutraces-auto-instrumentation-1.0.0.tgz \
--namespace <namespace-to-be-used-for-instrumentation-crd> \
--create-namespace \
--set vutracesexporter.endpoint="http://<vuSmartMaps_server>:4317"
Replace
<vuSmartMaps_server>and the namespace placeholders with values appropriate to your environment.
Using Manifest YAML

The complete package is available at K8s Manifest Package
-
Ensure cert-manager is installed in the cluster (required by OpenTelemetry Operator). If it’s not already installed, follow the official installation instructions. Otherwise, use this cert-manager manifest.
-
Install the Open Telemetry Operator using this manifest.
-
Download the manifest of the vuTraces auto instrumentation CRD from here. Modify the following in the manifest to match your environment, and install it
-
namespace - It is recommended to use the application’s namespace.
-
Change the value of the environment variable OTEL_EXPORTER_OTLP_ENDPOINT to point to Vunet’s Traces ingestion endpoint.
-
For Java, use the port 4317
-
For .NET, use the port 4318
-
-
Step 2: Annotate the Workloads
Add the following annotations to your Deployment manifests (in spec.template.metadata.annotations), replacing the <namespace-of-instrumentation-crd> placeholder.
Java workloads
annotations:
instrumentation.opentelemetry.io/inject-java: "<namespace-of-instrumentation-crd>/vutraces-auto-instrumentation"
.NET workloads
annotations:
instrumentation.opentelemetry.io/inject-dotnet: "<namespace-of-instrumentation-crd>/vutraces-auto-instrumentation"
Go workloads
annotations:
instrumentation.opentelemetry.io/inject-go: "<namespace-of-instrumentation-crd>/vutraces-auto-instrumentation"
Python workloads
annotations:
instrumentation.opentelemetry.io/inject-python: "<namespace-of-instrumentation-crd>/vutraces-auto-instrumentation"
If you are using a musl-based Python image (e.g., Alpine), also add:
annotations:
instrumentation.opentelemetry.io/otel-python-platform: "musl"
Node.js workloads
annotations:
instrumentation.opentelemetry.io/inject-nodejs: "<namespace-of-instrumentation-crd>/vutraces-auto-instrumentation"
If there are multiple containers in the Pod, add:
annotations:
instrumentation.opentelemetry.io/container-names: "your-app-container-name"
If you have many deployments, automate annotation addition (you referenced an automation script for .NET — use that as a template).
Step 3: Configure Application Name
Add this environment variable to your Deployment container spec to set the application name:
- name: OTEL_RESOURCE_ATTRIBUTES
value: "application=<app_name>"
Step 4: Capture HTTP Headers
Add environment variables to configure headers to capture.
Java workloads
- name: OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERS
value: "Header1,Header2"
- name: OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_RESPONSE_HEADERS
value: "Header3,Header4"
- name: OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_REQUEST_HEADERS
value: "Header5,Header6"
- name: OTEL_INSTRUMENTATION_HTTP_CLIENT_CAPTURE_RESPONSE_HEADERS
value: "Header7,Header8"
.NET workloads
- name: OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_REQUEST_HEADER
value: "Header1,Header2"
- name: OTEL_DOTNET_AUTO_TRACES_ASPNETCORE_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS
value: "Header3,Header4"
- name: OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_REQUEST_HEADERS
value: "Header5,Header6"
- name: OTEL_DOTNET_AUTO_TRACES_ASPNET_INSTRUMENTATION_CAPTURE_RESPONSE_HEADERS
value: "Header7,Header8"
Steps for Uninstalling the Instrumentation
- Remove the annotations you added.
- Remove the environment variables you added.
- Uninstall the vuTraces Auto Instrumentation CRD:
helm uninstall vutraces-auto-instrumentation --namespace <namespace-of-instrumentation-crd>
- Uninstall the OpenTelemetry Operator:
helm uninstall opentelemetry-operator --namespace <namespace-of-operator>
**Sample Manifest Files for Reference **
Here are the sample manifest YAM files for your reference. You can see specific examples.
A sample K8s Manifests for Java Application
- A sample yaml file for a java workload is available here.
A sample K8s Manifests for Java Application with Multiple Containers within a pod
- A sample yaml file for a java workload is available here.
A sample K8s Manifests for .NETApplication
- A sample yaml file for a java workload is available here.
Implementation/Procedure
This section provides the detailed instructions for instrumenting node.js services. Zero-code instrumentation for JavaScript provides a way to instrument any Node.js application and capture telemetry data from many popular libraries and frameworks without any code changes.
Instrumentation Procedure
Instrumentation for Node.js requires the installation of a couple of opentelemetry libraries as dependencies in the application regardless of the environment in which they are run. Along with this we can configure the instrumentation through environment variables. We shall explain the steps to achieve them and various options available below:
Instrumenting Node.js applications (TypeScript and JavaScript) run using node command
Follow the below steps to instrument Node.js application developed using TypeScript and run locally using node command.
Step1 - Install the Opentelemetry dependencies
Go to the application code and run the following command.
npm install --save @opentelemetry/api
npm install --save @opentelemetry/auto-instrumentations-node
--save options saves the installed dependencies to package.json file automatically. After running the command you should see this change in package.json.
"dependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/auto-instrumentations-node": "^0.57.1",
…
}
If the environment doesn’t have access to the internet to install the packages, use the provided tar files of the packages and place them in the same directory as package.json. Once done edit the package.json to include the below two lines in the dependencies section and run npm install --offline.
"dependencies": {
"@opentelemetry/api": "file:./api-1.9.0.tgz",
"@opentelemetry/auto-instrumentations-node": "file:./auto-instrumentations-node-0.59.0.tgz",
...
}
Step2 - Configure the Instrumentation
Set the following environment variables
export OTEL_TRACES_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export OTEL_EXPORTER_OTLP_ENDPOINT=<TRACES_INGESTION_ENDPOINT>
export OTEL_RESOURCE_ATTRIBUTES=application=<APPLICATION_NAME>
export OTEL_SERVICE_NAME=<SERVICE_NAME>
export OTEL_METRICS_EXPORTER=none
Please change the values of <TRACES_INGESTION_ENDPOINT>, <APPLICATION_NAME> and <SERVICE_NAME>
Step3 - Register the Instrumentation
Register the auto instrumentation by setting the following environment variable
export NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"
Step4 - Run the application
Run the Node.js application as usual. You will get the traces data in the vuSmartMaps.
Remove Instrumentation
To remove the instrumentation, unset the environment variables set for instrumentation
unset OTEL_TRACES_EXPORTER
unset OTEL_EXPORTER_OTLP_PROTOCOL
unset OTEL_EXPORTER_OTLP_ENDPOINT
unset OTEL_RESOURCE_ATTRIBUTES
unset OTEL_SERVICE_NAME
unset OTEL_METRICS_EXPORTER
unset NODE_OPTIONS
Instrumenting Node.js applications (TypeScript and JavaScript) run using PM2
Follow the below steps to instrument Node.js application developed using TypeScript and run using PM2
Step1 - Install the Opentelemetry dependencies
Go to the application code and run the following command.
npm install --save @opentelemetry/api
npm install --save @opentelemetry/auto-instrumentations-node
--save options saves the installed dependencies to package.json file automatically. After running the command you should see this change in package.json.
"dependencies": {
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/auto-instrumentations-node": "^0.57.1",
…
}
If the environment doesn’t have access to the internet to install the packages, use the provided tar files of the packages and place them in the same directory as package.json. Once done edit the package.json to include the below two lines in the dependencies section and run npm install --offline.
"dependencies": {
"@opentelemetry/api": "file:./api-1.9.0.tgz",
"@opentelemetry/auto-instrumentations-node": "file:./auto-instrumentations-node-0.59.0.tgz",
...
}
Step2 - Stop the Service
Stop and delete the Node.js service using PM2
pm2 stop <name of service>
pm2 delete <name of service>
Step3 - Configure the Instrumentation
Right now, you may be using the command pm2 start app.js --name "name of service" to start the Node.js service. Instead, you need to use pm2 start ecosystem.config.js
Create a file called “ecosystem.config.js” in your app folder with the following content.
module.exports = {
apps: [
{
name: "<name of service>",
script: "app.js",
env: {
OTEL_TRACES_EXPORTER: "otlp",
OTEL_EXPORTER_OTLP_PROTOCOL: "grpc",
OTEL_EXPORTER_OTLP_ENDPOINT: "<TRACES_INGESTION_ENDPOINT>",
OTEL_RESOURCE_ATTRIBUTES: "application=<APPLICATION_NAME>",
OTEL_SERVICE_NAME: "<SERVICE_NAME>",
OTEL_METRICS_EXPORTER: "none",
NODE_OPTIONS: "--require @opentelemetry/auto-instrumentations-node/register"
}
}
]
}
Please make sure you use the correct name and script.
- name - Name of the service
- script - Node.js script name like app.js
Please change the values of <TRACES_INGESTION_ENDPOINT>, <APPLICATION_NAME> and <SERVICE_NAME>
Verify the environment variables using the below command to confirm all are set correct.
pm2 env <id> | grep OTEL
Step4 - Start the application
Restart the Node.js application as usual using PM2.
For example:
pm2 start ecosystem.config.js
You will get the traces data in the vuSmartMaps.
From now on, you can restart the service using the below command
pm2 restart ecosystem.config.js
Alternatively, if you modify any environment variables later, use
pm2 restart <name of service> --update-env
This ensures that PM2 reloads the latest environment settings.
Removing Instrumentation
To remove OpenTelemetry instrumentation and revert to a normal PM2 setup,
- Delete the ecosystem.config.js file
- Revert to direct PM2 startup
pm2 delete <name of service>
pm2 start app.js --name "<name of service>"
Instrumenting Node.js applications (TypeScript and JavaScript) running in Docker
Follow the below steps to instrument Node.js application developed using TypeScript running in Docker
Step1 - Modify the Dockerfile
Modify the Dockerfile and include the following lines. This is used to install the Open telemetry APIs and enable the auto instrumentation
# --- Install OpenTelemetry auto-instrumentation packages ---
RUN npm install @opentelemetry/api @opentelemetry/auto-instrumentations-node
# --- Enable auto-instrumentation for all Node modules ---
ENV NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"
Step2 - Build the Docker image
Once the above mentioned changes are done in Dockerfile, build the docker image, as usual
Step3 - Run the application with additional envs
RUn the docker image of the application with the following environment variables
-e OTEL_TRACES_EXPORTER=otlp
-e OTEL_EXPORTER_OTLP_PROTOCOL=grpc
-e OTEL_EXPORTER_OTLP_ENDPOINT=<TRACES_INGESTION_ENDPOINT>
-e OTEL_SERVICE_NAME=<SERVICE_NAME>
-e OTEL_RESOURCE_ATTRIBUTES=application=<APPLICATION_NAME>
-e OTEL_METRICS_EXPORTER=none
- Please change the values of <TRACES_INGESTION_ENDPOINT>, <APPLICATION_NAME> and <SERVICE_NAME>
- <TRACES_INGESTION_ENDPOINT> must be reachable from inside the Docker container.
Remove Instrumentation
To remove the instrumentation, rebuild the docker image by removing the following lines from the Dockerfile and run the docker image without the environment variable mentioned above.
# --- Install OpenTelemetry auto-instrumentation packages ---
RUN npm install @opentelemetry/api @opentelemetry/auto-instrumentations-node
# --- Enable auto-instrumentation for all Node modules ---
ENV NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register"
Implementation/Procedure
This section provides the detailed instructions for instrumenting python services. Zero-code instrumentation for python provides a way to instrument any Python application and capture telemetry data from many popular libraries and frameworks without any code changes.
Instrumentation Procedure
Instrumentation for Python requires the installation of a couple of opentelemetry libraries as dependencies in the application regardless of the environment in which they are run. Along with this we can configure the instrumentation through environment variables. We shall explain the steps to achieve them and various options available below:
Installing Dependencies
The following two libraries are required to be installed as dependencies either by using the .whl file provided or directly from the pip repository if connected to the internet.
pip install opentelemetry-distro
# pip install opentelemetry_distro-0.54b0-py3-none-any.whl
Additional optional packages (based on your exporters and protocols):
pip install opentelemetry-exporter-otlp
# pip install opentelemetry_exporter_otlp-1.33.0-py3-none-any.whl
pip install opentelemetry-instrumentation
# pip install opentelemetry_instrumentation-0.54b0-py3-none-any.whl
Package Details
- opentelemetry-distro: Sets up OpenTelemetry with sensible defaults and zero-code instrumentation.
- opentelemetry-exporter-otlp: Allows exporting telemetry data to the OpenTelemetry Collector.
- opentelemetry-instrumentation: Provides auto-instrumentation for various popular Python libraries. Here is the complete list.
Configuring the Instrumentation
All configurations are done through environment variables as with other languages. Below are some of the mandatory and important envs to be added:
OTEL_TRACES_EXPORTER
The type of exporter to use for sending the generated traces. Possible values include otlp, console and zipkin. Since we use the OTEL collector to capture the traces, the value must be set to otlp.
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
The endpoint where the OTEL collector is running. For example: http://localhost:4317, http://otel-collector:4318 etc.. As a convention usually port 4317 is configured on grpc protocol and 4318 for http protocol in the OTEL collector. Select the port accordingly. In most cases, unless specified, the default port is 4317 with grpc.
OTEL_SERVICE_NAME
The name of the service being instrumented. This value will be used and saved in the generated traces under the field resource_attributes_service_name.
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS
Comma-separated list of libraries to disable auto-instrumentation. By default all libraries supported and available in the environment will be instrumented.
Running the Application
After the above steps are completed, run the application using the below command:
opentelemetry-instrument python app.py
where app.py is assumed to be the entrypoint for the application, but change this accordingly for your application. For gunicorn-based apps:
opentelemetry-instrument gunicorn app:app
Instrumentation Process
Prebuilt packages of the module are available for easy installation. Follow these steps to install NGINX Open Source with the OTel module. See list of compatible operating systems.
Adding Package Repositories and Installing NGINX Open Source
Follow the official NGINX Open Source installation steps to set up package repositories for your specific operating system and install NGINX.
Installing Nginx on Ubuntu
Install the prerequisites:
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring
Import an official nginx signing key so apt could verify the packages authenticity. Fetch the key:
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
Verify that the downloaded file contains the proper key:
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
The output should contain the full fingerprint 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 as follows:
pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24]
573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
uid nginx signing key <signing-key@nginx.com>
Note that the output can contain other keys used to sign the packages.
To set up the apt repository for stable nginx packages, run the following command:
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
If you would like to use mainline nginx packages, run the following command instead:
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
Set up repository pinning to prefer our packages over distribution-provided ones:
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
| sudo tee /etc/apt/preferences.d/99nginx
To install nginx, run the following commands:
sudo apt update
sudo apt install nginx
Installing the OTel Module from Packages
sudo apt install nginx-module-otel
Enabling the OTel Module
Module configurations can be found here.
Following the installation steps above will install the module into /etc/nginx/modules by default. Load the module by adding the following line to the top of the main NGINX configuration file, located at /etc/nginx/nginx.conf.
Example Configuration:
load_module modules/ngx_otel_module.so;
http {
otel_exporter {
endpoint 172.16.115.75:4317;
interval 5s;
batch_size 512;
batch_count 4;
}
otel_trace on;
otel_service_name vubank_nginx;
}
user www-data;
load_module modules/ngx_otel_module.so;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
Below is the sample nginx.conf used for vuBank where OTEL module is enabled
user www-data;
load_module modules/ngx_otel_module.so;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
otel_exporter {
endpoint 172.16.115.75:4317;
interval 5s;
batch_size 512;
batch_count 4;
}
otel_trace on;
otel_service_name vubank_nginx;
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
#log_format access_format 'time: $time_iso8601,' ' bytes_sent: $bytes_sent,' ' connection_time: $connection_time,' ' nginx_host: $host,' ' pid: $pid,' ' proxy_host: $proxy_host,' ' proxy_port: $proxy_port,' ' realip_remote_addr: $realip_remote_addr,' ' realip_remote_port: $realip_remote_port,' ' remote_addr: $remote_addr,' ' remote_port: $remote_port,' ' request: $request,' ' request_filename: $request_filename,' ' request_method: $request_method,' ' request_time: $request_time,' ' request_uri: $request_uri,' ' server_addr: $server_addr,' ' server_name: $server_name,' ' server_port: $server_port,' ' server_protocol: $server_protocol,' ' ssl_client_verify: $ssl_client_verify,' ' ssl_protocol: $ssl_protocol,' ' ssl_server_name: $ssl_server_name,' ' ssl_session_id: $ssl_session_id,' ' ssl_session_reused: $ssl_session_reused,' ' status: $status,' ' upstream_addr: $upstream_addr,' ' upstream_bytes_received: $upstream_bytes_received,' ' upstream_bytes_sent: $upstream_bytes_sent,' ' upstream_cache_status: $upstream_cache_status,' ' upstream_connect_time: $upstream_connect_time,' ' upstream_response_time: $upstream_response_time';
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
upstream backend {
#server 172.16.112.18:80;
server localhost:8085;
# Add more backend servers here as needed
}
upstream rum-backend {
#server 172.16.124.188:4319;
server 172.16.120.225:4319;
}
server {
listen 164.52.200.135:80;
#server_name vubank2.vunetsystems.com;
location /rum/ {
proxy_pass http://rum-backend/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods "POST, OPTIONS";
add_header Access-Control-Allow-Headers "Content-Type, Authorization";
if ($request_method = 'OPTIONS') {
return 204;
}
error_log /var/log/nginx/rum_debug.log debug;
}
location /api/auth/login {
#deny 164.52.200.135;
proxy_pass http://backend/auth/login;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accounts {
#deny 164.52.200.135;
proxy_pass http://backend/accounts;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/payees {
#deny 164.52.200.135;
proxy_pass http://backend/payees;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
proxy_pass http://backend/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#return 404;
}
location /server_status {
#deny 164.52.200.135;
stub_status on;
access_log on;
allow all;
# deny all;
# proxy_pass http://backend;
}
}
}
Restart the nginx for the changes to take effect
sudo service nginx restart
Generating Load
To generate load you can login to vuBank. This would hit the Nginx webserver.
Verfiy the OTEL Data
To verify if the OTEL data from Nginx , login to to kafka and check the traces-input topic.
kubectl exec -it kafka-cluster-cp-kafka-0 -nvsmaps bash
[appuser@kafka-cluster-cp-kafka-0 ~]$ kafka-console-consumer --bootstrap-server localhost:9092 --topic input-metrics | grep nginx
Could not start Jolokia agent: java.net.BindException: Address already in use
{"application":"vubank_nginx","call_count":1,"duration_bucket_counts":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"duration_explicit_bounds":[2,4,6,8,10,50,100,200,500,800,1000,1400,2000,5000,10000,15000],"duration_sum":3,"environment":"","error_count":0,"host_ip":"","host_name":"","http_status_code":200,"service":"vubank_nginx","service_name":"vubank_nginx","span_kind":"SPAN_KIND_SERVER","span_name":"/","start_time":"2025-03-25T01:46:05.358434104Z","status_code":"STATUS_CODE_UNSET","timestamp":"2025-03-25T05:47:05.359298852Z"}
{"application":"vubank_nginx","call_count":1,"duration_bucket_counts":[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"duration_explicit_bounds":[2,4,6,8,10,50,100,200,500,800,1000,1400,2000,5000,10000,15000],"duration_sum":3,"environment":"","error_count":0,"host_ip":"","host_name":"","http_status_code":200,"service":"vubank_nginx","service_name":"vubank_nginx","span_kind":"SPAN_KIND_SERVER","span_name":"/","start_time":"2025-03-25T01:46:05.358434104Z","status_code":"STATUS_CODE_UNSET","timestamp":"2025-03-25T05:47:35.359504329Z"}
unet@e2e-72-51:~$ kubectl exec -it kafka-cluster-cp-kafka-0 -nvsmaps bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
[appuser@kafka-cluster-cp-kafka-0 ~]$ kafka-console-consumer --bootstrap-server localhost:9092 --topic traces-input | grep vubank_nginx
Could not start Jolokia agent: java.net.BindException: Address already in use
{"is_root_span":true,"resource_attributes_service_name":"vubank_nginx","spanId":"f38f18b1c6a207f2","span_attributes_http_flavor":"1.1","span_attributes_http_method":"GET","span_attributes_http_request_content_length":0,"span_attributes_http_response_content_length":0,"span_attributes_http_route":"/","span_attributes_http_scheme":"http","span_attributes_http_status_code":304,"span_attributes_http_target":"/","span_attributes_http_user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","span_attributes_instrumentation_library_name":"nginx","span_attributes_net_host_name":"164.52.200.135","span_attributes_net_sock_peer_addr":"103.139.158.118","span_attributes_net_sock_peer_port":22179,"span_attributes_service":"vubank_nginx","span_attributes_site":"default","span_attributes_transaction":"GET /","span_durationNano":2000000,"span_end_time":"2025-03-25T05:55:40.634Z","span_kind":"SPAN_KIND_SERVER","span_name":"/","span_parentSpanId":"","span_start_time":"2025-03-25T05:55:40.632Z","status_code":0,"timestamp":"2025-03-25T05:55:40.634Z","traceId":"bfec18c7823a734738fc169b537f1f7d"}
In the Otel data we should be able to see resouce_attributes_service_name coming with vubank_nginx.
