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

TOC updates to include additional levels #6003

Merged
merged 5 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions docs/config/io_helidon_grpc_client_GrpcChannelDescriptor.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,11 +32,11 @@ Type: link:{javadoc-base-url}/io.helidon.grpc.client/io/helidon/grpc/client/Grpc



== Configuration options
== Configuration Options



.Optional configuration options
.Optional Configuration Options
[cols="3,3a,2,5a"]

|===
Expand Down
6 changes: 3 additions & 3 deletions docs/config/io_helidon_grpc_core_GrpcTlsDescriptor.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,11 +32,11 @@ Type: link:{javadoc-base-url}/io.helidon.grpc.core/io/helidon/grpc/core/GrpcTlsD



== Configuration options
== Configuration Options



.Optional configuration options
.Optional Configuration Options
[cols="3,3a,2,5a"]

|===
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,7 @@ Type: link:{javadoc-base-url}/io.helidon.grpc.server/io/helidon/grpc/server/Grpc



== Configuration options
== Configuration Options



Expand Down
4 changes: 2 additions & 2 deletions docs/config/io_helidon_health_HealthSupport.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,7 @@ This is a standalone configuration type, prefix from configuration root: `health



== Configuration options
== Configuration Options



Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,7 @@ micrometer



== Configuration options
== Configuration Options



Expand Down
4 changes: 2 additions & 2 deletions docs/config/io_helidon_metrics_serviceapi_MetricsSupport.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,7 @@ Type: link:{javadoc-base-url}/io.helidon.metrics.serviceapi/io/helidon/metrics/s



== Configuration options
== Configuration Options



Expand Down
5 changes: 4 additions & 1 deletion docs/includes/grpc-marshalling.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2019, 2022 Oracle and/or its affiliates.
Copyright (c) 2019, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,6 +22,9 @@ ifndef::rootdir[:rootdir: {docdir}/..]

= Marshalling

- <<Default Marshalling Support, Default Marshalling Support>>
- <<Custom Marshalling, Custom Marshalling>>

== Default Marshalling Support

Helidon gRPC supports Protobuf out of the box. The Protobuf marshaller will be used by default for any request and response classes that extend `com.google.protobuf.MessageLite`, which is the case for all classes generated from a `proto` file using `protoc` compiler.
Expand Down
6 changes: 5 additions & 1 deletion docs/includes/guides/metrics.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -427,6 +427,10 @@ You can get the metadata for any scope, such as `/metrics/base`, as shown below:
// tag::k8s-and-prometheus-integration[]

=== Integration with Kubernetes and Prometheus
- <<Kubernetes Integration, Kubernetes Integration>>
- <<Prometheus Integration, Prometheus Integration>>
- <<Final Cleanup, Final Cleanup>>

==== Kubernetes Integration
The following example shows how to integrate the Helidon {h1-prefix} application with Kubernetes.

Expand Down
20 changes: 15 additions & 5 deletions docs/includes/metrics/metrics-capable-components.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,8 +30,18 @@ ifndef::h1-prefix[:h1-prefix: SE]
== Contents

- <<Overview, Overview>>
** <<APIs, APIs>>
** <<Implementations of the APIs, Implementations of the APIs>>
- <<Usage, Usage>>
** <<Categorizing Metrics Usage, Categorizing Metrics Usage>>
** <<Understanding the Two Metrics Implementations, Understanding the Two Metrics Implementations>>
** <<Understanding the Two Metrics Service Implementations>>
** <<Enabling and Disabling Metrics, Enabling and Disabling Metrics>>
** <<Designing and Writing Metrics-Capable Applications and Components, Designing and Writing Metrics-Capable Applications and Components>>
** <<Writing Metrics-Capable Code, Writing Metrics-Capable Code>>
- <<Examples, Examples>>
- <<Additional Information, Additional Information>>
** <<Advantages of Writing Metrics-Capable Modules, Advantages of Writing Metrics-Capable Modules>>

== Overview
This document explains Helidon {h1-prefix} metrics-capable components and applications and describes how to create and control them.
Expand Down Expand Up @@ -160,7 +170,7 @@ provided they are in the runtime path.
Further, users can set `component-name.metrics.enabled` to `false` which disables metrics for just that component
so long as the component was written to check that setting and act on it accordingly.

=== Designing and Writing Metrics-capable Applications and Components
=== Designing and Writing Metrics-Capable Applications and Components
Whoever packages and deploys your application or component can control what code will be on the runtime path and whether metrics
is enabled or not.
As a result, wherever possible, construct your modules which use metrics so that they do not make decisions based on the values of metrics;
Expand Down Expand Up @@ -213,15 +223,15 @@ implementation:
// tag::writing-code-beginning[]

// tag::writing-code-intro[]
=== Writing Metrics-capable Code
=== Writing Metrics-Capable Code
The way you write a metrics-capable module depends on whether it is a _component_
(that is, _not_ an application) or an _application_.

// end::writing-code-intro[]

// tag::writing-component[]

==== Writing a _Non-application Component_
==== Writing a _Non-Application Component_
Write your _non-application_ component to accept component-specific configuration that includes an optional `metrics` section
which can include an optional `enabled` setting. Helidon defaults the value to `true`.
The following example shows one way to accomplish this:
Expand Down Expand Up @@ -309,7 +319,7 @@ which all use a single version of your metrics-capable app or component which ru
// tag::wrap-up[]
== Additional Information

=== Advantages of Writing Metrics-capable Modules
=== Advantages of Writing Metrics-Capable Modules
By writing a metrics-capable app or component, you give packagers and deployers of your code the flexibility to include or exclude
the full metrics implementation at runtime as they see fit.

Expand Down
16 changes: 6 additions & 10 deletions docs/includes/metrics/metrics-config.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,17 +36,13 @@ include::{rootdir}/config/io_helidon_metrics_serviceapi_MetricsSupport.adoc[tag=
// tag::config-examples[]
[#example-configuration]
=== Example Configuration
- <<Disable Metrics Subsystem, Disable Metrics Subsystem>>
- <<Disable Selected Metrics, Disable Selected Metrics>>
- <<Collecting Basic and Extended Key Performance Indicator (KPI) Metrics, Collecting Basic and Extended Key Performance Indicator (KPI) Metrics>>

Metrics configuration is quite extensive and powerful and, therefore, a bit complicated.
The rest of this section illustrates some of the most common scenarios:
The rest of this section illustrates some of the most common scenarios.

* <<config-disable,Disable metrics entirely.>>
* <<config-selective,Selectively enable or disable metrics by metric registry type and, within type, by name.>>
* <<config-kpi,Choose whether to collect extended key performance indicator metrics.>>
ifdef::mp-flavor[]
* <<config-rest-request,Control `REST.request` metrics collection.>>

endif::[]
[#config-disable]
==== Disable Metrics Subsystem

Expand Down Expand Up @@ -150,7 +146,7 @@ endif::[]

[#config-rest-request]
ifdef::mp-flavor[]
==== Enable `REST.request` Metrics
==== Enable REST.request Metrics

.Controlling REST request metrics
[source,properties]
Expand Down
8 changes: 4 additions & 4 deletions docs/includes/metrics/metrics-shared.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -56,7 +56,7 @@ Later sections of this document describe how to do
ifdef::mp-flavor[each of these.]
ifdef::se-flavor[this.]

=== Categorizing Types of Metrics
=== Categorizing the Types of Metrics
Helidon distinguishes among three general _types_, or scopes, of metrics, as described in the link:{microprofile-metrics-spec-url}[MP metrics specification].

.Types (scopes) of metrics
Expand All @@ -76,7 +76,7 @@ A _metric registry_ collects registered metrics of a given type. Helidon support

When you add code to your service to create a metric programmatically, the code first locates the appropriate registry and then registers the metric with that registry.

=== Retrieving Metrics Reports from your Service
=== Retrieving Metrics Reports From Your Service
When you add the metrics dependency to your project, Helidon automatically provides a built-in REST endpoint `/metrics` which responds with a report of the registered metrics and their values.

Clients can request a particular output format.
Expand Down Expand Up @@ -134,7 +134,7 @@ metrics of interest such as system and VM information.
// end::usage-body[]

// tag::metric-registry-api[]
=== The `MetricRegistry` API
=== The MetricRegistry API
To register or look up metrics programmatically, your service code uses one of the three link:{microprofile-metrics-javadoc-url}/org/eclipse/microprofile/metrics/MetricRegistry.html[`MetricRegistry`] instances (base, vendor, and application) which Helidon furnishes automatically.

ifdef::mp-flavor[]
Expand Down
4 changes: 2 additions & 2 deletions docs/includes/metrics/micrometer-shared.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -76,7 +76,7 @@ configuration to set them up as you wish.
// end::prereq[]

// tag::overriding-intro[]
==== Overriding Defaults for Built-in Meter Registry Types
==== Overriding Defaults for Built-In Meter Registry Types
Unless you specify otherwise, Helidon uses defaults for any built-in Micrometer meter registry.
For example, Helidon configures the built-in Prometheus registry using `PrometheusConfig.DEFAULT`.

Expand Down
4 changes: 3 additions & 1 deletion docs/includes/metrics/prometheus-exemplar-support.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2021, 2022 Oracle and/or its affiliates.
Copyright (c) 2021, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,6 +28,8 @@ ifndef::flavor-lc[:flavor-lc: se]
- <<Overview, Overview>>
- <<Maven Coordinates, Maven Coordinates>>
- <<Usage, Usage>>
** <<Interpreting Exemplars, Interpreting Exemplars>>
** <<Output Format, Output Format>>
- <<Examples, Examples>>
- <<Additional Information, Additional Information>>

Expand Down
2 changes: 1 addition & 1 deletion docs/includes/mp.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates.
Copyright (c) 2022, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 10 additions & 6 deletions docs/mp/grpc/client.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2019, 2022 Oracle and/or its affiliates.
Copyright (c) 2019, 2023 Oracle and/or its affiliates.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,12 @@ include::{rootdir}/includes/mp.adoc[]
- <<Maven Coordinates, Maven Coordinates>>
- <<API, API>>
- <<Configuration, Configuration>>
** <<Configuration Options, Configuration Options>>
** <<Configuring TLS, Configuring TLS>>
- <<Usage, Usage>>
** <<Using Channels, Using Channels>>
** <<Using the Client Interface in an Application, Using the Client Interface in an Application>>
** <<Building a gRPC Client, Building a gRPC Client>>
- <<Examples, Examples>>

== Overview
Expand Down Expand Up @@ -59,15 +64,14 @@ The following annotations are used to work with Helidon MP gRPC clients:
* `@Grpc` - an annotation used to mark a class as representing a gRPC service.

== Configuration
For a gRPC client to connect to a server, it requires a Channel. The Helidon MP gRPC APIs provide a way to inject channels into
CDI beans that require them.
For a gRPC client to connect to a server, it requires a Channel. The Helidon MP gRPC APIs provide a way to inject channels into CDI beans that require them.

include::{rootdir}/config/io_helidon_grpc_client_GrpcChannelDescriptor.adoc[leveloffset=1, tag=config]

Channels are configured in the `grpc` section of the Helidon application configuration. The examples below use an `application.yaml`
file but there are many other ways to use and override xref:{rootdir}/mp/config/introduction.adoc[configuration in Helidon]

.General form of a gRPC channels configuration
.General Form of a gRPC Channels Configuration
[source,yaml]
----
grpc:
Expand All @@ -84,7 +88,7 @@ grpc:
While most client application only connect to a single server, it is possible to configure multiple named channels if the client
needs to connect to multiple servers.

.Multiple gRPC Channels configuration example
.Multiple gRPC Channels Configuration Example
[source,yaml]
----
grpc:
Expand All @@ -103,7 +107,7 @@ It is also possible to configure a Channel to use TLS if the server is using TLS

include::{rootdir}/config/io_helidon_grpc_core_GrpcTlsDescriptor.adoc[leveloffset=3]

.TLS on gRPC Channels configuration example
.TLS on gRPC Channels Configuration Example
[source,yaml]
----
grpc:
Expand Down
Loading