You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2020/10/24 19:57:10 UTC
svn commit: r1067095 - in /websites/production/cxf/content:
cache/docs.pageCache docs/micrometer.html
Author: buildbot
Date: Sat Oct 24 19:57:10 2020
New Revision: 1067095
Log:
Production update by buildbot for cxf
Modified:
websites/production/cxf/content/cache/docs.pageCache
websites/production/cxf/content/docs/micrometer.html
Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/cxf/content/docs/micrometer.html
==============================================================================
--- websites/production/cxf/content/docs/micrometer.html (original)
+++ websites/production/cxf/content/docs/micrometer.html Sat Oct 24 19:57:10 2020
@@ -28,6 +28,16 @@
<meta name="description" content="Apache CXF, Services Framework - Micrometer">
+<link type="text/css" rel="stylesheet" href="/resources/highlighter/styles/shCoreCXF.css">
+<link type="text/css" rel="stylesheet" href="/resources/highlighter/styles/shThemeCXF.css">
+
+<script src='/resources/highlighter/scripts/shCore.js'></script>
+<script src='/resources/highlighter/scripts/shBrushJava.js'></script>
+<script src='/resources/highlighter/scripts/shBrushBash.js'></script>
+<script>
+ SyntaxHighlighter.defaults['toolbar'] = false;
+ SyntaxHighlighter.all();
+</script>
<title>
@@ -108,13 +118,29 @@ Apache CXF -- Micrometer
<!-- Content -->
<div class="wiki-content">
<div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1603238345790 {padding: 0px;}
-div.rbtoc1603238345790 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1603238345790 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1603238345790">
-<ul class="toc-indentation"><li><a shape="rect" href="#Micrometer-MetricsProvider">Metrics Provider</a></li><li><a shape="rect" href="#Micrometer-IntegrationwithJAX-WS">Integration with JAX-WS</a></li><li><a shape="rect" href="#Micrometer-IntegrationwithJAX-RS">Integration with JAX-RS</a></li></ul>
-</div><h2 id="Micrometer-MetricsProvider">Metrics Provider</h2><h2 id="Micrometer-IntegrationwithJAX-WS">Integration with JAX-WS</h2><h2 id="Micrometer-IntegrationwithJAX-RS">Integration with JAX-RS</h2></div>
+div.rbtoc1603569390228 {padding: 0px;}
+div.rbtoc1603569390228 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1603569390228 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1603569390228">
+<ul class="toc-indentation"><li><a shape="rect" href="#Micrometer-MetricsProvider">Metrics Provider</a></li><li><a shape="rect" href="#Micrometer-Configuration">Configuration</a></li><li><a shape="rect" href="#Micrometer-IntegrationwithJAX-WS">Integration with JAX-WS</a></li><li><a shape="rect" href="#Micrometer-IntegrationwithJAX-RS">Integration with JAX-RS</a></li></ul>
+</div><h2 id="Micrometer-MetricsProvider">Metrics Provider</h2><p>The <a shape="rect" class="external-link" href="https://micrometer.io/" rel="nofollow">Micrometer</a> integration is provided by <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/metrics/src/main/java/org/apache/cxf/metrics/micrometer/MicrometerMetricsProvider.java" rel="nofollow">MicrometerMetricsProvider</a>.</p><h2 id="Micrometer-Configuration">Configuration</h2><p>There <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/metrics/src/main/java/org/apache/cxf/metrics/micrometer/MicrometerMetricsProvider.java" rel="nofollow">MicrometerMetricsProvider</a> supports the following properties (encapsulated inside <a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/metrics/src/main/java/org/apache/cxf/metrics/micrometer/MicrometerMetricsProperties.java" rel="nofollow">MicrometerMetrics
Properties</a>).</p><div class="table-wrap"><table class="wrapped confluenceTable"><colgroup span="1"><col span="1"><col span="1"><col span="1"></colgroup><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Property</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th><th colspan="1" rowspan="1" class="confluenceTh">Default</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>autoTimeRequests</strong></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether requests handled by CXF should be automatically timed.  If the number of time series emitted grows <br clear="none">too large on account of request mapping timings, set it to "false" and use <a shape="rect" class="external-link" href="https://github.com/micrometer-metrics/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/annotation/Timed.java" rel="nofollow">@Timed</a> or <a shape="rect" class="external-link" href="https://github.com/micrometer-metric
s/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/annotation/TimedSet.java" rel="nofollow">@TimeSet</a> on a per <br clear="none">invocation basis as needed.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>true</strong></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>requestsMetricName</strong></td><td colspan="1" rowspan="1" class="confluenceTd">Name of the metric for received requests</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>cxf.server.requests</strong></td></tr></tbody></table></div><h2 id="Micrometer-IntegrationwithJAX-WS">Integration with JAX-WS</h2><p>The typical way to plug <a shape="rect" class="external-link" href="https://micrometer.io/" rel="nofollow">Micrometer</a> integration is by using <a shape="rect" class="external-link" href="https://docs.oracle.com/javase/7/docs/api/javax/xml/ws/WebServiceFeature.html" rel="nofollow">WebServiceFeature</a> mechanism, for which there is a dedicated <a
shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/rt/features/metrics/src/main/java/org/apache/cxf/metrics/MetricsFeature.java" rel="nofollow">MetricsFeature</a> implementation. The snipped below illustrated the basic initialization sequence and set of the dependencies involved.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default">final MeterRegistry registry = ...; /* Micrometer MeterRegistry instance */
+
+final JaxwsTags jaxwsTags = new JaxwsTags();
+final TagsCustomizer operationsCustomizer = new JaxwsOperationTagsCustomizer(jaxwsTags);
+final TagsCustomizer faultsCustomizer = new JaxwsFaultCodeTagsCustomizer(jaxwsTags, new JaxwsFaultCodeProvider());
+
+final TagsProvider tagsProvider = new StandardTagsProvider(new DefaultExceptionClassProvider(), new StandardTags());
+final MicrometerMetricsProperties properties = new MicrometerMetricsProperties();
+
+final MetricsProvider metricsProvider = new MicrometerMetricsProvider(registry, tagsProvider,
+ Arrays.asList(operationsCustomizer, faultsCustomizer), new DefaultTimedAnnotationProvider(), properties);
+
+EndpointImpl endpoint = new EndpointImpl(bus, new HelloPortImpl(), null, null, new WebServiceFeature[]{
+ new MetricsFeature(metricsProvider)
+});</pre>
+</div></div><p><br clear="none"></p><h2 id="Micrometer-IntegrationwithJAX-RS">Integration with JAX-RS</h2></div>
</div>
<!-- Content -->
</td>