You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support to install the core as a standalone background service that can be configured using the well-known Otel collector YAML file—optionally managed remotely via the OpAMP protocol and backends -see https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor. In this model, OpAMP handles the management of supported device capabilities, requests collector updates from the backend, and ultimately installs updates that provide new features or fixes through differential collector modules. This approach ensures that any application installed with Otel can send OTLP messages to the collector background service, which processes and exports the data upstream—whether managed locally or remotely.
Yes, in theory it’s possible to compile the OpenTelemetry (Otel) collector for Android and package it as an APK to run as a background service.
And the compilation once was working-see #10516
However, there are several practical considerations and potential challenges:
Cross-Compilation and Runtime Environment:
The Otel collector is primarily written in Go and is usually built as a standalone binary for server environments. While Go supports cross-compiling for Android, you’ll need to ensure that the runtime environment on Android is properly set up (for example, dealing with Android’s restrictions on background processes and services).
Minimal Module Footprint:
By including only essential modules (OTLP receiver, exporter, OpAMP, OAuth, etc.), you can reduce the footprint. This minimal configuration is crucial for mobile devices, which have tighter resource constraints compared to server environments.
Integration with Android Services:
An APK isn’t just a binary—it must conform to Android’s application and service lifecycle. You’ll likely need to create an Android wrapper (using Java/Kotlin or via a tool like gomobile) that correctly initializes and manages the Otel collector as a background service in accordance with Android’s guidelines and restrictions (especially regarding background execution, battery optimization, and permissions). This wrapper could be maintained in otel android project -see Modularize project so Android instrumentations can used by SDKs that provide their own OpenTelemetry instance opentelemetry-android#702 (comment)
OpAMP and Remote Management:
Implementing remote configuration (e.g., via OpAMP) is a promising approach, but ensure that the communication protocols and update mechanisms work reliably in the mobile context, where connectivity might be intermittent. You might also need to handle security aspects (such as OAuth) with particular care on mobile devices. See
Testing and Optimization:
Even with a minimal set of modules, extensive testing is necessary to ensure that the collector behaves as expected on Android. This includes verifying that it properly starts as a service, doesn’t interfere with other apps, and manages resources efficiently.
In summary, while compiling the Otel collector for Android as an APK with a minimal set of modules is feasible and could enable it to run as a background service, it will require additional engineering work to adapt it to the mobile ecosystem. This includes cross-compilation, proper integration with Android’s lifecycle and service management, and thorough testing under real-world conditions.
The text was updated successfully, but these errors were encountered:
Support to install the core as a standalone background service that can be configured using the well-known Otel collector YAML file—optionally managed remotely via the OpAMP protocol and backends -see https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/cmd/opampsupervisor. In this model, OpAMP handles the management of supported device capabilities, requests collector updates from the backend, and ultimately installs updates that provide new features or fixes through differential collector modules. This approach ensures that any application installed with Otel can send OTLP messages to the collector background service, which processes and exports the data upstream—whether managed locally or remotely.
Yes, in theory it’s possible to compile the OpenTelemetry (Otel) collector for Android and package it as an APK to run as a background service.
And the compilation once was working-see #10516
However, there are several practical considerations and potential challenges:
Cross-Compilation and Runtime Environment:
The Otel collector is primarily written in Go and is usually built as a standalone binary for server environments. While Go supports cross-compiling for Android, you’ll need to ensure that the runtime environment on Android is properly set up (for example, dealing with Android’s restrictions on background processes and services).
Minimal Module Footprint:
By including only essential modules (OTLP receiver, exporter, OpAMP, OAuth, etc.), you can reduce the footprint. This minimal configuration is crucial for mobile devices, which have tighter resource constraints compared to server environments.
Integration with Android Services:
An APK isn’t just a binary—it must conform to Android’s application and service lifecycle. You’ll likely need to create an Android wrapper (using Java/Kotlin or via a tool like gomobile) that correctly initializes and manages the Otel collector as a background service in accordance with Android’s guidelines and restrictions (especially regarding background execution, battery optimization, and permissions). This wrapper could be maintained in otel android project -see Modularize project so Android instrumentations can used by SDKs that provide their own OpenTelemetry instance opentelemetry-android#702 (comment)
OpAMP and Remote Management:
Implementing remote configuration (e.g., via OpAMP) is a promising approach, but ensure that the communication protocols and update mechanisms work reliably in the mobile context, where connectivity might be intermittent. You might also need to handle security aspects (such as OAuth) with particular care on mobile devices. See
Testing and Optimization:
Even with a minimal set of modules, extensive testing is necessary to ensure that the collector behaves as expected on Android. This includes verifying that it properly starts as a service, doesn’t interfere with other apps, and manages resources efficiently.
In summary, while compiling the Otel collector for Android as an APK with a minimal set of modules is feasible and could enable it to run as a background service, it will require additional engineering work to adapt it to the mobile ecosystem. This includes cross-compilation, proper integration with Android’s lifecycle and service management, and thorough testing under real-world conditions.
The text was updated successfully, but these errors were encountered: