Skip to content

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.

1.0.0

  • [Breaking change] Previously deprecated modules, micrometer-docs-generator-metrics,micrometer-docs-generator-spans, and micrometer-docs-generator-metrics are removed. #67, #68

1.0.0-RC1

  • [Deprecation] micrometer-docs-generator-metrics and micrometer-docs-generator-spans are deprecated in favor of the new module micrometer-docs-generator which generates both metrics and spans (and observation conventions) documents.

Migration from M7

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 the mainClass
  • 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()
}

Migration guides

1.0.0 Migration Guide

Clone this wiki locally