Skip to content
Merged
2 changes: 1 addition & 1 deletion pages/inspector/connect-inspector-to-segment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Property value validation allows you to validate property values against the [co

To enable property value validation:

1. **Enable property value validation in settings** - Go to workspace settings in your Avo workspace and enable [property value validation](/inspector/inspector-debugger#setting-up-property-value-validation).
1. **Enable property value validation in settings** - Go to workspace settings in your Avo workspace and enable [property value validation](/inspector/inspector-debugger#enabling-advanced-debugger-features).

To be able to [decrypt the property values](/inspector/inspector-debugger#decrypting-property-values) in the Inspector Debugger, you need to generate a public/private key pair:

Expand Down
92 changes: 55 additions & 37 deletions pages/inspector/inspector-debugger.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ See all events flowing through Inspector in real-time, organized chronologically
### Event details and validation

<Callout type="info">
Property value validation is available for [supported SDKs and integrations](#supported-sdks-and-integrations). Make sure you are using the minimum required version.
Property value validation is an advanced feature available for [supported SDKs and integrations](#supported-sdks-and-integrations). See [Enabling advanced debugger features](#enabling-advanced-debugger-features) for setup instructions.
</Callout>

Click any event to see:
- **Complete property list** - All properties sent with the event, including their types and values (if property value validation is enabled and you have [decrypted the values](#decrypting-values-in-the-debugger))
- **Complete property list** - All properties sent with the event, including their types and values (if [property value validation](#property-value-validation) is enabled and you have [decrypted the values](#decrypting-values-in-the-debugger))
- **Tracking plan validation** - Details on the validation status, with immediate feedback on [issue types](/inspector/issue-types-in-inspector) like unexpected properties, type mismatches, or missing required properties
- **Event metadata** - Source, version, stream session information, and timestamps
- **Link to tracking plan** - Quick access to view the event definition in your tracking plan
Expand Down Expand Up @@ -79,6 +79,10 @@ When an event matches multiple variants in the tracking plan, Avo selects the be

## How to use the Inspector Debugger

<Callout type="info" emoji="💡">
To use the Inspector Debugger, the Inspector needs to be installed in your application. See the [Inspector installation overview](/inspector/inspector-installation-overview) for instructions. The debugger is currently available for development and staging environments only.
</Callout>

### Accessing the debugger

1. Navigate to **Inspector** in the left sidebar of your Avo workspace and click on **Debugger** in the Inspector submenu
Expand All @@ -96,12 +100,22 @@ Use the filters at the top of the debugger to focus your view:

- **Environment filter** - Filter by development or staging environments
- **Source filter** - Show events from specific platforms (iOS, Android, Web, etc.)
- **Stream session filter** (coming soon) - Filter events to a specific user stream session
- **Stream session filter** - Filter events to a specific user stream session. See [Enabling advanced debugger features](#enabling-advanced-debugger-features) for setup instructions.
- **Search** - Search for specific event names

To find your events in the debugger while debugging:
1. Filter down on the environment and source that you are triggering events from
2. (Coming soon) Look at the stream ID column to identify which stream is sending events that match the ones you are triggering from your application, based on timing and event names and filter down to that stream session
2. Look at the stream ID column to identify which stream is sending events that match the ones you are triggering from your application, based on timing and event names, and filter down to that stream session

#### Session filtering

Session filtering allows you to filter the event stream to show only events from a specific user session. This makes it much easier to find your own events when debugging, especially in busy development or staging environments where multiple team members may be triggering events simultaneously. See [Enabling advanced debugger features](#enabling-advanced-debugger-features) for setup instructions.

Each session is identified by a unique stream ID and color-coded in the debugger for easy visual tracking. When session filtering is enabled:

- Events are grouped by session, enabling you to identify the events you are sending from your application in the debugger to QA the implementation
- You can click on any stream ID to filter the view to only show events from that session
- The filter persists as you navigate, helping you focus on a specific debugging session

### Controlling the event stream

Expand All @@ -113,31 +127,9 @@ The debugger provides controls for managing the live stream:

### Property value validation

The Inspector Debugger supports property value validation, allowing you to see the actual values being sent with your events and verify they match your expected data. This is useful for catching [property value issues](/inspector/issue-types-in-inspector#property-value-issues) where values that don't match the [property constraints](/data-design/avo-tracking-plan/properties#property-types-and-constraints) defined in Avo, such as allowed values and regex patterns for string properties, min and max values for numerical properties, and required or unexpected keys in object properties.

Property values are encrypted end-to-end for privacy and security. You can always see if there is an issue related to the value but to see the actual values you need to [decrypt them using your private key](#decrypting-values-in-the-debugger).
The Inspector Debugger supports property value validation, allowing you to see the actual values being sent with your events and verify they match your expected data. This is useful for catching [property value issues](/inspector/issue-types-in-inspector#property-value-issues) where values don't match the [property constraints](/data-design/avo-tracking-plan/properties#property-types-and-constraints) defined in Avo, such as allowed values and regex patterns for string properties, min and max values for numerical properties, and required or unexpected keys in object properties.

#### Setting up property value validation

Property value validation is enabled when the Property value validation setting is enabled in your workspace setting and you are using a supported SDK or integration version. You will always see validation issues (such as values not matching allowed values or regex patterns), but the actual property values will appear as encrypted. To see the actual values that are causing issues, you need to generate and configure encryption keys.

![Inspector settings with property value validation enabled](/images/inspector/debugger/value-validation-setting.png)

##### For existing Inspector installations

If you already have Inspector set up and want to enable property value validation:

1. **Enable value validation in settings** - Go to Inspector settings in your Avo workspace and enable property value validation
2. **Update to a supported SDK or integration** - Update to the latest version of a [supported SDK or integration](#supported-sdks-and-integrations) that includes property value validation
3. **(Optional) Generate encryption keys** - To see the actual property values (not just the validation issues), generate a public/private key pair using the Avo CLI and configure your SDK with the public key. See [How encryption works](#how-encryption-works) for details.

##### For new Inspector installations

If you're setting up Inspector for the first time:

1. **Enable property value validation in settings** - Go to Inspector settings in your Avo workspace and enable property value validation
2. **Install the SDK or connect an integration** - Follow the [Inspector installation overview](/inspector/inspector-installation-overview) to set up Inspector. Property value validation is included by default in the latest versions of [supported SDKs and integrations](#supported-sdks-and-integrations).
3. **(Optional) Generate encryption keys** - To see the actual property values (not just the validation issues), generate a public/private key pair using the Avo CLI and configure your SDK with the public key. See [How encryption works](#how-encryption-works) for details.
Property values are encrypted end-to-end for privacy and security. You will always see validation issues (such as values not matching allowed values or regex patterns), but the actual property values will appear as encrypted. To see the actual values that are causing issues, you need to [decrypt them using your private key](#decrypting-values-in-the-debugger).

#### How encryption works

Expand All @@ -149,11 +141,7 @@ Property values are only sent to Avo if you provide a public encryption key to e

![Inspector Debugger with encrypted values](/images/inspector/debugger/inspector-debugger-event-details.png)

To generate a public/private key pair, you can run the following command in your terminal:

```bash
node -e "const { createECDH } = require('crypto'); const ecdh = createECDH('prime256v1'); ecdh.generateKeys(); console.log('Private Key:', ecdh.getPrivateKey('hex')); console.log('Public Key:', ecdh.getPublicKey('hex', 'compressed'));"
```
To start encrypting and validating property values, [generate encryption keys](#generating-encryption-keys) and pass the public key to your SDK during initialization.

#### Decrypting values in the debugger

Expand All @@ -174,19 +162,49 @@ Once decrypted, you can see the actual values sent with each event and identify
Your private key is only stored locally in the application during your session and is never sent to Avo's servers. Decryption happens entirely on your machine.
</Callout>

##### Supported SDKs and integrations
## Enabling advanced debugger features

The Inspector Debugger offers advanced features when using a [supported SDK or integration version](#supported-sdks-and-integrations).

To enable them you have to install or update the supported SDK or integration to the minimum version listed in the [supported SDKs and integrations](#supported-sdks-and-integrations) table below.

Each feature has different setup requirements:

- **[Session filtering](#session-filtering)** - Filter the event stream to a specific user session, making it easier to find and debug your own events. Works automatically with supported SDK versions — no additional settings required.
- **[Property value validation](#property-value-validation)** - See validation issues for property values that don't match the constraints defined in your tracking plan, such as allowed values, regex patterns, min/max values, and object key requirements. To enable it, you need to:
1. **Enable property value validation** - Go to Inspector settings in your Avo workspace and enable the Property value validation setting.
2. **(Optional) [Generate encryption keys](#generating-encryption-keys)** - To see the actual property values (not just validation issues), generate a key pair and pass the public key to your SDK.

![Inspector settings with property value validation enabled](/images/inspector/debugger/value-validation-setting.png)

### Generating encryption keys

By default, property values appear encrypted in the debugger. You will always see validation issues, but to see the actual values that are causing issues, you need to generate a key pair.

Run the following command in your terminal:

```bash
node -e "const { createECDH } = require('crypto'); const ecdh = createECDH('prime256v1'); ecdh.generateKeys(); console.log('Private Key:', ecdh.getPrivateKey('hex')); console.log('Public Key:', ecdh.getPublicKey('hex', 'compressed'));"
```

Then:

1. **Pass the public key to your SDK** - Add the public key when initializing the Inspector SDK or configuring your integration. See the setup guide for your [platform](#supported-sdks-and-integrations).
2. **Store your private key securely** - Save it in a password manager. You'll need it to [decrypt values in the debugger](#decrypting-values-in-the-debugger). Never share your private key.

### Supported SDKs and integrations

Property value validation is supported on the following SDKs and integrations:
Property value validation and session filtering are currently supported on:

| Platform | Package Manager | Min Version | Languages |
|----------|----------------|-------------|-----------|
| Web | npm / yarn | 1.3.0+ | JavaScript, TypeScript, ReScript |
| Web | npm / yarn | 3.0.0+ | JavaScript, TypeScript, ReScript |
| iOS | CocoaPods | 2.2.1+ | Swift, Objective-C |
| iOS | SPM | 1.5.0+ | Swift, Objective-C |
| Android | JitPack / Maven | 2.4.0+ | Kotlin, Java |
| Segment | Integration | v2 | All sources |

To get access to all the features, including stream ID, client-side value validation, and property value report, update to the minimum version listed above.
To get access to all the features, including stream ID, client-side value validation, and property value report, update to the minimum version listed above. Support for other platforms is coming soon. Reach out to support if you need these features for other platforms.

## Troubleshooting

Expand Down
47 changes: 45 additions & 2 deletions pages/reference/avo-inspector-sdks/android.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Callout } from 'nextra/components';

# Avo Inspector Android SDK

## Quick Start Guide
Expand Down Expand Up @@ -57,11 +59,11 @@ Obtain the API key in Inspector tab in your [Avo.app](https://www.avo.app/welcom
You will need to create an instance of `AvoInspector` with the constructor.

```java
public AvoInspector(String apiKey, Application application, AvoInspectorEnv env, @Nullable Activity rootActivityForVisualInspector)
public AvoInspector(@NonNull String apiKey, @NonNull Application application, @NonNull AvoInspectorEnv env, @Nullable Activity rootActivityForVisualInspector, @Nullable String publicEncryptionKey)
```

```kotlin
class AvoInspector(apiKey: String?, application: Application?, env: AvoInspectorEnv?, rootActivityForVisualInspector: Activity?)
class AvoInspector(apiKey: String, application: Application, env: AvoInspectorEnv, rootActivityForVisualInspector: Activity?, publicEncryptionKey: String?)
```

> #### Parameters:
Expand All @@ -70,9 +72,50 @@ class AvoInspector(apiKey: String?, application: Application?, env: AvoInspector
> - `Application application` - reference to your Application class
> - `AvoInspectorEnv env` - current environment: development, staging or production
> - `Activity rootActivityForVisualInspector` - you root activity that will be used to show Visual Inspector, a view where you can track the reported schemas.
> - `String publicEncryptionKey` (optional) - public key used to encrypt property values for secure debugging in Inspector.

[More about the Visual Inspector below](#visual-inspector)

#### Property value validation

You can enable property value validation to validate property values against the [constraints defined in your tracking plan](/data-design/avo-tracking-plan/properties#property-types-and-constraints), such as allowed values, regex patterns, and min/max ranges.

<Callout type="info" emoji="💡">
Property value validation is available for version 2.4.0+ of the Android Inspector SDK. If you are using an older version, please update to the latest version.
</Callout>

To enable property value validation:

1. **Enable property value validation in settings** - Go to workspace settings in your Avo workspace and enable [property value validation](/inspector/inspector-debugger#enabling-advanced-debugger-features).

To be able to [decrypt the property values](/inspector/inspector-debugger#decrypting-property-values) in the Inspector Debugger, you need to generate a public/private key pair:

**Step 1: Generate encryption keys**

Run the following command in your terminal to generate a public/private key pair:

```bash
node -e "const { createECDH } = require('crypto'); const ecdh = createECDH('prime256v1'); ecdh.generateKeys(); console.log('Private Key:', ecdh.getPrivateKey('hex')); console.log('Public Key:', ecdh.getPublicKey('hex', 'compressed'));"
```

This will output:
- **Public key** - Used by Avo to encrypt property values
- **Private key** - Used by you to decrypt values in the Inspector Debugger

**Step 2: Store your private key securely**

Save your private key in a secure location like a password manager. You'll need this to [decrypt values in the Inspector Debugger](/inspector/inspector-debugger#decrypting-property-values). Never share or expose your private key to a third party.

**Step 3: Add the public key to the Inspector initialization**

Pass the public key when initializing the `AvoInspector` instance. Refer to the [Initialization](#initialization) section above for the constructor signature.

<Callout type="info" emoji="🔒">
Property values are encrypted end-to-end. Avo only stores encrypted values and cannot decrypt them. Only you can decrypt the values using your private key in the Inspector Debugger dashboard.
</Callout>

Learn more about [decrypting property values in the Inspector Debugger](/inspector/inspector-debugger#decrypting-property-values) and the [property value issue types](/inspector/issue-types-in-inspector#property-value-issues) that can be detected.

## Sending event schemas to Avo Inspector

This is the core of the **Avo Inspector SDK**.
Expand Down
Loading