# Post logs from a mobile application

**URL:** <https://community.dynatrace.com/t/post-logs-from-a-mobile-application/39010>\
**Category:** Real User Monitoring\
**Tags:** mobile-monitoring, log-monitoring-class\
**Created:** [March 27, 2023, 8:26am UTC](https://community.dynatrace.com/t/post-logs-from-a-mobile-application/39010 "2023-03-27T08:26:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashishrawat](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@ashishrawat](https://community.dynatrace.com/u/ashishrawat)\
**Post date:** [March 27, 2023, 8:26am UTC](https://community.dynatrace.com/t/post-logs-from-a-mobile-application/39010/1 "2023-03-27T08:26:49Z")

</div>

Hi Colleagues, We are using Dynatrace to instrument the mobile application. Is it possible to share the log from Android ADB via an API, if yes then how?

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [March 27, 2023, 9:02am UTC](https://community.dynatrace.com/t/post-logs-from-a-mobile-application/39010/2 "2023-03-27T09:02:10Z")

</div>

You could use the&nbsp;[Log Monitoring APIs Ingest Endpoint](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/log-monitoring-v2/post-ingest-logs), but that’s probably not a good idea with a (limited) mobile connection.

Instead you can use the&nbsp;[OneAgent SDK vor Andoird](https://www.dynatrace.com/support/help/platform-modules/digital-experience/mobile-applications/instrument-android-app/instrumentation-via-oneagent-sdk/oneagent-sdk-for-android)&nbsp; ([or iOS](https://www.dynatrace.com/support/help/platform-modules/digital-experience/mobile-applications/instrument-ios-app/customization/oneagent-sdk-for-ios)) to report values, errors or events for the information you want to have in dynatrace.

---

<div class="post-metadata">

**Author:** ![ashishrawat](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@ashishrawat](https://community.dynatrace.com/u/ashishrawat)\
**Post date:** [March 27, 2023, 9:44am UTC](https://community.dynatrace.com/t/post-logs-from-a-mobile-application/39010/3 "2023-03-27T09:44:56Z")

</div>

In API ingestion, how can i get the value of fields activegate domain and environment id

https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/logs/ingest, while creating the app we only get the beacon url eg

```auto
https:/*.observability.cloud.sap:9999/mbeacon/cns-d2

```

If i use oneAgent SDK.

Can we switch on/off the oneAgent SDK reporting on will as we don’t want it to log in production unless there is an issue reported ?

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [March 27, 2023, 10:12am UTC](https://community.dynatrace.com/t/post-logs-from-a-mobile-application/39010/4 "2023-03-27T10:12:09Z")

</div>

Domain would be the same as the beacon URL, the environment ID you can get from your dynatrace URL when you are in the environment. More Information [in the Docs](https://www.dynatrace.com/support/help/shortlink/environment-id).

Probably not possible with a flag you enable on the fly. But if you report only error events, you could leave it on all the time anyway.
