diff --git a/bin/main/META-INF/rewrite/category.yml b/bin/main/META-INF/rewrite/category.yml new file mode 100644 index 0000000..f0e0eaa --- /dev/null +++ b/bin/main/META-INF/rewrite/category.yml @@ -0,0 +1,21 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# 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. +# + +--- +type: specs.openrewrite.org/v1beta/category +name: Micrometer +packageName: org.openrewrite.micrometer +description: Recipes to perform [Micrometer](https://micrometer.io/) migration tasks. diff --git a/bin/main/META-INF/rewrite/micrometer-13.yml b/bin/main/META-INF/rewrite/micrometer-13.yml new file mode 100644 index 0000000..a635256 --- /dev/null +++ b/bin/main/META-INF/rewrite/micrometer-13.yml @@ -0,0 +1,38 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# 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. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.micrometer.UpgradeMicrometer_1_13 +displayName: Migrate to Micrometer 1.13 +description: >- + Migrate applications to the latest Micrometer 1.13 release. This recipe will modify an + application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have + changes between versions as described in the [Micrometer 1.13 migration guide](https://github.com/micrometer-metrics/micrometer/wiki/1.13-Migration-Guide). +tags: + - micrometer +recipeList: + - org.openrewrite.java.dependencies.UpgradeDependencyVersion: + groupId: io.micrometer + artifactId: '*' + newVersion: 1.13.x + - org.openrewrite.java.ChangePackage: + oldPackageName: io.micrometer.prometheus + newPackageName: io.micrometer.prometheusmetrics + - org.openrewrite.java.ChangeType: + oldFullyQualifiedTypeName: io.prometheus.client.CollectorRegistry + newFullyQualifiedTypeName: io.prometheus.metrics.model.registry.PrometheusRegistry + diff --git a/bin/main/META-INF/rewrite/micrometer.yml b/bin/main/META-INF/rewrite/micrometer.yml new file mode 100644 index 0000000..09eedc2 --- /dev/null +++ b/bin/main/META-INF/rewrite/micrometer.yml @@ -0,0 +1,23 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# 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. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.micrometer.UpgradeMicrometer +displayName: Upgrade Micrometer +description: This recipe will apply changes commonly needed when migrating Micrometer. +recipeList: + - org.openrewrite.micrometer.UpgradeMicrometer_1_13 diff --git a/bin/main/META-INF/rewrite/misk.yml b/bin/main/META-INF/rewrite/misk.yml new file mode 100644 index 0000000..98e9566 --- /dev/null +++ b/bin/main/META-INF/rewrite/misk.yml @@ -0,0 +1,24 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# 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. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.micrometer.misk.MigrateMiskToMicrometer +displayName: Migrate Misk metrics to Micrometer +description: This recipe will move Misk metrics to Micrometer, where that is possible to do without a loss of fidelity. +recipeList: + - org.openrewrite.micrometer.misk.NoExplicitEmptyLabelList + - org.openrewrite.micrometer.misk.MigrateEmptyLabelMiskCounter