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-langfuseandquarkus-langfuse-deploymentbecomequarkus-ai-telemetry-langfuseandquarkus-ai-telemetry-langfuse-deployment, andio.quarkiverse.aitelemetry:quarkus-ai-telemetry-bomis 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.becomesquarkus.ai-telemetry.langfuse.inapplication*.properties,application*.yml,application*.yaml(profile files and%profile.keys included) andMETA-INF/microprofile-config.properties.${quarkus.langfuse.}references in values andquarkus.log.category."io.quarkiverse.langfuse…"entries are updated too. Flatquarkus.langfuse.keys in thedataof ConfigMaps undersrc/main/kubernetesare renamed as well. -
Environment variables.
QUARKUS_LANGFUSE_*becomesQUARKUS_AI_TELEMETRY_LANGFUSE_*in.envfiles, Docker Compose files,src/main/kubernetesandsrc/main/docker. -
Java and Kotlin packages.
com.langfuse.api,com.langfuse.testcontainersandio.quarkiverse.langfuse(includingruntime.otel,runtime.jacksonandruntime.langchain4j) move toio.quarkiverse.aitelemetry.langfuse…. -
Quoted text in Java and Kotlin. Package names and
quarkus.langfuseconfig 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 outsidesrc/main/kubernetes, a rootDockerfileand documentation.base-url,public-keyandsecret-keyhave 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 {}andallprojects {}keep an explicit, updated version. Catalogs declared insettings.gradleare 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.
-
Replace the
io.quarkiverse.langfuse:quarkus-langfusedependency withio.quarkiverse.aitelemetry:quarkus-ai-telemetry-langfuse(andquarkus-langfuse-deploymentwithquarkus-ai-telemetry-langfuse-deployment), and importio.quarkiverse.aitelemetry:quarkus-ai-telemetry-bomso the version is managed. -
Rename every
quarkus.langfuse.key toquarkus.ai-telemetry.langfuse., including%profile.keys and${…}references in values. -
Rename
QUARKUS_LANGFUSE_*environment variables toQUARKUS_AI_TELEMETRY_LANGFUSE_*wherever they are set. -
Rename
quarkus.log.category."io.quarkiverse.langfuse…"entries to the new packages. -
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,.jacksonand.langchain4j→io.quarkiverse.aitelemetry.langfuse.otel,.jacksonand.langchain4j -
io.quarkiverse.langfuse→io.quarkiverse.aitelemetry.langfuse
-
-
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.