Instrument a Java app with OpenTelemetry
Blog post from New Relic
OpenTelemetry Java provides a framework for instrumenting Java applications to capture telemetry data, featuring an API and SDK for manual instrumentation and a Java agent for automatic instrumentation. The API is used by developers to add custom instrumentation, while the SDK processes and exports the collected data. The Java agent offers an auto-instrumentation option by modifying bytecode of popular libraries to collect telemetry data with minimal configuration. This blog post guides readers on manually instrumenting applications using OpenTelemetry's API and SDK, and demonstrates auto-instrumentation with the Java agent, using examples from the newrelic-opentelemetry-examples GitHub repository. It discusses the setup of custom tracing and metrics, highlights semantic conventions for better data interpretation, and emphasizes configuring the SDK early in the application lifecycle to ensure proper data processing and exporting. The post is part of a series exploring OpenTelemetry, with future installments focused on sending data to backend platforms for visualization and analysis.