Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11830 from jmesnil/WFLY-10712_microprofile_metric…
…s-smallrye [WFLY-10712] Observability: MicroProfile Metrics
- Loading branch information
Showing
46 changed files
with
2,056 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
...rc/main/asciidoc/_admin-guide/subsystem-configuration/MicroProfile_Metrics.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
[[MicroProfile_Metrics_SmallRye]] | ||
= MicroProfile Metrics Subsystem Configuration | ||
|
||
Support for https://microprofile.io/project/eclipse/microprofile-metrics[Eclipse MicroProfile Metrics] is provided by | ||
the _microprofile-metrics-smallrye_ subsystem. | ||
|
||
[[required-extension]] | ||
== Required Extension | ||
|
||
This extension is included in all the standalone configurations included in the | ||
WildFly distribution. | ||
|
||
You can also add the extension to a configuration without it either by adding | ||
an `<extension module="org.wildfly.extension.microprofile.metrics-smallrye"/>` | ||
element to the xml or by using the following CLI operation: | ||
|
||
[source,ruby] | ||
---- | ||
[standalone@localhost:9990 /]/extension=org.wildfly.extension.microprofile.metrics-smallrye:add | ||
---- | ||
|
||
== Management Model | ||
|
||
The `/subsystem=microprofile-metrics-smallrye` resource defines two attributes: | ||
|
||
* `security-enabled` - a boolean to indicate whether authentication is required to access the HTTP metrics endpoint (described below). By default, it is `true`. The | ||
standalone configurations explicitly sets it to `false` to accept unauthenticated access to the HTTP endpoints. | ||
* `exposed-subsystems` - a list of strings corresponding to the names of subsystems that exposes their metrics in the HTTP metrics endpoints. | ||
By default, it is not defined (there will be no metrics exposed by subsystem. The special wildcard `*` can be used to expose metrics from _all_ subsystems. The standalone | ||
configuration sets this attribute to `*`. | ||
|
||
== HTTP Endpoint | ||
|
||
The Metric HTTP endpoint is accessible on WildFly HTTP management interface http://localhost:9990/metrics[http://localhost:9990/metrics]. | ||
|
||
Secured access to the HTTP endpoint is controlled by the `security-enabled` attribute of the `/subsystem=microprofile-metrics-smallrye` resource. | ||
If it is set to `true`, the HTTP client must be authenticated. | ||
|
||
If the application server is healthy, it will return a `200 OK` response: | ||
|
||
---- | ||
$ curl -v http://localhost:9990/metrics | ||
< HTTP/1.1 200 OK | ||
... | ||
# HELP base:classloader_total_loaded_class_count Displays the total number of classes that have been loaded since the Java virtual machine has started execution | ||
. | ||
# TYPE base:classloader_total_loaded_class_count counter | ||
base:classloader_total_loaded_class_count 10822.0 | ||
... | ||
---- | ||
|
||
If security has been enabled, the HTTP client must pass the credentials corresponding to a management user | ||
created by the `add-user` script. For example: | ||
|
||
---- | ||
$ curl -v --digest -u myadminuser:myadminpassword http://localhost:9990/metrics | ||
< HTTP/1.1 200 OK | ||
... | ||
# HELP base:classloader_total_loaded_class_count Displays the total number of classes that have been loaded since the Java virtual machine has started execution | ||
. | ||
# TYPE base:classloader_total_loaded_class_count counter | ||
base:classloader_total_loaded_class_count 10822.0 | ||
... | ||
---- | ||
|
||
If the authentication fails, the server will reply with a `401 NOT AUTHORIZED` response. | ||
|
||
== Exposed Metrics | ||
|
||
The HTTP endpoint exposes the following metrics: | ||
|
||
* Base metrics - Required metrics specified in the MicroProfile 1.1 specification are exposed in the `base` scope. | ||
* Vendor metrics - Metrics from WildFly subsystems are exposed in the `vendor` scope | ||
* Application metrics - Metrics from the application and from the deployment's subsystems are exposed in the `application` scope. | ||
|
||
== Component Reference | ||
|
||
The Eclipse MicroProfile Health is implemented by the SmallRye Health project. | ||
|
||
**** | ||
* https://microprofile.io/project/eclipse/microprofile-metrics[Eclipse MicroProfile Metrics] | ||
* http://github.com/smallrye/smallrye-metrics/[SmallRye Metrics] | ||
**** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...re-pack/src/main/resources/modules/system/layers/base/io/smallrye/metrics/main/module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ JBoss, Home of Professional Open Source. | ||
~ Copyright 2018, Red Hat, Inc., and individual contributors | ||
~ as indicated by the @author tags. See the copyright.txt file in the | ||
~ distribution for a full listing of individual contributors. | ||
~ | ||
~ This is free software; you can redistribute it and/or modify it | ||
~ under the terms of the GNU Lesser General Public License as | ||
~ published by the Free Software Foundation; either version 2.1 of | ||
~ the License, or (at your option) any later version. | ||
~ | ||
~ This software is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
~ Lesser General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU Lesser General Public | ||
~ License along with this software; if not, write to the Free | ||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<module xmlns="urn:jboss:module:1.8" name="io.smallrye.metrics"> | ||
<properties> | ||
<property name="jboss.api" value="private"/> | ||
</properties> | ||
|
||
<resources> | ||
<artifact name="${io.smallrye:smallrye-metrics}"/> | ||
</resources> | ||
|
||
<dependencies> | ||
<module name="javax.api"/> | ||
<module name="org.eclipse.microprofile.config.api" /> | ||
<module name="org.eclipse.microprofile.metrics.api" /> | ||
<module name="org.jboss.logging" /> | ||
<module name="javax.enterprise.api" /> | ||
<module name="javax.annotation.api" /> | ||
<module name="javax.json.api" /> | ||
<module name="org.jboss.weld.core" /> | ||
<module name="org.jboss.weld.spi" /> | ||
</dependencies> | ||
</module> |
36 changes: 36 additions & 0 deletions
36
...resources/modules/system/layers/base/org/eclipse/microprofile/metrics/api/main/module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ JBoss, Home of Professional Open Source. | ||
~ Copyright 2018, Red Hat, Inc., and individual contributors | ||
~ as indicated by the @author tags. See the copyright.txt file in the | ||
~ distribution for a full listing of individual contributors. | ||
~ | ||
~ This is free software; you can redistribute it and/or modify it | ||
~ under the terms of the GNU Lesser General Public License as | ||
~ published by the Free Software Foundation; either version 2.1 of | ||
~ the License, or (at your option) any later version. | ||
~ | ||
~ This software is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
~ Lesser General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU Lesser General Public | ||
~ License along with this software; if not, write to the Free | ||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<module xmlns="urn:jboss:module:1.8" name="org.eclipse.microprofile.metrics.api"> | ||
<resources> | ||
<artifact name="${org.eclipse.microprofile.metrics:microprofile-metrics-api}"/> | ||
</resources> | ||
|
||
<dependencies> | ||
<module name="javax.enterprise.api" /> | ||
<module name="org.eclipse.microprofile.config.api" /> | ||
<module name="org.jboss.weld.core" /> | ||
<module name="org.jboss.weld.spi" /> | ||
</dependencies> | ||
</module> |
51 changes: 51 additions & 0 deletions
51
...es/system/layers/base/org/wildfly/extension/microprofile/metrics-smallrye/main/module.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ JBoss, Home of Professional Open Source. | ||
~ Copyright 2018, Red Hat, Inc., and individual contributors | ||
~ as indicated by the @author tags. See the copyright.txt file in the | ||
~ distribution for a full listing of individual contributors. | ||
~ | ||
~ This is free software; you can redistribute it and/or modify it | ||
~ under the terms of the GNU Lesser General Public License as | ||
~ published by the Free Software Foundation; either version 2.1 of | ||
~ the License, or (at your option) any later version. | ||
~ | ||
~ This software is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
~ Lesser General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU Lesser General Public | ||
~ License along with this software; if not, write to the Free | ||
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
--> | ||
|
||
<module xmlns="urn:jboss:module:1.8" name="org.wildfly.extension.microprofile.metrics-smallrye"> | ||
<properties> | ||
<property name="jboss.api" value="private"/> | ||
</properties> | ||
|
||
<resources> | ||
<artifact name="${org.wildfly:wildfly-microprofile-metrics-smallrye}"/> | ||
</resources> | ||
|
||
<dependencies> | ||
<module name="io.smallrye.metrics" export="true"/> | ||
<module name="io.undertow.core"/> | ||
<module name="javax.api"/> | ||
<module name="org.eclipse.microprofile.metrics.api" /> | ||
<module name="org.jboss.staxmapper"/> | ||
<module name="org.jboss.as.controller"/> | ||
<module name="org.jboss.as.core-security"/> | ||
<module name="org.jboss.as.server"/> | ||
<module name="org.jboss.modules"/> | ||
<module name="org.jboss.msc"/> | ||
<module name="org.jboss.logging"/> | ||
<module name="org.jboss.vfs"/> | ||
<module name="org.wildfly.extension.microprofile.config-smallrye" /> | ||
<module name="javax.enterprise.api" /> | ||
<module name="javax.annotation.api" /> | ||
</dependencies> | ||
</module> |
Oops, something went wrong.