{"id":28024399,"url":"https://github.com/instana/android-agent","last_synced_at":"2025-05-11T02:09:21.909Z","repository":{"id":47648984,"uuid":"81942955","full_name":"instana/android-agent","owner":"instana","description":"Gather end-user Android app performance data","archived":false,"fork":false,"pushed_at":"2025-04-10T10:36:28.000Z","size":1277,"stargazers_count":22,"open_issues_count":0,"forks_count":4,"subscribers_count":60,"default_branch":"master","last_synced_at":"2025-05-11T02:09:15.211Z","etag":null,"topics":["analytics","android","http-requests","instana","mobile-app","performance"],"latest_commit_sha":null,"homepage":"https://www.instana.com","language":"Kotlin","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instana.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-14T12:26:44.000Z","updated_at":"2025-04-17T06:45:56.000Z","dependencies_parsed_at":"2023-12-07T10:32:18.658Z","dependency_job_id":"ac3c5401-ec51-47ae-ae37-d552016468dc","html_url":"https://github.com/instana/android-agent","commit_stats":null,"previous_names":[],"tags_count":117,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Fandroid-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Fandroid-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Fandroid-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instana%2Fandroid-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instana","download_url":"https://codeload.github.com/instana/android-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253505665,"owners_count":21918942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","android","http-requests","instana","mobile-app","performance"],"created_at":"2025-05-11T02:09:21.273Z","updated_at":"2025-05-11T02:09:21.834Z","avatar_url":"https://github.com/instana.png","language":"Kotlin","readme":"# Android Instana Agent \u003ca href=\"https://mvnrepository.com/artifact/com.instana/android-agent-plugin\"\u003e\u003cimg alt=\"Maven Central\" src=\"https://img.shields.io/maven-central/v/com.instana/android-agent-plugin?color=0db4b3\"\u003e\u003c/a\u003e\n\n**[Changelog](CHANGELOG.md)** |\n**[Contributing](CONTRIBUTING.md)** |\n**[Support](https://ibm.biz/Instana-support)**\n\n---\n\n## Requirements\n\n- Android 4.1+ (API level 16+) \n- Java 8+ \n- Gradle 7.3.3+\n- AndroidX\n- targetSdk 33+\n\nNote:\n  If you have to use Gradle version lower than 7.3.3 in your project, please use android-agent version lower than 6.0.0.\n\n## Getting started\n\nPlease head over to the [official Instana Mobile App Monitoring documentation](https://ibm.biz/android-monitoring-api) to get all the details about the usage of Instana Android Agent.\n\nFor a quick start with a minimum configuration, the following steps shall suffice:\n\n### Before beginning\n\nMake sure that the Google and MavenCentral repositories are included in your project-level `build.gradle` file:\n\n```groovy\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\nallprojects {\n    repositories {\n        google()\n        mavenCentral()\n    }\n}\n```\n\n### Step 1. Add Instana Agent SDK to your app\nIn your module (app-level) Gradle file (usually `app/build.gradle`):\n```groovy\ndependencies {\n    implementation 'com.instana:android-agent-runtime:6.2.1'\n}\n```\nWhile using kotlin-scripts, In (app-level) Gradle file (usually `app/build.gradle.kts`):\n```groovy\ndependencies {\n  implementation(\"com.instana:android-agent-runtime:6.2.1\")\n}\n```\n\n\n### Step 2. Add Instana Agent Plugin to your app\nIn your module (app-level) Gradle file (usually `app/build.gradle`), after applying the `com.android.application` plugin:\n```groovy\napply plugin: 'com.android.application'\napply plugin: 'com.instana.android-agent-plugin'\n```\nWhile using kotlin-scripts, In (app-level) Gradle file (usually `app/build.gradle.kts`):\n```groovy\nplugins {\n  id(\"com.android.application\")\n  id(\"com.instana.android-agent-plugin\")\n}\n```\n\nIn your module (app-level) Gradle file (usually `app/build.gradle`):\n```groovy\nbuildscript {\n    repositories {\n        google()\n        mavenCentral()\n    }\n    dependencies {\n        classpath \"com.instana:android-agent-plugin:6.2.1\"\n    }\n}\n```\nWhile using kotlin-scripts, In (project-level) Gradle file (usually `/build.gradle.kts`):\n```groovy\nbuildscript {\n  dependencies {\n    classpath(\"com.instana:android-agent-plugin:6.2.1\")\n  }\n}\n```\n\n### Step 3. Initialize Instana Agent when your app starts\n\nIn your class extending `Application`, replace `YOUR_REPORTING_URL` and `YOUR_APP_KEY` with the configuration values you'll find in your Instana Dashboard:\n```kotlin\nclass MyApplication : Application() {\n    override fun onCreate() {\n        super.onCreate()\n        Instana.setup(\n            this,\n            InstanaConfig(\n                reportingURL = \"YOUR_REPORTING_URL\",\n                key = \"YOUR_APP_KEY\"\n            )\n        )\n    }\n}\n```\n\n### Step 4. Add Java 1.8 compatibility\n\nNote: this step is not required if your `minSdkVersion` is 24 or higher\n\nIn your module (app-level) Gradle file (usually `app/build.gradle`):\n```groovy\nandroid {\n    compileOptions {\n        sourceCompatibility JavaVersion.VERSION_1_8\n        targetCompatibility JavaVersion.VERSION_1_8\n    }\n}\n```\n\n### Step 5 (optional). Request READ_PHONE_STATE permission\n\nWhen a user accesses the Internet through a cellular network, Instana Agent has the ability to report the specific type of cellular network. \n\nIn order to enable the reporting of the cellular network type, your app needs to request the `READ_PHONE_STATE` permission. Please refer to the [`Request App Permissions` section in the official Android documentation](https://developer.android.com/training/permissions/requesting). \n\nIf your app doesn't request the permission or if the user declines it, Instana Agent will simply not report the cellular network type. \n\n### Supported network clients\n\nInstana Android Agent is currently capable of automatically tracking events for the following network clients:\n- [OkHttp3](https://square.github.io/okhttp/)\n- [HttpURLConnection](https://developer.android.com/reference/java/net/HttpURLConnection)\n- [Retrofit](https://square.github.io/retrofit/)\n\nYou can use *manual tracking* to add support for any client yourself, or please consider [contributing](CONTRIBUTING.md) to the project.\n\n### Additional configuration settings\n\nThe configuration described in `Step 3` is the minimum configuration you must provide to Instana Agent to function. \n\nPlease check for additional options in the [Android API documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=monitoring-android-api).\n\n## Examples\n\nPlease head over to the [android-agent-examples repository](https://github.com/instana/android-agent-examples) to find multiple usage examples of the Instana Android Agent.\n\nYou can also find an example in this repo's `instana-example` folder. Just please be aware that this is an example meant to be used during the development of the Android Agent, and therefore might contain usages of the Agent that are more complex that what you need for your situation.\n","funding_links":[],"categories":["Monitoring Agents"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstana%2Fandroid-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstana%2Fandroid-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstana%2Fandroid-agent/lists"}