Skip to content

Conversation

@alexmihailov
Copy link
Contributor

While working with the Kanela "executor-service-capture-on-submit" module, I caught the ClassCastException, which I described in #1331. In this PR, I propose a solution to this problem by adding a configurable list of providers that will be able to provide the necessary wrappers over Runnable and Callable. This will help to avoid ClassCastException errors.

@hughsimpson
Copy link
Contributor

Sorry for letting this fall by the wayside. Taking a look now...

@hughsimpson
Copy link
Contributor

This is causing some issues with kamon-twitter-future

@alexmihailov
Copy link
Contributor Author

alexmihailov commented May 30, 2024

Hello! Thanks for watching my PR. I will try to fix the problems with the kamon-twitter-future module

@alexmihailov alexmihailov force-pushed the feature/fix-slick-kamon branch 3 times, most recently from 4b2b439 to d764145 Compare June 4, 2024 15:22
@alexmihailov alexmihailov force-pushed the feature/fix-slick-kamon branch from d764145 to 0a7b75c Compare June 4, 2024 15:23
@alexmihailov
Copy link
Contributor Author

Hi, @hughsimpson! The mistake was that in Scala 3, the PrioritizedRunnable interface in the Slick library was sealed. Therefore, I have removed the edits from the kamon-jdbc module. In my laptop, all tests for kamon-jdbc passed.

@alexmihailov
Copy link
Contributor Author

Thus, it is possible to write providers, and their implementation will be left to the user for the time being. In my case, I am using Scala 2.13 and am able to extend PrioritizedRunnable.

@hughsimpson
Copy link
Contributor

Nice, thanks for fixing the tests

@hughsimpson hughsimpson merged commit bdf963e into kamon-io:master Jun 5, 2024
@hughsimpson
Copy link
Contributor

I did like the idea of the slick instrumentation, though. Would be good to get that in at some point

@alexmihailov
Copy link
Contributor Author

I will try to do PR with edits for Slick and think about how I can do them for Scala 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants