You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/04/04 11:29:04 UTC

[camel] branch camel-3.x updated: CAMEL-19193 - Follow Micrometer meter naming conventions (#9803)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-3.x by this push:
     new e85ea9d6e3a CAMEL-19193 - Follow Micrometer meter naming conventions (#9803)
e85ea9d6e3a is described below

commit e85ea9d6e3a8c243d65ee53223db872a1a634252
Author: Gaƫlle Fournier <ga...@gmail.com>
AuthorDate: Tue Apr 4 13:28:51 2023 +0200

    CAMEL-19193 - Follow Micrometer meter naming conventions (#9803)
    
    * CAMEL-19193 - Follow Micrometer meter naming conventions (#9633)
    
    The existing JavaClassName style naming convention is not in keeping
    with the Micrometer naming convention.
    
    See https://micrometer.io/docs/concepts#_naming_meters for details.
    
    Co-authored-by: Dylan Piergies <Dy...@tesco.com>
    
    * CAMEL-19193 - Follow Micrometer meter naming conventions (#9633)
    
    Upgrade 3.20 to 3.21 guide update
    
    ---------
    
    Co-authored-by: Dylan Piergies <dy...@gmail.com>
    Co-authored-by: Dylan Piergies <Dy...@tesco.com>
---
 .../component/micrometer/MicrometerConstants.java  | 24 +++++++++++-----------
 .../ROOT/pages/camel-3x-upgrade-guide-3_21.adoc    | 19 +++++++++++++++++
 2 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/MicrometerConstants.java b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/MicrometerConstants.java
index 26aa6d189dd..67dd47b0b45 100644
--- a/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/MicrometerConstants.java
+++ b/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/MicrometerConstants.java
@@ -40,20 +40,20 @@ public final class MicrometerConstants {
     @Metadata(description = "To augment meter tags defined as URI parameters", javaType = "java.lang.Iterable<Tag>")
     public static final String HEADER_METRIC_TAGS = HEADER_PREFIX + "Tags";
 
-    public static final String DEFAULT_CAMEL_MESSAGE_HISTORY_METER_NAME = "CamelMessageHistory";
-    public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_FAILED_METER_NAME = "CamelExchangesFailed";
-    public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_SUCCEEDED_METER_NAME = "CamelExchangesSucceeded";
-    public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_TOTAL_METER_NAME = "CamelExchangesTotal";
+    public static final String DEFAULT_CAMEL_MESSAGE_HISTORY_METER_NAME = "camel.message.history";
+    public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_FAILED_METER_NAME = "camel.exchanges.failed";
+    public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_SUCCEEDED_METER_NAME = "camel.exchanges.succeeded";
+    public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_TOTAL_METER_NAME = "camel.exchanges.total";
     public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_FAILURES_HANDLED_METER_NAME
-            = "CamelExchangesFailuresHandled";
+            = "camel.exchanges.failures.handled";
     public static final String DEFAULT_CAMEL_ROUTE_POLICY_EXCHANGES_EXTERNAL_REDELIVERIES_METER_NAME
-            = "CamelExchangesExternalRedeliveries";
-    public static final String DEFAULT_CAMEL_ROUTE_POLICY_METER_NAME = "CamelRoutePolicy";
-    public static final String DEFAULT_CAMEL_ROUTE_POLICY_LONGMETER_NAME = "CamelRoutePolicyLongTask";
-    public static final String DEFAULT_CAMEL_EXCHANGE_EVENT_METER_NAME = "CamelExchangeEventNotifier";
-    public static final String DEFAULT_CAMEL_ROUTES_ADDED = "CamelRoutesAdded";
-    public static final String DEFAULT_CAMEL_ROUTES_RUNNING = "CamelRoutesRunning";
-    public static final String DEFAULT_CAMEL_ROUTES_EXCHANGES_INFLIGHT = "CamelExchangesInflight";
+            = "camel.exchanges.external.redeliveries";
+    public static final String DEFAULT_CAMEL_ROUTE_POLICY_METER_NAME = "camel.route.policy";
+    public static final String DEFAULT_CAMEL_ROUTE_POLICY_LONGMETER_NAME = "camel.route.policy.long.task";
+    public static final String DEFAULT_CAMEL_EXCHANGE_EVENT_METER_NAME = "camel.exchange.event.notifier";
+    public static final String DEFAULT_CAMEL_ROUTES_ADDED = "camel.routes.added";
+    public static final String DEFAULT_CAMEL_ROUTES_RUNNING = "camel.routes.running";
+    public static final String DEFAULT_CAMEL_ROUTES_EXCHANGES_INFLIGHT = "camel.exchanges.inflight";
 
     public static final String ROUTE_ID_TAG = "routeId";
     public static final String ROUTE_DESCRIPTION_TAG = "routeDescription";
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
index 731ddb207b1..fee1b06b194 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_21.adoc
@@ -116,6 +116,25 @@ The `certificatePath` parameter can now be specified as resource: for user point
 
 The deprecated option `componentName` was removed. Please use either `producerComponentName` or `consumerComponentName`.
 
+=== camel-micrometer
+
+The metrics has been renamed to follow Micrometer naming convention https://micrometer.io/docs/concepts#_naming_meters[Naming Meters].
+
+|===
+| Old Name | New Name
+| CamelExchangeEventNotifier | camel.exchange.event.notifier
+| CamelExchangesFailed | camel.exchanges.failed
+| CamelExchangesFailuresHandled | camel.exchanges.failures.handled
+| CamelExchangesInflight | camel.exchanges.external.redeliveries
+| CamelExchangesSucceeded | camel.exchanges.succeeded
+| CamelExchangesTotal | camel.exchanges.total
+| CamelMessageHistory | camel.message.history
+| CamelRoutePolicy | camel.route.policy
+| CamelRoutePolicyLongTask | camel.route.policy.long.task
+| CamelRoutesAdded | camel.routes.added
+| CamelRoutesRunning | camel.routes.running
+|===
+
 === Deprecated Components
 
 The following components that had been marked as deprecated, were removed in this release: