Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providers for Runnable and Callable wrappers when using Kanela "executor-service-capture-on-submit" module #1333

Merged
merged 1 commit into from
Jun 5, 2024

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
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
2 checks passed
@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