open-telemetry / opentelemetry-android

OpenTelemetry Tooling for Android
Apache License 2.0
150 stars 37 forks source link

Unable to ingest logs, traces from ANDROID, IOS App to Azure. #326

Closed manashbob closed 4 months ago

manashbob commented 6 months ago

We followed this to setup Opentelemetry in ANDROID and IOS app, but unable to ingest logs, traces to Azure Application Insights or to Azure Log Analytics Workspace. Is there any proper document or another code repo which we can refer to ingest logs, traces from Android and IOS apps to Azure?

LikeTheSalad commented 6 months ago

Hi @manashbob

Please can you provide more details on what guide you followed to set up Opentelemetry within your Android app?

At the moment OTel Android doesn't configure any exporter for logs. It's something that it should do in the future when it becomes stable, but for now, there would be some work needed to make it work. This gist should help give more info on how to do so in with the current state of OTel Android.

manashbob commented 5 months ago

Thank you @LikeTheSalad. My Dev Team followed https://github.com/open-telemetry/opentelemetry-android There is no way even to enable trace from Android using OTEL SDK?

LikeTheSalad commented 5 months ago

There is no way even to enable trace from Android using OTEL SDK?

Using both, the OTel Java SDK directly and also the Android SDK, it's possible to do tracing, logging, and sending metrics. Although at the moment it requires a fair amount of manual configuration to make it work. That's one of the reasons why the OTel Android project exists, to make the setup more straightforward for Android apps. However, OTel Android hasn't reached that level of maturity yet, so in the meantime, the options that you might want to take a look at are the following:

trask commented 5 months ago

Hi @manashbob, are you using the Azure Monitor OpenTelemetry Exporter, or another way to send the telemetry to Azure Monitor? Thanks

manashbob commented 5 months ago

Hi @trask, we tried this but no luck. Not sure what my Dev Team done integrating Opentelemetry SDK, they are even not able load libraries .

// OpenTelemetry API implementation 'io.opentelemetry:opentelemetry-api:1.35.0' // OpenTelemetry SDK implementation 'io.opentelemetry:opentelemetry-sdk:1.35.0' // Exporter for sending data to Azure Monitor implementation 'com.azure:azure-monitor-opentelemetry-exporter:1.0.0-beta.21'

If you have any specific document link which can help us setting of OTEL SDK and integrate Azure monitor, please share.

Thanks a lot!

mattmccleary commented 5 months ago

Hi @manashbob - there's no official documentation or support for this from the Azure side at this time, but we'd be happy to meet anyway to better understand what you want to achieve and see if we have any ideas for how to unblock you. Feel free to send an email to OTel@microsoft.com.

manashbob commented 5 months ago

Hi @mattmccleary , Thank you.

We are planning to retrieve traces, logs from Android and IOS app and forward it to Azure Application Insight or Azure Log Analytics Workspace, we referred https://github.com/open-telemetry/opentelemetry-android and https://www.alibabacloud.com/help/en/sls/user-guide/import-trace-data-from-android-apps-to-log-service-1?spm=a2c63.p38356.0.0.6c14634fbINu5f, but no luck. Even they didn’t see any error in app, but nothing captured in Application insight.

trask commented 4 months ago

hi @manashbob, I'd recommend opening this issue in https://github.com/Azure/azure-sdk-for-java (for the azure-monitor-opentelemetry-exporter component)

unfortunately it looks like currently the azure-monitor-opentelemetry-exporter uses Java APIs that are not supported by Android, and so some work will need to be done in order to support Android