This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch mm in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5b61a3e506bacb1f7396ae1958497a81dfe7876e Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Nov 15 20:42:00 2023 +0100 CAMEL-20105: camel-micromemter - Make it easier to configure for camel-main --- catalog/camel-allcomponents/pom.xml | 5 ++ components/camel-micrometer-prometheus/pom.xml | 99 ++++++++++++++++++++++ .../services/org/apache/camel/other.properties | 7 ++ .../generated/resources/micrometer-prometheus.json | 14 +++ .../src/test/resources/log4j2.properties | 2 +- .../src/test/resources/log4j2.properties | 2 +- components/pom.xml | 1 + parent/pom.xml | 11 +++ 8 files changed, 139 insertions(+), 2 deletions(-) diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml index 8934ec40a3e..4f900d74593 100644 --- a/catalog/camel-allcomponents/pom.xml +++ b/catalog/camel-allcomponents/pom.xml @@ -1152,6 +1152,11 @@ <artifactId>camel-micrometer</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-micrometer-prometheus</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-microprofile-config</artifactId> diff --git a/components/camel-micrometer-prometheus/pom.xml b/components/camel-micrometer-prometheus/pom.xml new file mode 100644 index 00000000000..0bbb96068f9 --- /dev/null +++ b/components/camel-micrometer-prometheus/pom.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.camel</groupId> + <artifactId>components</artifactId> + <version>4.3.0-SNAPSHOT</version> + </parent> + + <artifactId>camel-micrometer-prometheus</artifactId> + <packaging>jar</packaging> + <name>Camel :: Micrometer Prometheus</name> + <description>Camel Micrometer Prometheus</description> + + <properties> + <firstVersion>4.3.0</firstVersion> + </properties> + + <dependencies> + + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-micrometer</artifactId> + </dependency> + + <dependency> + <groupId>io.micrometer</groupId> + <artifactId>micrometer-registry-prometheus</artifactId> + </dependency> + + <!-- testing --> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-test-junit5</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-management</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-test-spring-junit5</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>hamcrest-core</artifactId> + <groupId>org.hamcrest</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>${hamcrest-version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>${assertj-version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.awaitility</groupId> + <artifactId>awaitility</artifactId> + <version>${awaitility-version}</version> + <scope>test</scope> + </dependency> + + </dependencies> + +</project> diff --git a/components/camel-micrometer-prometheus/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/components/camel-micrometer-prometheus/src/generated/resources/META-INF/services/org/apache/camel/other.properties new file mode 100644 index 00000000000..bb8c34ad8e2 --- /dev/null +++ b/components/camel-micrometer-prometheus/src/generated/resources/META-INF/services/org/apache/camel/other.properties @@ -0,0 +1,7 @@ +# Generated by camel build tools - do NOT edit this file! +name=micrometer-prometheus +groupId=org.apache.camel +artifactId=camel-micrometer-prometheus +version=4.3.0-SNAPSHOT +projectName=Camel :: Micrometer Prometheus +projectDescription=Camel Micrometer Prometheus diff --git a/components/camel-micrometer-prometheus/src/generated/resources/micrometer-prometheus.json b/components/camel-micrometer-prometheus/src/generated/resources/micrometer-prometheus.json new file mode 100644 index 00000000000..de860450126 --- /dev/null +++ b/components/camel-micrometer-prometheus/src/generated/resources/micrometer-prometheus.json @@ -0,0 +1,14 @@ +{ + "other": { + "kind": "other", + "name": "micrometer-prometheus", + "title": "Micrometer Prometheus", + "description": "Camel Micrometer Prometheus", + "deprecated": false, + "firstVersion": "4.3.0", + "supportLevel": "Preview", + "groupId": "org.apache.camel", + "artifactId": "camel-micrometer-prometheus", + "version": "4.3.0-SNAPSHOT" + } +} diff --git a/components/camel-micrometer/src/test/resources/log4j2.properties b/components/camel-micrometer-prometheus/src/test/resources/log4j2.properties similarity index 95% copy from components/camel-micrometer/src/test/resources/log4j2.properties copy to components/camel-micrometer-prometheus/src/test/resources/log4j2.properties index 821d95af17d..f24ae625ca1 100644 --- a/components/camel-micrometer/src/test/resources/log4j2.properties +++ b/components/camel-micrometer-prometheus/src/test/resources/log4j2.properties @@ -17,7 +17,7 @@ appender.file.type = File appender.file.name = file -appender.file.fileName = target/camel-test-metrics.log +appender.file.fileName = target/camel-test-micrometer-prometheus.log appender.file.layout.type = PatternLayout appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n appender.out.type = Console diff --git a/components/camel-micrometer/src/test/resources/log4j2.properties b/components/camel-micrometer/src/test/resources/log4j2.properties index 821d95af17d..c66346429d7 100644 --- a/components/camel-micrometer/src/test/resources/log4j2.properties +++ b/components/camel-micrometer/src/test/resources/log4j2.properties @@ -17,7 +17,7 @@ appender.file.type = File appender.file.name = file -appender.file.fileName = target/camel-test-metrics.log +appender.file.fileName = target/camel-test-micrometer.log appender.file.layout.type = PatternLayout appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n appender.out.type = Console diff --git a/components/pom.xml b/components/pom.xml index 1998de8521e..4c6883bf99c 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -205,6 +205,7 @@ <module>camel-mapstruct</module> <module>camel-metrics</module> <module>camel-micrometer</module> + <module>camel-micrometer-prometheus</module> <module>camel-microprofile</module> <module>camel-mina</module> <module>camel-minio</module> diff --git a/parent/pom.xml b/parent/pom.xml index 5f516cce023..64734e4ad97 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -1748,6 +1748,12 @@ <artifactId>camel-micrometer</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-micrometer-prometheus</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-microprofile-config</artifactId> @@ -2814,6 +2820,11 @@ <artifactId>micrometer-registry-jmx</artifactId> <version>${micrometer-version}</version> </dependency> + <dependency> + <groupId>io.micrometer</groupId> + <artifactId>micrometer-registry-prometheus</artifactId> + <version>${micrometer-version}</version> + </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-tracing</artifactId>