Closed Channyboy closed 1 month ago
Hi @Channyboy - I've updated the following topics, which are now available for review:
If any further updates are needed, just let me know. When you're satisfied with the drafts, you can add the technical reviewed
label to this issue to sign off. Thanks!
@dmuelle https://docs-draft-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/docs/latest/metrics-list.html#telem-table The Metrics Reference list:
One of the attributes is nested ( i see I did a double dash in the issue):
I've also forgot the j
in jvm
for the attributes and there seems to be an extra *
in front of jvm.thread.daemon=<is_daemon>
.
Thanks for reviewing @Channyboy - all corrections made. Let me know if anything further is needed. If not, you can sign off by adding the Technical reviewed
label to this issue.
@dmuelle
One more thing for https://docs-draft-openlibertyio.mqj6zf7jocq.us-south.codeengine.appdomain.cloud/docs/latest/metrics-list.html
the <monitor filter="ConnectionPool,ThreadPool,RequestTiming,Session,WebContainer,REST,GrpcClient,GrpcServer"/>
should include HTTP
in the list now.
Brought up by discussion in https://github.com/OpenLiberty/docs/issues/7459
OL23337 LG-337: Provide a way to send Liberty metrics to OpenTelemetry OL20985 : LG-334: Add HTTP metrics to monitor-1.0, mpMetrics and OpenTelemetry
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?
The OL23337 (Liberty Metrics to OpenTelemetry) bridges the server stats (recorded as MBeans) with monitor-1.0 to the mpTelemetry-2.0 feature. The stats that are forwarded are only from the Sessions, Connection Pool, Request Timing and thread pool components.
The OL20985 (HTTP stats + metrics) is similar to the above feature, but targets specifically HTTP stats/metrics (as this is new functionality/component, it was a new feature). HTTP server requests are recorded as MBeans as well as bridged as metrics for mpMetrics-5.x and mpTelemetry-2.0. The metric here is to implement the
http.server.request.duration
metric from the Open Telemetry HTTP semantic convention at https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#metric-httpserverrequestduration.Configuration
List any new or changed properties, parameters, elements, attributes, etc. Include default values and configuration examples where relevant:
No necessary configuration updates. The two features are auto-featured and will provided metrics to mpTelemetry-2.0 (and mpMetrics-5.x) automatically.
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
Update: Metrics Reference List
link: https://openliberty.io/docs/latest/metrics-list.html Modify the table under "MicroProfile Metrics 5.0 metrics reference"
Before:
After:
^Not sure if @yasmin-aumeeruddy is adding a page about Telemetry and metrics. If so can add that in there in the end.
Before:
Base and Vendor metrics
<--- (sub) titleAfter:
MicroProfile Metrics' Base and Vendor metrics
Add table entry to MP 5.0 table:
Update: JMX metrics Reference list
Add section + table
HTTP server requests metric: HttpServerStats MXBean
You can use the
HttpServerStats
MXBean to monitor HTTP requests made to the Open Liberty server. Performance data is available for each HTTP request made to the server and each unique combination of request method, response status and HTTP route has its own MXBean.The following attributes are available for the
HttpServerStats
MXBean. The object name of the MXBean for these attributes isWebSphere:type=HttpServerStats,name=*
:Update: OpenTelemetry configuration
Similar to the "OpenTelemetry Configuration" from https://github.com/OpenLiberty/docs/issues/7459
Need to update : https://openliberty.io/docs/latest/microprofile-config-properties.html#telemetry To collect and export runtime-level metrics, 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 metrics this way.
By default, all OpenTelemetry data is exported to OTLP. You can change each exporter with the following properties:
otel.metrics.exporter
/OTEL_METRICS_EXPORTER
The metric data is exported at an interval (default of 60s). Use the following MP Config property and env var to modify the export interval. Units is in milliseconds. See Otel documentation at [Periodic exporter MetricReader(https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#periodic-exporting-metricreader)
otel.metric.export.interval
/OTEL_METRIC_EXPORT_INTERVAL
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.