Migrating from quarkus-langfuse 0.10.0 and Earlier

Releases up to 0.10.0 were published as io.quarkiverse.langfuse:quarkus-langfuse, with the quarkus.langfuse. configuration prefix and the com.langfuse. and io.quarkiverse.langfuse Java packages. The extension is now published as io.quarkiverse.aitelemetry:quarkus-ai-telemetry-langfuse. An OpenRewrite recipe applies the whole change in one run.

quarkus update does not apply this recipe. It looks recipes up through the coordinates a project currently depends on, and the extension registry lists the old coordinates only up to 0.10.0. Run the recipe with the OpenRewrite build plugin as shown below.
The renamed artifacts require Quarkus 4.0 or later and Java 21 or later (see Compatibility). The recipe renames coordinates, keys and packages, but it does not upgrade Quarkus. A project still on Quarkus 3, which means the 0.9.x line of the extension or earlier, should move to Quarkus 4 first (for example with quarkus update) and then run the recipe. Otherwise the migrated project fails at startup.

Running the recipe

Commit or stash your changes first, so the diff only holds what the recipe did.

Maven

mvn org.openrewrite.maven:rewrite-maven-plugin:6.46.1:run \
  -Drewrite.recipeArtifactCoordinates=io.quarkiverse.aitelemetry:quarkus-ai-telemetry-migration:0.10.0 \
  -Drewrite.activeRecipes=io.quarkiverse.aitelemetry.migration.MigrateFromQuarkusLangfuse

Gradle

Save the following as rewrite.gradle outside the project:

initscript {
    repositories {
        maven { url = uri("https://plugins.gradle.org/m2") }
    }
    dependencies {
        classpath("org.openrewrite:plugin:7.39.0")
    }
}

rootProject {
    plugins.apply(org.openrewrite.gradle.RewritePlugin)
    dependencies {
        rewrite("io.quarkiverse.aitelemetry:quarkus-ai-telemetry-migration:0.10.0")
    }
    rewrite {
        activeRecipe("io.quarkiverse.aitelemetry.migration.MigrateFromQuarkusLangfuse")
    }
    afterEvaluate {
        if (repositories.isEmpty()) {
            repositories {
                mavenCentral()
            }
        }
    }
}

Then run:

./gradlew --init-script rewrite.gradle rewriteRun

The plugin versions (rewrite-maven-plugin 6.46.1 and rewrite-gradle-plugin 7.39.0) are the last releases published to Maven Central and match the OpenRewrite version the recipe is tested against. OpenRewrite now publishes newer releases elsewhere, so do not upgrade them.

What the recipe changes

  • Dependencies and BOM. quarkus-langfuse and quarkus-langfuse-deployment become quarkus-ai-telemetry-langfuse and quarkus-ai-telemetry-langfuse-deployment, and io.quarkiverse.aitelemetry:quarkus-ai-telemetry-bom is imported after your other BOMs. The migrated dependencies carry no version, because the BOM manages it. Version properties and variables that only the old dependencies used are removed.

  • Configuration keys. quarkus.langfuse. becomes quarkus.ai-telemetry.langfuse. in application*.properties, application*.yml, application*.yaml (profile files and %profile. keys included) and META-INF/microprofile-config.properties. ${quarkus.langfuse.} references in values and quarkus.log.category."io.quarkiverse.langfuse…​" entries are updated too. Flat quarkus.langfuse. keys in the data of ConfigMaps under src/main/kubernetes are renamed as well.

  • Environment variables. QUARKUS_LANGFUSE_* becomes QUARKUS_AI_TELEMETRY_LANGFUSE_* in .env files, Docker Compose files, src/main/kubernetes and src/main/docker.

  • Java and Kotlin packages. com.langfuse.api, com.langfuse.testcontainers and io.quarkiverse.langfuse (including runtime.otel, runtime.jackson and runtime.langchain4j) move to io.quarkiverse.aitelemetry.langfuse…​.

  • Quoted text in Java and Kotlin. Package names and quarkus.langfuse config keys inside string literals, for example @ConfigProperty(name = "quarkus.langfuse.base-url"), are renamed too.

After the run

  • Review the diff. In YAML files the renamed keys move to the end of the quarkus: section, comments inside that section can be lost, and a quoted dotted key can be split.

  • Build and test the project.

Limits

The recipe does not change the following. Update them by hand.

  • Environment variables and quarkus.langfuse.* keys set outside the repository, such as CI variables and Kubernetes secrets, and files the patterns above do not reach: CI workflows, manifests outside src/main/kubernetes, a root Dockerfile and documentation. base-url, public-key and secret-key have no defaults, so startup fails and names the missing key if only the old variables are set. An optional key set only through an old variable is ignored silently.

  • Maven: the BOM import is added to root POMs only, and a child POM keeps no explicit version after the run.

  • Gradle: projects that use a version catalog get the new version in the catalog rather than the BOM. Dependencies inside subprojects {} and allprojects {} keep an explicit, updated version. Catalogs declared in settings.gradle are not handled. A version variable that something else also uses is kept and updated.

  • Config keys in Java and Kotlin text that are built by joining strings, sit in the middle of longer text or are in text blocks, and QUARKUS_LANGFUSE_* names in code.

  • A string that holds only "io.quarkiverse.langfuse" is treated as a package name, although it may have been the old groupId.

Migrating by hand

Follow these steps if you cannot use the recipe. They match the recipe’s steps one for one.

  1. Replace the io.quarkiverse.langfuse:quarkus-langfuse dependency with io.quarkiverse.aitelemetry:quarkus-ai-telemetry-langfuse (and quarkus-langfuse-deployment with quarkus-ai-telemetry-langfuse-deployment), and import io.quarkiverse.aitelemetry:quarkus-ai-telemetry-bom so the version is managed.

  2. Rename every quarkus.langfuse. key to quarkus.ai-telemetry.langfuse., including %profile. keys and ${…​} references in values.

  3. Rename QUARKUS_LANGFUSE_* environment variables to QUARKUS_AI_TELEMETRY_LANGFUSE_* wherever they are set.

  4. Rename quarkus.log.category."io.quarkiverse.langfuse…​" entries to the new packages.

  5. Replace the package prefixes in imports and fully qualified names:

    • com.langfuse.api → io.quarkiverse.aitelemetry.langfuse.api

    • com.langfuse.testcontainers → io.quarkiverse.aitelemetry.langfuse.testcontainers

    • io.quarkiverse.langfuse.runtime.otel, .jackson and .langchain4j → io.quarkiverse.aitelemetry.langfuse.otel, .jackson and .langchain4j

    • io.quarkiverse.langfuse → io.quarkiverse.aitelemetry.langfuse

  6. Update config keys and package names inside string literals in Java and Kotlin sources.

The extension capability is now io.quarkiverse.aitelemetry.langfuse. The extension still provides the old io.quarkiverse.langfuse capability for compatibility, but it is deprecated and will be removed in a future release.