Java
Instrumenting your existing Java application with the OpenTelemetry SDK gives you the flexibility to capture custom metrics, manual spans, and tailored application context.
Installation
Section titled “Installation”Add the OpenTelemetry BOM (Bill of Materials) and dependencies to your pom.xml (Maven) or build.gradle (Gradle):
Maven (pom.xml):
Configuration
Section titled “Configuration”Configure the OpenTelemetry exporter to send data to the KloudMate Agent’s OTLP endpoint. By default, the KloudMate agent listens on port 4318 for HTTP OTLP traffic.
You can configure the endpoint via environment variables before running your instrumented code:
(Replace KM_AGENT_HOST with the IP address or hostname of your KloudMate Agent).
Official Documentation
Section titled “Official Documentation”OpenTelemetry is continuously evolving. For the most up-to-date SDK instructions, advanced configurations, and custom instrumentation details, refer to the official OpenTelemetry documentation:
Looking for a step-by-step tutorial?
Check out our Instrument a Java App guide to see how to manually instrument a simple Java application.