-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for Provide a way to send Liberty logs to OpenTelemetry #7459
Comments
Hi @pgunapal - I've updated the following docs for this issue. Updates for related telemetry epics are still in progress.
|
@dmuelle Thanks, looks good! I added my review comments below:
|
Thanks for reviewing @pgunapal - I believe I've made all the requested edits and corrections: MicroProfile Telemetry log events reference list
MicroProfile Config properties: MicroProfile Telemetry
If any further edits are needed, just let me know. When you're satisfied with the drafts, you can add the |
in the column "When the runtime reads the property" it says "Application startup". The properties will be read at the time OpenTelemetry initializes, which can be either a runtime startup or application startup, depending on whether the server is configured to use a single shared instance with the runtime or a separate instance for each app. When the server is configured to use a separate instance for each app it uses MicroProfile Config properties. When the server is configured to use a single shared instance with the runtime it uses environment variables or system properties for configuration. So it's technically true that the MP Config properties are always read at app startup time, but we may want to put something in the header of the MP Telemetry section to explain that the MP Config properties only apply if MP Telemetry is configured to use a separate instance for each app. |
collect n and analyze You can configure how MicroProfile Telemetry collects and exports logs, metrics, and traces by specifying configuration properties in any of the config sources that are available to MicroProfile Config. Alternatively, if you choose to set these configuration properties by using environment variables, make the key name uppercase and convert any punctuation to underscores. For example, the otel.sdk.disabled=false property is equivalent to the OTEL_SDK_DISABLED=false environment variable.
It includes a name, time-related data, log messages, and metadata to collect data about what happens during a transaction. For example, to use a Jaeger server, you might Optionally, you can specify MicroProfile Config properties (this appears in multiple places) To separately configure multiple applications in a server, you can configure OpenTelemetry with application configuration. However, you cannot collect runtime-level metrics this way.
|
Hi @donbourne - I've reorganized/restructured the following topics: DEVELOPMENT:OBSERVABILITY
OPERATIONS:
|
we don't provide support for all of the monitor-1.0 metrics in OTel yet, so we should change the following example: To disable all vendor metrics, but to keep the REST base metrics configure the server.xml, as shown in the following example: Open Liberty can sends metric data To enable only the monitoring components that are used by MicroProfile Telemetry, add the following code to your server.xml file. @Channyboy , the table shows "HTTP" as a monitoring component -- is that a valid monitor-1.0 component name? The text above the table doesn't list HTTP as an option for monitor filter. In the table, the Prometheus metric names are listed after each metric. The tables also list the metric types, metric units, and descriptions of all metrics that are available for Open Liberty. For the vendor metrics, the associated monitoring component that you can use to filter the metric is also included. The Features required column of the table includes the feature or features that must be enabled to obtain that metric data. The Version introduced column specifies the minimum version of the feature that you must enable to collect the metric. navigation: Development/Observability:
Operations > Metrics |
@dmuelle @donbourne yup, the The For Telemetry should be |
Thanks @donbourne @Channyboy - I created Write logs with MicroProfile Telemetry logging But this basically just includes Don's suggestions links to other resources. Not sure if anything else is needed here. I also updated Monitoring with metrics and |
When you enable the MicroProfile Telemetry 2.0 or later and the OpenTelemetry SDK MicroPRofile https://docs-draft-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/docs/latest/mptelemetry-metrics-list.html To configure only a subset of vendor metrics for each vendor metric base metrics None of the links in the "See also" section apply to mpTelemetry metrics. |
Thanks @donbourne - all corrections made and staged to draft |
navigation
|
Thanks @donbourne - Ive edited the docs and created a new topic per these comments. Here's a list of (almost)everything we've updated so far for these epics New topic- Prepare your development environment for MicroProfile Telemetry DEVELOPMENT
OPERATIONS
REFERENCE |
@dmuelle , looks good - just a couple things I noticed while doing a full read-over:
|
Thanks @dmuelle ! |
Peer ReviewPrepare your development environment for MicroProfile Telemetry Add the 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 Enable observability with MicroProfile Telemetry. |
Feature epic details
Operating systems
Does the documentation apply to all operating systems?
Summary
Provide a concise summary of your feature. What is the update, why does it matter, and to whom? What do 80% of target users need to know to be most easily productive using your runtime update?
As part of the mpTelemetry-2.0 feature, it will be sending both runtime and application logs to OpenTelemetry, that are correlatable with traces and metrics. The following Open Liberty log sources can be collected by OpenTelemetry:
message
,trace
, andffdc
, where the fields will be mapped to the OpenTelemetry Logs Data Model.Create a new topic
To create a topic, specify a first draft of the topic that you want added and the section in the navigation where the topic should go.
Add a new document for MP Telemetry 2.0 under the
Docs overview / Reference / Features / MicroProfile Telemetry
section.Add information about the new
<mpTelemetry/>
server configuration element andsources
attribute, along with the supported log sources :message
,trace
,ffdc
. More information can be found in the Configuration section below.Add a new document to show the mapping table between OpenLiberty Log fields and OpenTelemetry Log Data Model for each supported log source, similar to the existing reference list document for JSON , under the
Docs overview / Operations/ Logs
section.MicroProfile Telemetry 2.0 log events reference list
Message Events Reference List
(Refer to Slide 11 in the UFO: https://ibm.box.com/s/ihoa8t3h18e8w2t41gdcuveo90q24mrd)
Example from the OpenTelemetry Collector output for a message event from an application:
Trace Events Reference List
(Refer to Slide 11 in the UFO: https://ibm.box.com/s/ihoa8t3h18e8w2t41gdcuveo90q24mrd)
Example from the OpenTelemetry Collector output for a trace event from an application:
FFDC Event Reference List
(Refer to Slide 12 in the UFO: https://ibm.box.com/s/ihoa8t3h18e8w2t41gdcuveo90q24mrd)
Example from the OpenTelemetry Collector output for a ffdc event from an application:
OpenTelemetry Severity Number Mapping with Liberty Log Levels
(Refer to Slide 13 in the UFO: https://ibm.box.com/s/ihoa8t3h18e8w2t41gdcuveo90q24mrd)
Configuration
List any new or changed properties, parameters, elements, attributes, etc. Include default values and configuration examples where relevant:
Server.xml configuration
To enable the MicroProfile Telemetry 2.0 feature to collect all logs, add the following configuration to your server.xml:
The
source
attribute accepts a list of comma-separated log sources . The<mpTelemetry/>
configuration element is optional, if it is not specified or the source attribute is not specified in the element, the defaultsource
configured will bemessage
. If the source attribute is empty (e.g.source=“”
), no sources will be collected, and nothing will be routed to the configured OpenTelemetry logs exporter. The attributes and values are case insensitive.Updates to existing topics
To update existing topics, specify a link to the topics that are affected. Include a copy of the current text and the exact text to which it will change. For example: Change ABC to XYZ
OpenTelemetry configuration
Add these properties to the following document as well:
https://openliberty.io/docs/latest/microprofile-config-properties.html#telemetry
To collect and export runtime-level logs, enable OpenTelemetry using system properties or environment variables:
otel.sdk.disabled=false
/OTEL_SDK_DISABLED=false
If you would like to separately configure multiple applications in a server, you can configure OpenTelemetry with application configuration. Note that you will not collect runtime-level logs this way.
By default, all OpenTelemetry data is exported to OTLP. You can change each exporter with the following properties:
otel.logs.exporter
/OTEL_LOGS_EXPORTER
When the exporter is set to none, no logs will be forwarded. If it is set to console, all the logs will be forwarded to stdout/console.log. The console.log will contain the usual logs, along with OpenTelemetry mapped (duplicate) logs as well. This should be only done for debugging purposes, and it is not recommended, as the console.log does not roll over.
Batch LogRecord Processor
By default, the SimpleLogRecordProcessor will be enabled, where the records will be send immediately. However, if you want to send the records in batches, you can also configure the following logging specific Batch LogRecord Processor.
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#batch-logrecord-processor
otel.blrp.schedule.delay/OTEL_BLRP_SCHEDULE_DELAY
otel.blrp.max.queue.size/OTEL_BLRP_EXPORT_TIMEOUT
otel.blrp.max.export.batch.size/OTEL_BLRP_MAX_QUEUE_SIZE
otel.blrp.export.timeout/OTEL_BLRP_MAX_EXPORT_BATCH_SIZE
The text was updated successfully, but these errors were encountered: