> For the complete documentation index, see [llms.txt](https://pango.gitbook.io/paas/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pango.gitbook.io/paas/faq/general/what-analytic-data-collect-your-sdk.md).

# What analytic data is collected by your SDK?

The main **purpose** of this is **to improve the connection quality** and **the overall performance aspects** of the SDK. The SDK **collects anonymous data** about a device, configuration requests and connection start and stop attempts.

The SDK performs Network Availability Test for better understanding what's happening when a connection error is received. It includes diagnostics of the current network connection such as a Captive Portal check, pinging of a popular public web resource, etc.

{% hint style="warning" %}
The SDK **does not collect** or analyze any **Personal Identifiable Information.**

* all the geolocation data is inaccurate and provide an approximation
* cell phone service provider and ISP data is used for statistical purposes only
* any hardware information is used for the service quality improvement
* all the identifiers are auto-generated
  {% endhint %}

{% hint style="warning" %}

* The latest version of Android SDK provides [an option to turn on/off event sending](/paas/sdk/vpn-sdk-for-android/setup/configuration.md#analytics). It is up to the application developer to use or not use this function of the SDK.
* To disable analytics for Apple SDK, see [Analytics Configuration](/paas/sdk/unified-vpn-sdk-for-apple/usage/analytics-configuration.md#disabling-analytics).
* To disable analytics for Windows SDK, see [Analytics Configuration](/paas/sdk/unified-vpn-sdk-for-windows/setup/analytics-configuration.md#disabling-analytics).
  {% endhint %}

## Common properties

### Common Android device-related properties:

| **Property Name**      | **Type** | **Description**                                                                                                                                                                                          |
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| af\_platform           | String   | android                                                                                                                                                                                                  |
| uid                    | String   | Application UID. The kernel user-ID that has been assigned to this application by the operating system of the device; currently this is not a unique ID (multiple applications can have the same *UID*). |
| app\_name              | String   | Application package name                                                                                                                                                                                 |
| app\_build             | String   | ID based on app signature. Helpful to figure out if the app was cracked.                                                                                                                                 |
| app\_version           | String   | Application version name                                                                                                                                                                                 |
| app\_release           | String   | Application version code                                                                                                                                                                                 |
| carrier                | String   | Telephony carrier name                                                                                                                                                                                   |
| has\_telephone         | Boolean  | Shows if the device is a phone or other type of device                                                                                                                                                   |
| memory\_remains        | String   | Remaining RAM                                                                                                                                                                                            |
| memory\_total          | String   | Total RAM                                                                                                                                                                                                |
| model                  | String   | android.os.Build.MODEL                                                                                                                                                                                   |
| device\_manufacturer   | String   | android.os.Build.MANUFACTURER                                                                                                                                                                            |
| locale                 | String   | Current device locale (provided by the device itself)                                                                                                                                                    |
| device\_language       | String   | Current device language (provided by the device itself)                                                                                                                                                  |
| hydra\_base\_url       | String   | Base API URL                                                                                                                                                                                             |
| android\_sdk\_int      | String   | Build.VERSION.SDK\_INT                                                                                                                                                                                   |
| android\_version\_name | String   | Build.VERSION.RELEASE                                                                                                                                                                                    |
| connection\_type       | String   | Type of current active network                                                                                                                                                                           |
| time\_zone             | String   | Device time zone in "-0800" format (is taken from the device settings)                                                                                                                                   |
| af\_hash               | String   | Device ID auto-generated on the first app install                                                                                                                                                        |
| sdk\_version           | String   | SDK version name                                                                                                                                                                                         |
| sdk\_version\_code     | Integer  | SDK version code                                                                                                                                                                                         |

### Common iOS and macOS device-related properties

| **Property Name** | **Type** | **Description**                                                                               |
| ----------------- | -------- | --------------------------------------------------------------------------------------------- |
| af\_platform      | String   | “ios”                                                                                         |
| app\_name         | String   | Application package name                                                                      |
| app\_release      | String   | Application version code                                                                      |
| distinct\_id      | String   | Unique id auto-generated on the first app install                                             |
| epoch             | Integer  | Time of generated event in UNIX format                                                        |
| carrier           | String   | Telephony carrier name                                                                        |
| model             | String   | iPhone model, eg. iPhone8,2                                                                   |
| manufacturer      | String   | “Apple”                                                                                       |
| af\_hash          | String   | Device id auto-generated on first app install                                                 |
| sdk\_version      | String   | SDK version name                                                                              |
| lib\_version      | String   | Analytics SDK version                                                                         |
| os                | String   | Device OS (iOS)                                                                               |
| os\_version       | String   | OS version, e.g., 13.1.2                                                                      |
| screen\_height    | Integer  | Device screen height                                                                          |
| screen\_width     | Integer  | Device screen width                                                                           |
| server\_protocol  | String   | SDK server protocol e.g., hydra                                                               |
| sim\_country      | String   | Country of the carrier (provided by the SIM card)                                             |
| wifi              | Bool     | Indicates if a device is using a Wi-Fi network (with no specific information on this network) |
| time              | Integer  | The current time on the device (in UNIX format)                                               |

### Common Windows device-related properties

| **Property Name**    | **Type** | **Description**                            |
| -------------------- | -------- | ------------------------------------------ |
| platform             | String   | “Windows”                                  |
| device\_language     | String   | Current device language                    |
| device\_manufacturer | String   | Current device manufacturer                |
| os                   | String   | Operation system                           |
| os\_version          | String   | Operation system version with build number |

### Common configuration request properties for all platforms

| Property Name       | Type    | Description                                                     |
| ------------------- | ------- | --------------------------------------------------------------- |
| platform            | String  | Device platform                                                 |
| sdk\_version        | String  | SDK version name                                                |
| project             | String  | Carrier name                                                    |
| device\_id          | String  | Device unique identificator generated by SDK or provided by App |
| app\_version        | String  | App version name                                                |
| attempt\_id         | String  | Unique Id of a pair of requests/response                        |
| server\_domain      | String  | Backend server domain                                           |
| endpoint/source     | String  | Backend server endpoint                                         |
| duration            | Integer | Request duration                                                |
| status\_code/status | Integer | HTTP Status Code or 0 in case of non-HTTP error                 |
| api\_id             | String  | Value of the x-amz-cf-id HTTP response header (might be empty)  |
| error\_code         | Integer | Request error code                                              |
| time                | Integer | The current time on the device (in UNIX format)                 |

### Common connection properties for all platforms

| Property Name  | Type    | Description                                                                                                                                                                                   |
| -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| catime         | Integer | UNIX millisecond timestamp (since Epoch) on the client, when a connection attempt was initiated                                                                                               |
| caid           | String  | Connection attempt ID auto-generated by the client on the actual attempt                                                                                                                      |
| reason         | String  | Describes the source of a VPN session initiation or termination (user click, reconnect, etc.)                                                                                                 |
| error\_code    | Integer | Numerical code of an error category (0 = success). See section "error\_code" below                                                                                                            |
| error          | String  | Error description. See the "error" section below                                                                                                                                              |
| protocol       | String  | The protocol used for the connection attempt                                                                                                                                                  |
| server\_ip     | String  | The server IP address used to establish a connection (empty if the attempt was unsuccessful)                                                                                                  |
| session\_id    | String  | An identifier assigned by the VPN node in case of a successful connection attempt (should match with the value on the server). The identifier is valid until the intended end of the session. |
| hydra\_version | String  | The version of Hydra protocol used to establish a connection                                                                                                                                  |
| notes          | JSON    | Extra information on service delivery configuration (in case Hydra was used), region ID, ISP name, and a numerical representation of the network availability test result.                    |
| parent\_caid   | String  | caid of the original connection attempt (in case the connection was broken). This property is used to recover the session.                                                                    |
| is\_ipv6\_only | Integer | This flag shows if the ISP support IPv6 protocol only (1 - yes, 0 - no)                                                                                                                       |
| first          | Boolean | Indicates the first launch of the application. Always has a "false" value after the initial launch.                                                                                           |

### Common performance events properties for all platforms

| Property Name  | Type   | Description                                                                                                                                                                                   |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| platform       | String | Device platform                                                                                                                                                                               |
| hydra\_version | String | The version of Hydra protocol used to establish a connection                                                                                                                                  |
| network\_media | String | The type of network media (e.g., Wi-Fi, cellular) used during the connection attempt                                                                                                          |
| session\_id    | String | An identifier assigned by the VPN node in case of a successful connection attempt (should match with the value on the server). The identifier is valid until the intended end of the session. |

## Configuration requests events

SDK reports data only about internal requests to the Backend which are used to get up to date configurations for VPN connections.

There are 3 configuration requests events:

* **auth**
* **api\_request**
* **api\_response**

### Event: ***auth***

Event reports a retrieval of a token for configuration requests from the Backend.

Properties specific for event *auth*:

| **Property Name** | **Type** | **Description**                                                           |
| ----------------- | -------- | ------------------------------------------------------------------------- |
| details           | JSON     | information about when the token was issued and when it’s going to expire |
| reason            | String   | why the request was initiated (token is absent or expired)                |

### Event: ***api\_request***

Event reports the data about configuration request to the Backend.

Properties specific for event *api\_request*:

| **Property Name**    | **Type** | **Description**                                                 |
| -------------------- | -------- | --------------------------------------------------------------- |
| api\_content.params  | JSON     | parameters that were passed to the Backend for config retrieval |
| api\_content.configs | JSON     | list of requested configs and their local versions              |

### Event: ***api\_response***

Event reports the data about configuration response from the Backend.

Properties specific for event *api\_response*:

| **Property Name**     | **Type** | **Description**                                                                    |
| --------------------- | -------- | ---------------------------------------------------------------------------------- |
| api\_content.response | JSON     | response from the Backend, contains a list of received sections or error if failed |

## Connection events

There are 4 connection events:

* **connection\_start**
* **connections\_start\_detailed**
* **connection\_end**
* **connection\_end\_detailed**

We are using **\*\_detailed** events mostly for diagnostic if a connection really works and what the possible reason for a connection could not be established.

### Event: *connection\_start*

Event reports every connection attempt.

Properties specific for event *connection\_start*:

| **Property Name** | **Type** | **Description**                                                                           |
| ----------------- | -------- | ----------------------------------------------------------------------------------------- |
| duration          | Integer  | how long it took to establish a connection or stop trying to connect, in **milliseconds** |
| notes             | JSON     | Provides additional information if any related to the connection process.                 |

### Event: *connection\_start\_detailed*

Event reports additional details regarding all finished connection attempts to particular IPs (main, offload), including successful.

If the connection attempt was unsuccessful, a network availability check should be performed and reported in network\_availability and notes properties.

Properties specific for event *connection\_start\_detailed*:

| **Property Name**     | **Type** | **Description**                                                                         |
| --------------------- | -------- | --------------------------------------------------------------------------------------- |
| network\_availability | Float    | Share of passed Network Availability tests rounded to 2 digits after the decimal point. |
| notes                 | JSON     | detailed results of the Network Availability Test.                                      |
| details               | JSON     | an array of JSON with connection results of all low-level attempts to connect.          |

### Event: *connection\_end*

The event should be reported when a Connection is terminated. All properties specific for connection-related events should be reported for this event as well.

Properties specific for event *connection\_end*:

| Property Name | Type    | Description                                                                                                                                           |
| ------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| duration      | Integer | the duration of the VPN session in milliseconds                                                                                                       |
| traffic       | JSON    | <p>traffic statistics in bytes</p><p><code>{</code></p><p><code>"bytes\_in: 100,</code></p><p><code>"bytes\_out": 100</code></p><p><code>}</code></p> |

When a connection is terminated unexpectedly (no user intention to terminate the session), network availability tests should be performed and the *connection\_end\_detailed* event should be reported. If a user has canceled, no need to send the event.\
Properties specific for event *connection\_end\_detailed:*

| **Property Name**     | **Type** | **Notes**                                                                               |
| --------------------- | -------- | --------------------------------------------------------------------------------------- |
| network\_availability | Float    | Share of passed Network Availability tests rounded to 2 digits after the decimal point. |
| notes                 | JSON     | detailed results of the Network Availability Test.                                      |

### Property for “*error\_code*”

#### *connection\_start*

| **error\_code**        | **Description**                                                                                                                                                                                        |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 0 (success)            | No error (the connection has been established successfully)                                                                                                                                            |
| 1 (internal error)     | Internal problems during initialization or establishing communication (e.g. Failed to open TUN, VPN permissions are not given, Hydra "Bad Configuration" error, etc.) or any other unclassified errors |
| 2 (connection error)   | Failed to establish a connection due to networking issues (e.g. host is unreachable, can't send data, timeout on receiving data, etc.)                                                                 |
| 4 ("no network" error) | The network has been lost during the connection (e.g. WiFi lost or changed) or the network is up, but unavailable (e.g. due to a walled garden or as mobile data is disabled)                          |
| 6 (canceled)           | The connection establishment has been terminated in the middle of the process. No connection has been established.                                                                                     |
| 7 (app level error)    | Application denied starting establishing the VPN connection (i.e. user tried to use some elite features from the free app, PC adapter is not ready to connect)                                         |

#### *connection\_end*

| **error\_code**      | **Description**                                                                                                   |
| -------------------- | ----------------------------------------------------------------------------------------------------------------- |
| 0 (success)          | No error (the connection has ended as expected and successfully)                                                  |
| 1 (internal error)   | An internal problem that broke established connection (e.g. OpenVPN or Hydra quit unexpectedly, etc.)             |
| 2 (connection error) | The connection has broken due to connection problems (e.g. Hydra or OpenVPN detected communication problem, etc.) |
| 3 (connection stuck) | Connection is established, but no exchange happening ("KeepAlive problem")                                        |

### Property for “*error*”

| error\_code | error            | Description                                                                                                                                                                                                                                                                    |
| ----------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 0           | Success          | No error                                                                                                                                                                                                                                                                       |
| 1           | Internal error   | Platform-specific internal problems during initialization, connection, or operation. (e.g. Failed to open TUN, Hydra "Bad configuration" error, VPN permissions are not given, etc.) Also, this code should be used for any unclassified errors (with a detailed description). |
| 2           | Connection error | The error should be supplied with an HTTP code / VPN error code. This code is used for the situation when a connection has not been established or has been broken.                                                                                                            |
| 3           | Connection stuck | The connection has been established, but no data exchange is happening. Should be supplied with a platform-specific description.                                                                                                                                               |
| 4           | No network       | The network connection has been lost during the VPN session                                                                                                                                                                                                                    |
| 5           | Failed           | The backend has responded with an error. A relevant error should be provided.                                                                                                                                                                                                  |

### Property for “*reason*”

| Name         | Description                                                                         |
| ------------ | ----------------------------------------------------------------------------------- |
| m\_ui        | Connection is initiated via interaction with the UI elements                        |
| m\_system    | Connection is initiated via interaction with the system menu                        |
| m\_tray      | Connection is initiated via interaction with a notification message or a tile       |
| m\_other     | Connection is initiated via some other type of interaction                          |
| a\_app\_run  | Connection is initiated automatically on the app launch                             |
| a\_reconnect | Connection is initiated after an intended VPN session termination                   |
| a\_error     | Connection is initiated as a result of an unexpected VPN session disconnect         |
| a\_sleep     | Connection is initiated after a device has returned from the sleep/hibernation mode |
| a\_network   | Connection is initiated due to the network status change                            |
| a\_other     | Connection is initiated automatically due to any other reason                       |

There are several reasons for a connection attempt to fail or an established connection to drop unexpectedly. It can be an infrastructure issue or a client bug that can and shall be fixed. It can be a blockage that should be addressed by changing the configuration or in the worst case improving the VPN core and re-releasing the client. But it can also be a problem with the network that can’t be fixed in principle.

In order to distinguish these cases, a **network availability test** will be performed on every unsuccessful connect or unintended disconnect that will report whether the network is available or not.

This test includes: check the captive portal, current network type, ping test, and security certificate test.

### Captive Portal test

This test is to check if there is a Captive portal. It usually means that\
all requests are redirected by the network provider to their own login page.

To detect this case SDK sends a request to one of URLs from the list and expects response code 204:\
<https://google.com/generate_204>,\
<https://gstatic.com/generate_204>,\
<https://maps.google.com/generate_204>,\
<https://www.google.com/generate_204>,\
<https://clients3.google.com/generate_204>

### Network type test

SDK calls system API to check if any type of network interface is established. For example on older versions of Android SDK uses API\
<https://developer.android.com/reference/android/net/ConnectivityManager#getNetworkInfo(android.net.Network>)

### Certificate test

In some particular cases, there can be more significant issues with your connection like issues with web certificates. To test this case SDK sends a request to one of the following URL and checks that the certificate is valid:

<https://google.com/>,\
<https://apple.com>,\
<https://microsoft.com>,\
<https://yahoo.com>,\
<https://baidu.com>,\
<https://amazon.com>,\
<https://instagram.com>,\
<https://linkedin.com>,\
<https://ebay.com>,\
<https://bing.com>,\
<https://goo.gl>,\
<https://outlook.live.com>,\
<https://wikipedia.org>,\
<https://office.com>

## Event samples

### *auth*

```
{
  "event": "auth",
  "ts": 1740591600777,
  "properties": {
    "platform": "Windows",
    "sdk_version": "2.28.0.479",
    "project": "Test",
    "device_id": "Test_Id",
    "app_version": "2.28.0.479",
    "attempt_id": "9531dde3-5fdd-4bd3-a3db-a97f24b6189d",
    "server_domain": "api.pango-cloud.com",
    "endpoint": "/config/token",
    "duration": 566,
    "status_code": 200,
    "api_id": "KbRTFGPaeMXK_NCbfuQQSkTsEDNJnZjfnl4VCW37jNnWbOA37x-hwA==",
    "details": "{\"create_time\":1740591602,\"expire_time\":1740595202}",
    "error_code": 0,
    "reason": "absent",
    "time": 1740591600777
  }
} 
```

### *api\_request*

```
{
  "event": "api_request",
  "ts": 1740591600799,
  "properties": {
    "platform": "Windows",
    "sdk_version": "2.28.0.479",
    "project": "Test",
    "device_id": "Test_Id",
    "app_version": "2.28.0.479",
    "attempt_id": "3387ae0a-2061-49d8-9d38-b724be27ad4a",
    "server_domain": "api.pango-cloud.com",
    "source": "/config/check",
    "api_content": "{\"configs\": {\"sdk_hydra_template\": \"\"}, \"params\": {\"app_version\": \"2.28.0\", \"sdk_version\": \"2.28.0\"}}",
    "time": 1740591600799
  }
} 
```

### *api\_response*

```
{
  "event": "api_response",
  "ts": 1740591601103,
  "properties": {
    "platform": "Windows",
    "sdk_version": "2.28.0.479",
    "project": "Test",
    "device_id": "Test_Id",
    "app_version": "2.28.0.479",
    "attempt_id": "3387ae0a-2061-49d8-9d38-b724be27ad4a",
    "server_domain": "api.pango-cloud.com",
    "source": "/config/check",
    "duration": 294,
    "status": 200,
    "api_id": "JrsfXPrP1sWJeoELBL5AmjaGjEMkpxHo7m6gPtdW73GouwC07vZn_A==",
    "error_code": 0,
    "api_content": "{\"response\":{\"configs\":{\"sdk_hydra_template\":{\"version\":\"1798ddb431585a2c7af4210d25a4863bafb59fd0\",\"ids\":[\"sdk_hydra_template_windows_default\"]}},\"revision\":\"7689\",\"ttl\":900}}",
    "time": 1740591601103
  }
} 
```

### *connection\_start*

```
{
  "event": "connection_start",
  "id": "1",
  "properties": {
    "af_platform": "android",
    "reason": "m_ui",
    "app_version": "3.2.0",
    "is_ipv6_only": "0",
    "locale": "US",
    "error": "Captive Portal",
    "device_manufacturer": "Google",
    "duration": "1107",
    "uid": 10079,
    "protocol": "hydra",
    "hydra_version": "release-hydra-v5.0.4-2-g980098b",
    "catime": "1585089436276",
    "caid": "37EAC37405964FF9A7C41094F66E8C4C",
    "sdk_version": "3.2.0",
    "model": "Android SDK built for x86",
    "memory_total": 1567338496,
    "memory_remains": 760401920,
    "seq_no": 12,
    "app_release": 403219,
    "connection_type": "WiFi",
    "android_version_name": "8.1.0",
    "has_telephone": true,
    "sd_in_tunnel": "0",
    "time_zone": "-0700",
    "app_name": "com.northghost.hydraclient.kotlin",
    "carrier": "Android",
    "sdk_version_code": "403219",
    "app_build": 444722979,
    "android_sdk_int": 27,
    "error_code": "4",
    "time": 1585089437403,
    "device_language": "en"
  }
}
```

### *connection\_start\_detailed*

```
{
  "event": "connection_start_detailed",
  "id": "2",
  "properties": {
    "af_platform": "android",
    "reason": "m_ui",
    "notes": "{\"network_availability_test\":[{\"type\":\"http certificate\",\"url\":\"https:\\/\\/ebay.com\",\"result\":\"ok\"},{\"type\":\"captive portal\",\"url\":\"https:\\/\\/clients3.google.com\\/generate_204\",\"result\":\"ok\"},{\"type\":\"network interface\",\"result\":\"wifi\"}]}",
    "app_version": "3.2.0",
    "is_ipv6_only": "0",
    "locale": "US",
    "error": "Captive Portal",
    "device_manufacturer": "Google",
    "duration": "1107",
    "uid": 10079,
    "protocol": "hydra",
    "hydra_version": "release-hydra-v5.0.4-2-g980098b",
    "catime": "1585089436276",
    "caid": "37EAC37405964FF9A7C41094F66E8C4C",
    "sdk_version": "3.2.0",
    "model": "Android SDK built for x86",
    "details": "[]",
    "memory_total": 1567338496,
    "memory_remains": 758894592,
    "seq_no": 13,
    "app_release": 403219,
    "connection_type": "WiFi",
    "network_availability": "1.0",
    "android_version_name": "8.1.0",
    "has_telephone": true,
    "sd_in_tunnel": "0",
    "time_zone": "-0700",
    "app_name": "com.northghost.hydraclient.kotlin",
    "carrier": "Android",
    "sdk_version_code": "403219",
    "app_build": 444722979,
    "android_sdk_int": 27,
    "error_code": "4",
    "time": 1585089438040,
    "device_language": "en"
  }
}
```

### *connection\_end*

```
{
  "event": "connection_end",
  "id": "6",
  "properties": {
    "af_platform": "android",
    "reason": "m_ui",
    "vl_code": "OPT",
    "app_version": "3.2.0",
    "is_ipv6_only": "0",
    "locale": "US",
    "error": "VpnException:VPN stopped by RemoteVpn",
    "device_manufacturer": "Google",
    "duration": "4188",
    "uid": 10079,
    "protocol": "hydra",
    "hydra_version": "release-hydra-v5.0.4-2-g980098b",
    "catime": "1585089615598",
    "caid": "8DDF0415954648DE9EB0C2A28895191A",
    "sdk_version": "3.2.0",
    "server_ip": "92.38.148.65",
    "hydra_base_url": "https://api-prod-partner-us-west-2.northghost.com/",
    "model": "Android SDK built for x86",
    "memory_total": 1567338496,
    "af_hash": "YWZkZW1vXzE2MDg3ODc0********",
    "memory_remains": 757387264,
    "traffic": "{\"bytes_in\":0,\"bytes_out\":269}",
    "hydra_carrier": "afdemo",
    "seq_no": 16,
    "app_release": 403219,
    "connection_type": "WiFi",
    "android_version_name": "8.1.0",
    "has_telephone": true,
    "sd_in_tunnel": "0",
    "session_id": "SA65D3CBED0DF7198653B682836EEE9-00",
    "time_zone": "-0700",
    "app_name": "com.northghost.hydraclient.kotlin",
    "carrier": "Android",
    "sdk_version_code": "403219",
    "partner_carrier": "afdemo",
    "app_build": 444722979,
    "android_sdk_int": 27,
    "error_code": "1",
    "time": 1585089619889,
    "device_language": "en",
    "server_protocol": "hydra"
  }
}
```

### *connection\_end\_detailed*

```
{
  "event": "connection_end_detailed",
  "id": "8",
  "properties": {
    "af_platform": "android",
    "reason": "m_ui",
    "vl_code": "OPT",
    "notes": "{\"network_availability_test\":[{\"type\":\"http certificate\",\"url\":\"https:\\/\\/google.com\\/\",\"result\":\"ok\"},{\"type\":\"captive portal\",\"url\":\"https:\\/\\/google.com\\/generate_204\",\"result\":\"ok\"},{\"type\":\"network interface\",\"result\":\"wifi\"}]}",
    "app_version": "3.2.0",
    "is_ipv6_only": "0",
    "locale": "US",
    "error": "VpnException:VPN stopped by RemoteVpn",
    "device_manufacturer": "Google",
    "duration": "4188",
    "uid": 10079,
    "protocol": "hydra",
    "hydra_version": "release-hydra-v5.0.4-2-g980098b",
    "catime": "1585089615598",
    "caid": "8DDF0415954648DE9EB0C2A28895191A",
    "sdk_version": "3.2.0",
    "server_ip": "92.38.148.65",
    "hydra_base_url": "https://api-prod-partner-us-west-2.northghost.com/",
    "model": "Android SDK built for x86",
    "memory_total": 1567338496,
    "af_hash": "YWZkZW1vXzE2MDg3OD********",
    "memory_remains": 755924992,
    "traffic": "{\"bytes_in\":0,\"bytes_out\":269}",
    "hydra_carrier": "afdemo",
    "seq_no": 17,
    "app_release": 403219,
    "connection_type": "WiFi",
    "network_availability": "1.0",
    "android_version_name": "8.1.0",
    "has_telephone": true,
    "sd_in_tunnel": "0",
    "session_id": "SA65D3CBED0DF7198653B682836EEE9-00",
    "time_zone": "-0700",
    "app_name": "com.northghost.hydraclient.kotlin",
    "carrier": "Android",
    "sdk_version_code": "403219",
    "partner_carrier": "afdemo",
    "app_build": 444722979,
    "android_sdk_int": 27,
    "error_code": "1",
    "time": 1585089620336,
    "device_language": "en",
    "server_protocol": "hydra"
  }
}
```

## Performance metrics events

When using Hydra protocol, SDK collects performance metrics about how the tunnel performs (CPU usage, memory usage, network throughput, etc.) and reports them. There are 5 different types of events:

* **pipeline\_metrics**
* **transport\_metrics**
* **lwip\_channel\_metrics**
* **pause\_resume\_metrics**
* **memory\_metrics**

### Event: ***pipeline\_metrics***

Event reported every second containing information about how Hydra performed during that second: memory used, CPU usage and how much data passed from tunnel to local application.

Properties specific for event *pipeline\_metrics*:

| **Property Name** | **Type** | **Description**                                            |
| ----------------- | -------- | ---------------------------------------------------------- |
| payload           | JSON     | information about how hydra performed during that second   |
| event             | String   | event name                                                 |
| ts                | Integer  | The current time on the device (POSIX epoch time relative) |

### Event: ***transport\_metrics***

Event reported every second containing information about how much data passed through each of our transports

| **Property Name** | **Type** | **Description**                                                       |
| ----------------- | -------- | --------------------------------------------------------------------- |
| payload           | JSON     | information about how much data passed through each of our transports |
| event             | String   | event name                                                            |
| ts                | Integer  | The current time on the device (POSIX epoch time relative)            |

### Event: ***lwip\_channel\_metrics***

Event reported for every local TCP connection when it closes. It contains information about how much data it received and how our internal pipeline behaved related to this connection.

| **Property Name** | **Type** | **Description**                                                     |
| ----------------- | -------- | ------------------------------------------------------------------- |
| payload           | JSON     | information related to how our pipeline behaved for this connection |
| event             | String   | event name                                                          |
| ts                | Integer  | The current time on the device (POSIX epoch time relative)          |

### Event: ***pause\_resume\_metrics***

Event reported for every local TCP connection when it closes. It contains information about how much time and how many times our internal pipeline stopped sending/receiving data for this connection.

| **Property Name** | **Type** | **Description**                                                   |
| ----------------- | -------- | ----------------------------------------------------------------- |
| payload           | JSON     | information related to pause/resume mechanism for this connection |
| event             | String   | event name                                                        |
| ts                | Integer  | The current time on the device (POSIX epoch time relative)        |

### Event: ***memory\_metrics***

Event reported once the session is closed (the VPN tunnel closes). It contains information about peak memory usage across multiple points in our pipeline.

| **Property Name** | **Type** | **Description**                                                       |
| ----------------- | -------- | --------------------------------------------------------------------- |
| payload           | JSON     | information related to peak memory usage in different pipeline places |
| event             | String   | event name                                                            |
| ts                | Integer  | The current time on the device (POSIX epoch time relative)            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pango.gitbook.io/paas/faq/general/what-analytic-data-collect-your-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
