-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,42 @@ | ||
// Copyright (c) 2019, 2023 IBM Corporation and others. | ||
// Copyright (c) 2019, 2025 IBM Corporation and others. | ||
// Licensed under Creative Commons Attribution-NoDerivatives | ||
// 4.0 International (CC BY-ND 4.0) | ||
// https://creativecommons.org/licenses/by-nd/4.0/ | ||
// | ||
// Contributors: | ||
// IBM Corporation | ||
// | ||
:page-description: Building observability into applications externalizes the internal status of a system so operations teams can monitor systems more effectively. Open Liberty provides a robust framework for building observable applications and integrates with numerous third party monitoring tools. | ||
:page-description: Building observability into applications externalizes the internal status of a system so operations teams can monitor systems more effectively. Open Liberty provides a robust framework for building observable applications and integrates with numerous third-party monitoring tools. | ||
:seo-title: Observability - OpenLiberty.io | ||
:seo-description: Building observability into applications externalizes the internal status of a system so operations teams can monitor systems more effectively. Open Liberty provides a robust framework for building observable applications and integrates with numerous third party monitoring tools. | ||
:seo-description: Building observability into applications externalizes the internal status of a system so operations teams can monitor systems more effectively. Open Liberty provides a robust framework for building observable applications and integrates with numerous third-party monitoring tools. | ||
:page-layout: general-reference | ||
:page-type: general | ||
= Observability | ||
|
||
When applications are observable, operations teams can identify and understand the root causes of bugs, bottlenecks, and other inefficiencies. Open Liberty provides a robust framework for developing observable applications and integrates with numerous third-party monitoring tools. | ||
|
||
With MicroProfile Telemetry 2.0 and later, you can manage logs, metrics, and traces in a standardized way by using the OpenTelemetry protocol. For more information, see xref:microprofile-telemetry.adoc[Collect logs, metrics, and traces with OpenTelemetry]. | ||
Observability, the ability to understand the internal state of a system by examining its outputs, is a key aspect of maintaining high-performing, resilient microservices. Incorporating observability into your microservices from the outset helps you build more robust and manageable systems, facilitating easier debugging, performance tuning, and overall system health monitoring. | ||
|
||
The following topics provide information to help you develop observable applications with Open Liberty. | ||
The three pillars of observable microservices are logging, metrics, and tracing. | ||
With MicroProfile Telemetry 2.0 and later, you can manage Open Liberty logs, metrics, and traces in a standardized way by using the OpenTelemetry protocol. For more information, see xref:microprofile-telemetry.adoc[Collect logs, metrics, and traces with OpenTelemetry]. | ||
|
||
//// | ||
xref:prepare-mptelemetry.adoc[Customize your application telemetry with the OpenTelemetry API]:: | ||
Before you manually instrument your code to use MicroProfile Telemetry to collect metrics and traces, you must enable MicroProfile Telemetry in your development environment by editing your runtime configuration. You must also add the OpenTelemetry API and annotations as a dependency on your build path. | ||
//// | ||
|
||
xref:custom-mptelemetry-metrics.adoc[Define custom MicroProfile Telemetry metrics]:: | ||
You can use the OpenTelemetry metrics API to define custom metrics in your application code. When you enable the MicroProfile Telemetry feature 2.0 or later, you can then collect and emit these metrics to customize the observability of your application. | ||
== Logging: Understanding application behavior | ||
|
||
xref:telemetry-trace.adoc[Code instrumentation for MicroProfile Telemetry tracing]:: | ||
After you enable MicroProfile Telemetry and configure a trace server, you can instrument tracing in your application code. You can instrument your code automatically, manually, or by using the Java agent. | ||
Logging is the process of recording events within the system, capturing detailed information about what happened, when, and why. It's essential for debugging, auditing, and understanding the application's behavior. Logs provide a wealth of information about your application's behavior, including errors, warnings, and debug messages. Open Liberty has a xref:log-trace-configuration.adoc[unified logging component] that handles messages that are written by applications and the runtime, and provides First Failure Data Capture (FFDC) capability. Logging data that is written by applications by using the `System.out`, `System.err`, or `java.util.logging.Logger` streams is combined into the Open Liberty runtime logs by default. | ||
|
||
//// | ||
xref:mptelemetry-logging.adoc[Write logs with MicroProfile Telemetry logging]:: | ||
You can use MicroProfile Telemetry to mange your logs, along with traces and metrics. When you enable the MicroProfile Telemetry feature version 2.0 or later, MicroProfile Telemetry automatically collects any logs that are sent to the `java.util.logging` API. | ||
//// | ||
== Metrics: Measuring performance | ||
|
||
xref:health-check-microservices.adoc[Health checks for microservices]:: | ||
A health check is a special REST API implementation that you can use to validate the status of a microservice and its dependencies. With MicroProfile Health, microservices can self-check their health and publish their overall status to a defined endpoint. | ||
Metrics are quantitative measurements that provide insights into the state and performance of your microservice. Operations teams use metrics to track key performance indicators (KPIs) such as response times, error rates, and throughput. By collecting and analyzing metrics, they can identify trends, spikes, and anomalies that might indicate potential issues or areas for optimization. When you enable MicroProfile Telemetry 2.0 or later, Open Liberty automatically collects and exports a default set of metrics. For more information about these metrics, see the xref:mptelemetry-metrics-list.adoc[MicroProfile Telemetry metrics reference list]. You can also use the OpenTelemetry API to xref:custom-mptelemetry-metrics.adoc[define custom metrics] in your application code for OpenTelemetry to collect and export, if needed. Open LIberty also supports collecting metrics with MicroProfile Metrics. However, MicroProfile Telemetry provides a comprehensive solution for traces, metrics, and logging. | ||
|
||
xref:microservice-observability-metrics.adoc[Microservice observability with MicroProfile metrics]:: | ||
Open Liberty uses MicroProfile Metrics to provide metrics that describe the internal state of many Open Liberty components. MicroProfile Metrics provides a `/metrics` endpoint from which you can access all metrics that are emitted by an Open Liberty server and deployed applications. | ||
== Tracing: Following requests | ||
|
||
xref:micrometer-metrics.adoc[Choose your own monitoring tools with MicroProfile Metrics]:: | ||
The Open Liberty MicroProfile Metrics 5.0 feature uses embedded Micrometer metrics technology to transfer metric data to multiple third-party monitoring systems. Starting in MicroProfile Metrics 5.0, you can instrument your code in a standardized way to visualize metrics results in the monitoring system of your choice. | ||
Tracing is the process of tracking requests as they flow through a distributed system. It helps in understanding the performance and behavior of your microservices in a complex, interconnected environment. Distributed tracing, a crucial aspect of observability in microservices, involves correlating traces from various services to visualize the entire request journey. By implementing tracing in your microservices, operations teams can quickly identify bottlenecks, debug complex issues, and optimize inter-service communication. | ||
|
||
OpenTelemetry, an open source framework, provides a standardized approach to collect, process, and export trace data. When you enable OpenTelemetry for Open Liberty, Jakarta RESTful Web Services and JAX-RS applications are instrumented for trace by default. Spans are automatically generated for incoming HTTP requests, including static files, servlets, and JSPs. These spans are automatically exported according to the configured OpenTelemetry exporter settings. | ||
|
||
|
||
Implementing observability in your Java microservices involves a combination of metrics, logging, and tracing. With Open Liberty and OpenTelemetry, you can gain valuable insights into your application's behavior, enabling you to identify and resolve issues quickly. Remember, observability is not a one-time task but an ongoing process that must be integrated into your development lifecycle. By making observability a priority, you can build more reliable, performant, and maintainable microservices. | ||
|
||
|
||
For hands-on tutorials on different observability configurations for Open Liberty, check out our link:/guides/#observability[Observability guides]. |