Skip to content

Zero-code instrumentation with ContentProvider #1144

@Doohl

Description

@Doohl

Thanks to the new OpenTelemetryRumInitializer it's now super easy to initialize OpenTelemetryRum with all the opinionated configs. But it would be nice if there was a true zero code solution for onboarding an existing Android app, like what we have in the backend world for otel today: https://opentelemetry.io/docs/concepts/instrumentation/zero-code/

I think the simplest way to accomplish this is with an Android ContentProvider, so that users can get the SDKs / exporters initialized without writing a single line of code. However, you do need to specify some configs somewhere, like:

  • Traces / Logs endpoints for the OtlpHttp*Exporters
  • Resource attribute customization
  • DiskBuffering / session provider configs

We can either have users provide these via a JSON file that's read as part of the ContentProvider initialization logic, or maybe have them provided via a Gradle plugin like:

openTelemetryRum {
   logsEndpoint = // blah //
   tracesEndpoint = // blah //
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions