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

Logger behaviour #234

Open
AntonyARHS opened this issue Nov 7, 2023 · 2 comments
Open

Logger behaviour #234

AntonyARHS opened this issue Nov 7, 2023 · 2 comments

Comments

@AntonyARHS
Copy link

Hello,

I'm not sure if I'm finding the right information in the Elastic APM Agent documentation.

Does it collect/upload all the logs generated by the application (using Log.i, Log.d etc...)?

If yes what is the strategy followed by the agent to save them, sending them.. ?

Thank you very much,

@LikeTheSalad
Copy link
Contributor

Hi @AntonyARHS

At the moment we're not automatically sending logs, we are however thinking about adding that functionality in the future. In the meantime, you could still send them manually by using OTel's API like so:

Logger logger = GlobalOpenTelemetry.get().getLogsBridge().get("LOG_TAG");
logger.logRecordBuilder()
    .setTimestamp(System.currentTimeMillis(), TimeUnit.MILLISECONDS)
    .setBody("My log body")
    .emit();

I hope it helps!

@ghilainm
Copy link

ghilainm commented Nov 8, 2023

Hope we will see this feature soon as well as support for Android Compose system, that would be so nice ⭐

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

No branches or pull requests

3 participants