diff --git a/modules/ROOT/pages/microprofile-telemetry.adoc b/modules/ROOT/pages/microprofile-telemetry.adoc index 70380d852..a36fc209f 100644 --- a/modules/ROOT/pages/microprofile-telemetry.adoc +++ b/modules/ROOT/pages/microprofile-telemetry.adoc @@ -14,7 +14,7 @@ MicroProfile Telemetry helps you collect n and analyze data on the paths that application requests take through services. With MicroProfile Telemetry 2.0 and later, you can manage logs, metrics, and traces in a standardized way by using the OpenTelemetry protocol. -MicroProfile Telemetry is based on the https://opentelemetry.io/[OpenTelemetry project], a collection of open source vendor-independent tools, APIs, and SDKs for creating and managing trace data. You can enable MicroProfile Telemetry for Open Liberty by adding the feature:mpTelemetry[display=MicroProfile Telemetry] feature to your `server.xml` file and configuring the feature to connect to your distributed trace service. +MicroProfile Telemetry is based on the https://opentelemetry.io/[OpenTelemetry project], a collection of open source vendor-independent tools, APIs, and SDKs for creating and managing logs, metrics, and trace data. The following sections explain how to prepare your Open Liberty runtime and application code to use MicroProfile Telemetry. @@ -91,7 +91,11 @@ To enable MicroProfile Telemetry to collect and export logs in your Open Liberty + For more information, see <<#global,Enabling MicroProfile Telemetry for Open Liberty>>. -. Optionally, enable the MicroProfile Telemetry feature to collect logs from different sources in the Open Liberty runtime environment. +. Optionally, configure the log sources that MicroProfile Telemetry collects and where the logs are exported. ++ +You can configure how MicroProfile Telemetry collects and exports logs by specifying configuration properties in any of the xref:external-configuration.adoc#default[config sources that are available to MicroProfile Config], or by specifying environment variables. + +.. Enable MicroProfile Telemetry to collect logs from different sources in the Open Liberty runtime environment. + Configure the `source` attribute for the `mpTelemetry` element with a comma-separated list of comma-separated log sources: + @@ -102,10 +106,6 @@ Configure the `source` attribute for the `mpTelemetry` element with a comma-sepa + The `mpTelemetry` configuration element is optional. If you do not specify it, or if you do not include the `source` attribute, the default configuration source is `message`. For more information, see feature:mpTelemetry-2.0[display=Collect logs from a specified source]. -. Optionally, configure the log sources that MicroProfile Telemetry collects and where the logs are exported. -+ -You can configure how MicroProfile Telemetry collects and exports logs by specifying configuration properties in any of the xref:external-configuration.adoc#default[config sources that are available to MicroProfile Config], or by specifying environment variables. - .. Change the log exporter that MicroProfile Telemetry uses. + By default, all OpenTelemetry data is exported to link:https://opentelemetry.io/docs/languages/java/exporters/#otlp[OTLP]. You can change this setting by specifying the `otel.logs.exporter` property. @@ -118,7 +118,7 @@ otel.sdk.disabled=false otel.logs.exporter=console ---- + -If you set this property to `console`, all the logs are exported to standard out (`stdout`) and the `console.log` file. The `console.log` file contains the usual logs, along with duplicate OpenTelemetry-mapped logs. This setting is only for debugging purposes because the `console.log` file does not roll over and might affect performance if it gets too large. If you set this property to `none`, no logs are exported +If you set this property to `console`, all the logs are exported to standard out (`stdout`) and the `console.log` file. The `console.log` file contains the usual logs, along with duplicate OpenTelemetry-mapped logs. This setting is only for debugging purposes because the `console.log` file does not roll over and might affect performance if it gets too large. If you set this property to `none`, no logs are exported to OpenTelemetry. + .. Configure MicroProfile Telemetry to use the OpenTelemetry Batch LogRecord Processor. +