Skip to content
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

Doc fix to address adding long running code in hooks #3226

Merged
merged 4 commits into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/se/metrics/01_metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Helidon SE provides the following to support metrics:
2. A base set of metrics, available at `/metrics/base`, as specified by the MicroProfile Metrics specification.
3. A set of Helidon-specific metrics, available at `/metrics/vendor`




include::{common-deps-page-prefix-inc}[tag=maven-dependency]

[source,xml]
Expand Down Expand Up @@ -88,6 +91,11 @@ public class MyService implements Service {
<2> Create a counter in that registry
<3> Increment the counter for every request

NOTE: Helidon-provided endpoints for `/metrics` do their work synchronously, using the same thread on which the request arrived via Netty. To prevent performance degradation, avoid including long-running code that can be invoked by these handlers while Helidon is responding to the metric. +
For example, if you implement your own application-specific metric types, you will write logic to format the JSON and OpenMetrics output for those metric types. Helidon invokes this formatting logic whenever a client accesses the /metrics endpoints, so make that formatting code as efficient as possible.



== Accessing Metrics Endpoint

Access metrics data via the `/metrics` endpoint. Two reporting formats
Expand Down