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

Remove animalsniffer from auto-instrumentation subprojects #138

Closed
LikeTheSalad opened this issue Nov 2, 2023 · 0 comments · Fixed by #147
Closed

Remove animalsniffer from auto-instrumentation subprojects #138

LikeTheSalad opened this issue Nov 2, 2023 · 0 comments · Fixed by #147

Comments

@LikeTheSalad
Copy link
Contributor

LikeTheSalad commented Nov 2, 2023

The automatic instrumentation tools in this project are opt-in, so users would have to manually add them on top of the core lib in order to use them in their projects. While the core lib must remain compatible with our minimum API version, it might not be the case for auto-instrumentation ones, since those could target code that became available in newer API versions, such as the http URLConnection methods added in API 24 that are mentioned here.

In this example, the host project's code is inspected to look for usages of URLConnection methods in order to replace them with wrappers, so if a host project with a min API lower than 24 (21 for example) gets this auto-instrumentation added, then the instrumentation would never have to replace methods that aren't available on API 21, even though it could if it found them. So in that sense, making the httpurlconnection auto-instrumentation unaware of API limitations shouldn't cause issues, although we should validate in tests that for projects with lower APIs there won't be any runtime exceptions due to no methods found when the wrapper class is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant