# Overview

Source: https://docs.interop.io/insights/signals/metrics/overview/index.html

## Overview

**io.Insights** publishes a wide array of default platform metrics that provide information about the system, platform and app performance, as well as data related to loading [Workspaces](https://docs.interop.io/desktop/capabilities/windows/workspaces/overview/index.md) and [Global Layouts](https://docs.interop.io/desktop/capabilities/windows/layouts/overview/index.md).

All published metrics have [common resource attributes](https://docs.interop.io/insights/signals/overview/index.md#common_resource_attributes).

Each metric may have additional attributes described in the respective metric sub-section.

It's possible to enable or disable all default platform metrics, and also to provide custom settings for each default platform metric individually.

> ℹ️ *For the default platform metrics published by each platform, see the [Metrics > io.Connect Desktop](https://docs.interop.io/insights/signals/metrics/io-connect-desktop/index.md) and the [Metrics > io.Connect Browser](https://docs.interop.io/insights/signals/metrics/io-connect-browser/index.md) sections respectively.*

> ℹ️ *For details on configuring the default platform metrics in **io.Connect Desktop** and **io.Connect Browser**, see the [Configuration > io.Connect Desktop](https://docs.interop.io/insights/configuration/io-connect-desktop/index.md) and [Configuration > io.Connect Browser](https://docs.interop.io/insights/configuration/io-connect-browser/index.md) sections respectively.*

> ⚠️ *Note that some of the metrics aren't supported in **io.Connect Browser** due to limitations of modern browsers.*

## Metrics Payload Structure

Metrics are published as standard OpenTelemetry metrics payloads.

> ℹ️ *For more details on the standard structure of OpenTelemetry signals, see the [OpenTelemetry examples](https://github.com/open-telemetry/opentelemetry-proto/tree/main/examples) in GitHub.*

The following example demonstrates the basic structure of a metrics payload:

```json
{
    "resourceMetrics": [
        {
            "resource": {
                "attributes": [
                    // Attributes describing the resource publishing the metrics -
                    // e.g., `"service.name"`, `"service.instance.id"`, and other standard OpenTelemetry attributes.
                ]
            },
            "scopeMetrics": [
                {
                    "scope": {
                        "name": "io.Connect Desktop",
                        "version": ""
                    },
                    "metrics": [
                        // List of objects describing the published metrics.
                    ]
                }
            ]
        }
    ]
}
```

The following is an example metrics object in the `"metrics"` array. The example uses the `"app_startup"` metric:

```json
{
    "metrics": [
        {
            "name": "app_startup",
            "description": "Time to load an application",
            "unit": "ms",
            // Type of the metrics point - e.g., `"sum"`, `"gauge"`, `"histogram"`.
            "histogram": {
                "aggregationTemporality": 2,
                // Metric data points.
                "dataPoints": [
                    {
                        // Metrics attributes.
                        "attributes": [
                            {
                                "key": "api",
                                "value": {
                                    "stringValue": "6.6.0"
                                }
                            },
                            {
                                "key": "user",
                                "value": {
                                    "stringValue": "user_42"
                                }
                            },
                            {
                                "key": "platformVersion",
                                "value": {
                                    "stringValue": "9.4.0.34"
                                }
                            },
                            {
                                "key": "application",
                                "value": {
                                    "stringValue": "my-app"
                                }
                            }
                        ],
                        "bucketCounts": [
                            0,
                            1,
                            0,
                            0,
                            0,
                            0
                        ],
                        "explicitBounds": [
                            100,
                            1000,
                            10000,
                            30000,
                            60000
                        ],
                        "count": 1,
                        "sum": 483,
                        "min": 483,
                        "max": 483,
                        "startTimeUnixNano": "1723555102580000000",
                        "timeUnixNano": "1723556246869000000"
                    }
                ]
            }
        }
    ]
}
```

## Common Metrics Attributes

All metrics data points have the following common attributes:

| Attribute | Description |
|-----------|-------------|
| `"platformVersion"` | The version of the platform (e.g., `"10.1.0"`). |
| `"sid"` | The impersonated (SSO) user identity, set after authentication. This may differ from `"user"` when one person authenticates as another. *Available since **io.Connect Desktop** 10.1.* |
| `"user"` | The io.Connect user identity (e.g., `"user_42"`). |

All additional data point attributes provided via the platform configuration or dynamically via the Insights API will also be included in the respective data points. If the resource-level attributes are configured to be merged with the data point attributes, all resource-level attributes will also be included in every data point.

> ℹ️ *For details on the resource-level attributes common to all signals (metrics, traces, logs), see the [Signals > Overview > Common Resource Attributes](https://docs.interop.io/insights/signals/overview/index.md#common_resource_attributes) section.*
