-
Notifications
You must be signed in to change notification settings - Fork 12
1.0.0 Migration Guide
Tadaya Tsuyukubo edited this page Oct 20, 2022
·
4 revisions
This document describes migration steps for micrometer-docs-generator 1.0.0 GA from milestone/RC versions.
-
[Breaking change] Previously deprecated modules,
micrometer-docs-generator-metrics
,micrometer-docs-generator-spans
, andmicrometer-docs-generator-metrics
are removed. #67, #68
-
[Deprecation]
micrometer-docs-generator-metrics
andmicrometer-docs-generator-spans
are deprecated in favor of the new modulemicrometer-docs-generator
which generates both metrics and spans (and observation conventions) documents.
The new micrometer-docs-generator
plugin generates all metrics, spans, and observation conventions documents by default.
The main class also takes new optional parameters --metrics
, --spans
, and --conventions
.
When these parameters are presented, it generates only specified documents.
Changes to make:
- Use
micrometer-docs-generator
plugin - Specify
io.micrometer.docs.DocsGeneratorCommand
as themainClass
- No need to change the existing positional parameters (input dir, inclusion pattern, output dir)
Maven
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-docs</id>
<phase>prepare-package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>
io.micrometer.docs.DocsGeneratorCommand
</mainClass>
<includePluginDependencies>true</includePluginDependencies>
<arguments>
<argument>${micrometer-docs-generator.inputPath}</argument>
<argument>${micrometer-docs-generator.inclusionPattern}</argument>
<argument>${micrometer-docs-generator.outputPath}</argument>
</arguments>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-docs-generator</artifactId>
<version>${micrometer-docs-generator.version}</version>
<type>jar</type>
</dependency>
</dependencies>
</plugin>
Gradle
dependencies {
adoc "io.micrometer:micrometer-docs-generator:$micrometerDocsVersion"
}
task generateObservabilityDocs(type: JavaExec) {
mainClass = "io.micrometer.docs.DocsGeneratorCommand"
classpath configurations.adoc
// input folder, inclusion pattern, output folder
args project.rootDir.getAbsolutePath(), ".*", project.rootProject.buildDir.getAbsolutePath()
}