Skip to content

Instrumentation for redisson 3.17.2 - #6096

Merged
trask merged 4 commits into
open-telemetry:mainfrom
laurit:redisson-3.17.2
May 26, 2022
Merged

Instrumentation for redisson 3.17.2#6096
trask merged 4 commits into
open-telemetry:mainfrom
laurit:redisson-3.17.2

Conversation

@laurit

@laurit laurit commented May 25, 2022

Copy link
Copy Markdown
Contributor

No description provided.

@laurit
laurit requested a review from a team May 25, 2022 20:50
Comment on lines +9 to +10
versions.set("[3.17.2,)")
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add assertInverse and cross-test against the earlier instrumentation?

I'm wondering if the version split will be cleaner at 3.16.8

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially used 3.16.8 and decided to go with 3.17.2 because testing for org.redisson.misc.RPromise seemed better than using an arbitrary class. assertInverse is problematic, apparently it is hard to distinguish 3.x from earlier versions. If I didn't mess anything up then 3.0.0 and 2.5.0 contain exactly the same classes, even all the inner class names match.
Our current approach of detecting version based on the presence or absence of some class resources is slightly flawed. It fails when a child class loader has a different version of the library than what the parent class loader has or if multiple versions of the same library are present in the same class loader.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially used 3.16.8 and decided to go with 3.17.2 because testing for org.redisson.misc.RPromise seemed better than using an arbitrary class

I almost find using RPromise more confusing because it was really dropped from our instrumentation in 3.16.8

how about breaking it on 3.17.0 (which would be a bonus to avoid breaking it on patch version)? looks like RFunction might be a good option for that detection: https://github.com/redisson/redisson/releases/tag/redisson-3.17.0

assertInverse is problematic, apparently it is hard to distinguish 3.x from earlier versions

we could add it to the 3.17 instrumentation module though?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, 3.17 is the most reasonable option. Thanks for tracking down RFunction.

@trask trask left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread instrumentation/redisson/redisson-3.0/javaagent/build.gradle.kts Outdated
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
@trask
trask merged commit efd40f8 into open-telemetry:main May 26, 2022
@laurit
laurit deleted the redisson-3.17.2 branch May 26, 2022 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants