Products > vuApp360 > vuApp360 Deployment and Configuration

vuApp360 Deployment and 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 and Configuring Data Sources

  1. Navigate to O11ySources:
    • vuSmartMaps O11ySources can be accessed by navigating from the left navigation menu (Data Ingestion > O11ySources).


  2. Locate Traces O11ySource on the landing page.



  3. Enable Traces O11ySources:
    • Click the Enable button to activate Traces O11ySource.


  4. Configure Datasource:
    • Navigate to the Sources tab and click the + button to add new services to be monitored.


  5. Fill up the Following Details in the Wizard:
    • Specify Applications Group
    • Define Application Services
    • Configure Sampling Policies
    • Configure Sampling Sub Policies



  6. Sampling Policies/Sampling Sub Policies Description:
    • Allow All: This policy samples every incoming piece of data, disregarding any condition or criteria.
    • Allow based on Latency: Samples data based on processing time or latency.
      1. Attributes: threshold_ms
      2. Usage: Data exceeding the specified threshold will be sampled for further analysis.
    • Allow based on Numeric Attributes: Samples data based on numeric attribute values within specified ranges.
      1. Attributes: key, min_value, max_value
      2. Usage: Sampling data where attribute key values fall within the defined range aids in proactive maintenance.
    • Allow a Percentage: Allows sampling based on a defined probability or percentage.
      1. Attributes: sampling_percentage
      2. Usage: Collects a specific percentage of incoming data for analysis without overloading the system.
    • Allow based on Status: Samples based on specific HTTP status codes.
      1. Attributes: status_codes
      2. Usage: Focuses on error instances for detailed investigation and troubleshooting.
    • Allow based on String Attributes: Samples based on specific string attribute values.
      1. Attributes: key, values, enabled_regex_matching, invert_match
      2. Usage: Aids in monitoring and analyzing critical endpoints’ performance and usage.
    • Limit on Rate: Limits the rate at which data is sampled based on a defined frequency.
      1. Attributes: spans_per_second
      2. Usage: Prevents system overload during traffic spikes, ensuring downstream systems aren’t inundated.
  7. Download the client instrumentation package for the selected language from the agent configuration wizard.



  8. Follow the instructions provided in the client instrumentation package.

Following these steps, you have successfully enabled Traces O11ySource and configured the data sources for real-time application performance monitoring.

Client Side Traces Instrumentation

Host / VM

  1. Download the client instrumentation package containing vunet-opentelemetry-javaagent.jar and place it in your preferred directory.

    💡Note: It is to be noted that the downloaded instrumentation package needs to be completely unzipped since there is another zipped folder inside the package.

  2. Launch the Java 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={{data.TRACES_INGESTION_ENDPOINT}} -jar app.jar

💡Note: It is to be noted that the above command needs to be run in a single-line command in one instance.

Ensure to update the placeholders:

  1. APPLICATION_NAME: Change it to match your application name.
  2. SERVICE_NAME: Change it to match the service name (microservices) or application layer (monolithic).
  3. TRACES_INGESTION_ENDPOINT: Change it to match the URL of vuSmartMaps.

Example:

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

Docker

If your application is running in Docker, modify the Dockerfile:

COPY ./opentelemetry-javaagent.jar /usr/local/lib/opentelemetry-javaagent.jar
ENV JAVA_TOOL_OPTIONS "-javaagent:/usr/local/lib/opentelemetry-javaagent.jar"
ENV OTEL_RESOURCE_ATTRIBUTES "application=<Application Name>"
ENV OTEL_SERVICE_NAME "<Service Name>"
ENV OTEL_EXPORTER_OTLP_ENDPOINT "{{data.TRACES_INGESTION_ENDPOINT}}"
ENV OTEL_METRICS_EXPORTER "none"
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/urandom","-jar","./app.jar", "--port=80"]

Ensure to update the placeholders:

  • 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 vuSmartMaps.

Kubernetes

  1. Add the Java auto-instrumentation agent to your Java application/service.
    • Download the client instrumentation package and copy the agent jar to the “agent” directory in your Java application source code.
    • Modify the Dockerfile to add the following line:
      COPY ./agent/opentelemetry-javaagent.jar ./opentelemetry-javaagent.jar

    • Build the Docker image.
  2. Enable Java auto-instrumentation in the Kubernetes manifest:
    • Add the following environment variables:

      env:
            - name: JAVA_TOOL_OPTIONS
              value: "-javaagent:/usr/local/lib/vunet-opentelemetry-javaagent-1.18.0.jar -Dotel.instrumentation.runtime-metrics.enabled=true"
            - name: HOST_IP
              valueFrom:
                fieldRef:
                   fieldPath: status.hostIP
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_UID
              valueFrom:
                fieldRef:
                  fieldPath: metadata.uid
            - name: OTEL_RESOURCE_ATTRIBUTES
              value: "service.name=<SERVICE_NAME>,service.version=<SERVICE_VERSION>,application=<APPLICATION_NAME>,service.instance.id=$(POD_NAME),k8s.pod.uid=$(POD_UID)"
            - name: OTEL_TRACES_EXPORTER
              value: otlp
            - name: OTEL_METRICS_EXPORTER
              value: otlp
            - name: OTEL_LOGS_EXPORTER
              value: none
            - name: OTEL_EXPORTER_OTLP_ENDPOINT
              value: {{data.TRACES_INGESTION_ENDPOINT}}
            - name: OTEL_LOG_LEVEL
              value: debug
            - name: OTEL_METRIC_EXPORT_INTERVAL
              value: "60000"

    • Ensure to update the placeholders:
      1. APPLICATION_NAME: Change it to match your application name.
      2. SERVICE_NAME: Change it to match the service name (microservices) or application layer (monolithic).
      3. TRACES_INGESTION_ENDPOINT: Change it to match the URL of vuSmartMaps.
    • Deploy the pod.

Following these steps, you have configured the application to be observed with vuApp360.

Resources

Browse through our resources to learn how you can accelerate digital transformation within your organisation.