-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for indirect use via android library #142
Comments
Thank you for your feedback, @bbetter If I understood correctly, it seems like manually adding the Elastic SDK into your library should sort your use case. We still haven't documented how to do so, but the dependency looks like the following: implementation "co.elastic.apm:android-sdk:0.4.0" The version will always match the Gradle plugin version. After adding the SDK to your library, you can initialize it from there and it should work the same as if you'd have initialized it from your application. Bear in mind that, regardless of whether you initialize it from your application or your library, it is still recommended to apply the Gradle plugin into your application so that you can get access to the compile-time gradle configuration options, as well as automatic instrumentation support. |
Great to see some answer, thanks. |
The decision to have the min SDK version as 26 was made to make the setup process more straightforward and avoiding crashes on older devices. The reason why lowering it would make things more complicated is that the OpenTelemetry SDK uses some classes added in Java 8, which are not available on Android OS versions < Api level 26, on those devices the app would crash with a There's a way to avoid this, though it would require adding extra dependencies and doing some extra compilation work as well, all of the details are explained in here. We also weren't too sure if the API 26 was too "restrictive", since it seems to be available since mid 2017, so we ultimately ended up setting it as the min one and review that decision later in case some customers would require to lower it. So based on it, I'm curious to know about your opinion on whether using the API level 26 nowadays is still too soon in general? If that's the case, we'll consider lowering it to 24. |
It might be just our specific scenario to have to use a bit older version . So you're saying if I override library also about this
can I create this file by myself somewhere in my library root and let it be bundle with app for example |
That's correct.
It's not impossible without the plugin, I'll create a couple of tickets to work on making the manual configuration smoother but in the meantime what you could do is:
It should make it work for now. We're continuously making new releases as we're still not GA, so the manual implementation process should improve quite soon. |
I have multimodule application and I don't want to inject arm directly inside app module
Instead I want to be able to connect it to my android library module and abstract away lib initialization
The text was updated successfully, but these errors were encountered: