Skip to content

Commit

Permalink
add trace level table
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuelle committed Aug 20, 2024
1 parent 31cca5a commit 6cc668c
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 12 deletions.
2 changes: 2 additions & 0 deletions modules/ROOT/pages/log-trace-configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -669,3 +669,5 @@ The `trace.log` file is created and logs are written to it only if one or more t
|all
|All events are logged. If you create custom levels, `all` includes those levels, and can provide a more detailed trace than finest.
|===

For information about mapping Open Liberty log levels to OpenTelemetry severity numbers, see xref:mptel-log-events-list.adoc#sevlev[OpenTelemetry severity number mapping with Open Liberty log levels].
2 changes: 1 addition & 1 deletion modules/ROOT/pages/microprofile-telemetry.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:seo-description:
:page-layout: general-reference
:page-type: general
= Enable distributed tracing with MicroProfile Telemetry
= Enable observability with MicroProfile Telemetry

In microservice applications, sources of latency or inaccuracy can be difficult to determine because relationships and dependencies among the constituent services are not always obvious. MicroProfile Telemetry helps you collect data on the paths that application requests take through services.

Expand Down
6 changes: 3 additions & 3 deletions modules/ROOT/pages/microprofile.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Writing code more quickly isn't the only reason that MicroProfile is popular. It
Although a microservice architecture provides many benefits, it also introduces new challenges not apparent in traditional monolithic applications. MicroProfile addresses these challenges so that you can easily develop cloud-native applications. These challenges include toleration of service failures, end-to-end security for an authenticated user request that flows through a set of microservices, and problem determination for requests that span many services.

////
== Developing RESTful, scalable, observable microservices: MicroProfile layers of functionality
MicroProfile can be organized into three layers of functionality. The bottom layer represents RESTful services. The middle layer is for writing microservices that can be operated and managed at scale. The top layer contains tools to help you write observable microservices that enable you to detect and diagnose issues.
Expand Down Expand Up @@ -122,9 +122,9 @@ For more information, see xref:microservice-observability-metrics.adoc[Microserv
=== Enable distributed tracing of your microservices
link:https://projects.eclipse.org/projects/technology.microprofile/releases/microprofile-telemetry-1.0/plan%E2%80%A8%E2%80%A822.0.0.10-bet[MicroProfile Telemetry] is based on the https://opentelemetry.io/[OpenTelemetry project], which is a collection of open source vendor-agnostic tools, APIs, and SDKs for creating and managing trace data.

In Open Liberty, MicroPRofile Telemetry is supported by the feature:mpTelemetry[display=MicroProfile Telemetry] feature. You can export the data that this feature collects to tracing systems such as Jaeger or Zipkin. For more information, see xref:microprofile-telemetry.adoc[Enable distributed tracing with MicroProfile Telemetry].
In Open Liberty, MicroPRofile Telemetry is supported by the feature:mpTelemetry[display=MicroProfile Telemetry] feature. You can export the data that this feature collects to tracing systems such as Jaeger or Zipkin. For more information, see xref:microprofile-telemetry.adoc[Enable observability with MicroProfile Telemetry].

MicroProfile Telemetry replaces MicroProfile OpenTracing. For information about migrating your applications from MicroProfile OpenTracing to MicroProfile Telemetry, see xref:reference:diff/mp-50-60-diff.adoc#telemetry[Differences between MicroProfile Telemetry 1.0 and MicroProfile OpenTracing 3.0].
MicroProfile Telemetry replaces MicroProfile OpenTracing. For information about migrating your applications from MicroProfile OpenTracing to MicroProfile Telemetry, see xref:reference:diff/mp-50-60-diff.adoc#telemetry[Differences between MicroProfile Telemetry 1.0 and MicroProfile OpenTracing 3.0].

== Other MicroProfile features
In addition to the three layers of MicroProfile features that comprise the MicroProfile stack, these additional MicroProfile features are implemented in the Open Liberty runtime but are not yet part of an official MicroProfile release. These features extend the MicroProfile core capabilities, giving you enhanced control over concurrency and reactive programming in your microservice-based applications.
Expand Down
27 changes: 27 additions & 0 deletions modules/ROOT/pages/mptel-log-events-list.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@

MicroProfile Telemetry can collect logging events from the server runtime and applications. You can use these events to gather and analyze data that can help to better understand the behavior of applications.

For more information, see xref:microprofile-telemetry.adoc[Enable observability with MicroProfile Telemetry]

MicroProfile Telemetry can collect the following types of events:

* <<Message events, Message events>>
* <<Trace events, Trace events>>
* <<FFDC events, FFDC events>>
For information about trace log detail levels and how Open Liberty settings map to OpenTelemetry severity numbers, see <<sevelev, OpenTelemetry severity number mapping with Liberty log levels>>.

== Message events
The following table provides the fields for message events and a description for each field:

Expand Down Expand Up @@ -144,4 +148,27 @@ Attributes:
thread.name=“Default Executor-thread-12”
----

[#sevlev]
== OpenTelemetry severity number mapping with Open Liberty log levels

You can set the level of detail that your Open Liberty logs collect by configuring the `tracSpecification` attribute for the config:logging[] attribute in your `server.xml` file. For more information about Liberty log levels, see xref:log-trace-configuration.adoc#log_details[Trace log detail levels].

The following table describes how the different Liberty log levels map to severity numbers and short names from the OpenTelemetry specification.

.Open Liberty log levels and OpenTelemetry severity numbers
[options="header"]
|=======================
| Liberty log levels | OpenTelemetry severity short Name | OpenTelemetry severity meaning | OpenTelemetry severity number
| fatal | FATAL | A fatal error such as application or system crash. | 21
| severe | ERROR | An error event. Something went wrong. | 17
| warning | WARN | A warning event. Not an error but is likely more important than an informational event. | 13
| audit | INFO2 | An informational event. Indicates that an event happened. | 10
| info | INFO | - | 9
| config | DEBUG4 | A debugging event. | 8
| detail | DEBUG3 | - | 7
| fine | DEBUG2 | - | 6
| finer | DEBUG | - | 5
| finest | TRACE | A fine-grained debugging event. Typically disabled in default configurations. | 1
|=======================

// assisted by watsonx latest with latest GenAI contribution: llama-3-70b-instruct
8 changes: 3 additions & 5 deletions modules/ROOT/pages/observability.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
: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
= 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.

Expand All @@ -21,14 +21,12 @@ xref:microservice-observability-metrics.adoc[Microservice observability with met
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.

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

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.

xref:microprofile-telemetry.adoc[Enable distributed tracing with MicroProfile Telemetry]::
xref:microprofile-telemetry.adoc[Enable observability with MicroProfile Telemetry]::
In microservice applications, sources of latency or inaccuracy can be difficult to determine because relationships and dependencies among the constituent services are not always obvious. MicroProfile Telemetry helps you collect data on the paths that application requests take through services.

For hands-on tutorials on different observability configurations for Open Liberty, check out our link:/guides/#observability[Observability guides].


2 changes: 1 addition & 1 deletion modules/reference/pages/diff/mp-50-60-diff.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ In MicroProfile 6.0, MicroProfile Telemetry 1.0 replaces MicroProfile OpenTracin

=== Configuration changes

In addition to replacing the `mpOpenTracing-3.0` feature with the `mpTelemtry-1.0` feature in your `server.xml` file, you must provide configuration to allow the MicroProfile Telemetry feature to connect to your distributed trace service. For more information, see xref:ROOT:microprofile-telemetry.adoc[Enable distributed tracing with MicroProfile Telemetry].
In addition to replacing the `mpOpenTracing-3.0` feature with the `mpTelemtry-1.0` feature in your `server.xml` file, you must provide configuration to allow the MicroProfile Telemetry feature to connect to your distributed trace service. For more information, see xref:ROOT:microprofile-telemetry.adoc[Enable observability with MicroProfile Telemetry].

You do not need to package a client for your particular tracing service. MicroProfile Telemetry includes exporters for Zipkin, the OpenTelemetry Protocol (OTLP) (which is used by Jaeger since v1.35), and the older Jaeger protocol. If you need to export to a different service, you can provide a custom exporter by using the link:https://www.javadoc.io/doc/io.opentelemetry/opentelemetry-sdk-extension-autoconfigure-spi/1.19.0/io/opentelemetry/sdk/autoconfigure/spi/traces/ConfigurableSpanExporterProvider.html[ConfigurableSpanExporterProvider service provider interface (SPI)].

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
For information about migrating from MicroProfile Open Tracing to MicroProfile Open Telemetry, see xref:diff/mp-50-60-diff.adoc#telemetry[Differences between MicroProfile Telemetry 1.0 and MicroProfile OpenTracing 3.0].

For information about configuring MicroProfile Telemetry, see xref:ROOT:microprofile-telemetry.adoc[Enable distributed tracing with MicroProfile Telemetry].
For information about configuring MicroProfile Telemetry, see xref:ROOT:microprofile-telemetry.adoc[Enable observability with MicroProfile Telemetry].
2 changes: 1 addition & 1 deletion modules/reference/pages/feature/mpTelemetry/examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

=== Collect logs from specified sources

To enable the MicroProfile Telemetry feature to collect logs from different sources in the Open Liberty runtime environment, configure the `source` attribute for the config:mpTelemetry element with a comma-separated list of log sources.
To enable the MicroProfile Telemetry feature to collect logs from different sources in the Open Liberty runtime environment, configure the `source` attribute for the config:mpTelemetry[] element with a comma-separated list of log sources.

[source,xml]
----
Expand Down

0 comments on commit 6cc668c

Please sign in to comment.