Repository navigation
Conversation
kamon-play is built against Play 2.8 and depends on the Akka modules, so it can't be built for Scala 3. kamon-play3 supports only Play 3 (Pekko) and is cross-built for Scala 2.13 and 3. Advices use the class plus @static pattern because Scala 3 static forwarders drop parameter annotations. Fixes kamon-io#1418 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1418
kamon-play is built against Play 2.8 and depends on kamon-akka and kamon-akka-http, neither of which is built for Scala 3, so kamon-play can't be cross-built for Scala 3.
This adds a
kamon-play3module that supports only Play 3 (Pekko) and is cross-built for Scala 2.13 and 3. kamon-play is unchanged.kamon.instrumentation.play.*config keys are unchanged, so Play 3 users only need to swap the dependency.@staticpattern, since Scala 3 static forwarders drop parameter annotations (same issue as [kamon-pekko-connectors-kafka] Kamon 2.8.1 throws IllegalStateException when using pekko-connectors-kafka 1.1.0 #1416). The connection timestamp is now captured in the constructor advice, rather than with the object-basedCaptureCurrentTimestampOnExit.HasServerInstrumentation.Mixinvarconstructor params became explicit methods. Scala 3 rejects avaroverriding a()method.test-commonspecs run against Play 3.0.7. Early initializers were replaced with constructor params, andresponse.bodywithresponse.body[String](ambiguous implicit on Scala 3).kamon-play3is not added to the bundles. It shares class names with kamon-play, so the two shouldn't be on the same classpath.Tested locally:
kamon-play3/testpasses on 2.13.13 and 3.3.5 (18 tests each).🤖 Generated with Claude Code