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

[BUG] Crashes on Android #43876

Open
3 tasks done
mmarczell-graphisoft opened this issue Jan 22, 2025 · 3 comments
Open
3 tasks done

[BUG] Crashes on Android #43876

mmarczell-graphisoft opened this issue Jan 22, 2025 · 3 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter OpenTelemetry OpenTelemetry instrumentation question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@mmarczell-graphisoft
Copy link

Describe the bug
I would like to use the Azure Monitor OTel Exporter on Android, but it crashes on initialization.

Exception or Stack Trace

FATAL EXCEPTION: main
Process: com.graphisoft.bimx, PID: 4969
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/management/ManagementFactory;
at com.azure.monitor.opentelemetry.exporter.implementation.utils.SystemInformation.initializeProcessId(SystemInformation.java:47)
at com.azure.monitor.opentelemetry.exporter.implementation.utils.SystemInformation.<clinit>(SystemInformation.java:28)
at com.azure.monitor.opentelemetry.exporter.implementation.statsbeat.CustomDimensions.initOperatingSystem(CustomDimensions.java:59)
at com.azure.monitor.opentelemetry.exporter.implementation.statsbeat.CustomDimensions.<init>(CustomDimensions.java:24)
at com.azure.monitor.opentelemetry.exporter.implementation.statsbeat.StatsbeatModule.<init>(StatsbeatModule.java:42)
at com.azure.monitor.opentelemetry.exporter.AzureMonitorExporterBuilder.initStatsbeatModule(AzureMonitorExporterBuilder.java:203)
at com.azure.monitor.opentelemetry.exporter.AzureMonitorExporterBuilder.initializeIfNot(AzureMonitorExporterBuilder.java:84)
at com.azure.monitor.opentelemetry.exporter.AzureMonitorExporter.lambda$customize$1(AzureMonitorExporter.java:65)
at com.azure.monitor.opentelemetry.exporter.AzureMonitorExporter$$ExternalSyntheticLambda1.apply(D8$$SyntheticClass:0)
at com.graphisoft.bimx.common.EmbraceCustomizer.addSpanExporterCustomizer(CMNNetLoggerImpl.java:113)
at com.azure.monitor.opentelemetry.exporter.AzureMonitorExporter.customize(AzureMonitorExporter.java:63)
at com.azure.monitor.opentelemetry.exporter.AzureMonitorExporter.customize(AzureMonitorExporter.java:44)

To Reproduce
Call AzureMonitorExporter.customize

Code Snippet

AzureMonitorExporter.customize(customizer, "...");

Expected behavior
No crash

Setup (please complete the following information):

  • OS: Android
  • IDE: Android Studio
  • Library/Libraries: 'com.azure:azure-monitor-opentelemetry-exporter:1.0.0-beta.31'
  • Java version: Android 14

Additional context
java.lang.management is not available on Android. Please provide a fallback implementation on this platform.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 22, 2025
@joshfree joshfree added OpenTelemetry OpenTelemetry instrumentation Monitor - Exporter Monitor OpenTelemetry Exporter labels Jan 27, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 27, 2025
@joshfree
Copy link
Member

@trask @lmolkova could you follow up with @mmarczell-graphisoft

@mmarczell-graphisoft
Copy link
Author

By the way I fixed the crash in my fork at mmarczell-graphisoft@bdda89e

(But I don't know how to make the fix platform dependent, so that it uses the java.lang.management API where available but the Android specific API on Android.)

@trask
Copy link
Member

trask commented Jan 28, 2025

hi @mmarczell-graphisoft, unfortunately Azure Monitor OTel Exporter / Autoconfigure doesn't support Android at this time

cc @mattmccleary @ramthi @rajkumar-rangaraj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Exporter Monitor OpenTelemetry Exporter OpenTelemetry OpenTelemetry instrumentation question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants