# Metrics Definitions

## View and query data

The following table describes the different metrics that VGS provides via our dedicated Prometheus&#x20;

### Core Platform Metrics

<table><thead><tr><th width="184.88671875">Metric</th><th>Dimensions</th><th>Description</th></tr></thead><tbody><tr><td><code>vault_record_usage</code><br>(gauge)</td><td><code>tenant_id</code> - vault identifier<br><code>env</code> - sandbox / live<br><code>action</code> - CREATED / RETRIEVED / DE_DUPE / RE_ALIAS / DE_ALIAS / DELETED<br><code>format</code> - Generic VGS alias / Payment Card Format preserved, etc<br><code>persistence</code> - persistent / volatile<br><code>phase</code> - REQUEST / RESPONSE<br><code>route_id</code> - route identifier</td><td>Alias interactions performed by proxy:<br><br>- <em>CREATED</em> - creating an alias to remove sensitive information from the payload and replace them with a synthetic value<br><br>- <em>RETRIEVED</em> - revealing the alias to restore sensitive data pieces on a previously redacted payload<br><br>- <em>RE_ALIAS</em> - adding an alias to a multi-alias entry as in different formats of representing the same value (like cc number)<br><br>- <em>DE_ALIAS</em> - removing an alias from a multi-alias entry<br><br>- <em>DE_DUPE</em> - attempt to create and redact a record that already exists<br><br>- <em>DELETED</em> - permanently deleting an alias<br><br>Rate - the number of record usage, per minute.</td></tr><tr><td><code>vault_record_usage_failure</code><br>(gauge)</td><td><code>tenant_id</code> - vault identifier<br><code>env</code> - sandbox / live<br><code>action</code> - CREATED / RETRIEVED / DE_DUPE / RE_ALIAS / DE_ALIAS / DELETED<br><code>error</code> - NOT_FOUND / ACCESS_DENIED / TOKENIZATION_FAILED<br><code>persistence</code> - persistent / volatile<br><code>route_id</code> - route identifier</td><td>Failed alias interactions performed by proxy.<br><br>Error types:<br><br>- <em>NOT_FOUND</em> - exception raised if searching for an object and it’s not found<br><br>- <em>ACCESS_DENIED</em> - exception raised if searching for an object and it’s found but access is denied based on request classifiers and tags on a token<br><br>- <em>TOKENIZATION_FAILED</em> - exception raised if there are issues during tokenization or detokenization of a value<br><br>Rate - the number of record usage failures, per minute.</td></tr></tbody></table>

### HTTP Proxy Metrics

| Metric                                                                                       | Dimensions                                                                                                                                                                                                                                                                     | Description                                                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><code>http\_proxy\_request</code><br>(gauge)</p>                                          | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - http<br><code>proxy</code> - reverse / forward<br><code>env</code> - sandbox / live<br><code>method</code> - http method</p>                                                                       | <p>Representation of every http request to measure.<br><br>Rate - the number of requests, per minute, for the services that you are serving.</p>                                                                                                                         |
| <p><code>http\_proxy\_response</code><br>(gauge)</p>                                         | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - http<br><code>proxy</code> - reverse / forward<br><code>env</code> - sandbox / live<br><code>method</code> - http method<br><code>code</code> – http response code</p>                             | <p>Representation of every http response to measure.<br><br>Rate - the number of requests, per minute, for the services that you are serving.</p>                                                                                                                        |
| <p><code>http\_upstream\_response</code><br>(gauge)</p>                                      | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - http<br><code>proxy</code> - reverse / forward<br><code>env</code> - sandbox / live<br><code>code</code> - http status code<br><code>upstream\_host</code> - host, proxy upstreamed request to</p> | <p>A counter of the number of upstream responses the proxy has received.<br><br>Good for rate measurement as much as for errors - the number of failed requests per minute.<br><br>Rate - the number of requests, per minute, for the services that you are serving.</p> |
| <p><code>http\_proxy\_processing\_</code><br><code>duration\_ms</code><br>(histogram)</p>    | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - http<br><code>proxy</code> - reverse / forward<br><code>env</code> - sandbox / live<br><code>method</code> - http method<br><code>label</code> - clientToProxyRequest / proxyToClientResponse</p>  | <p>Processing time for different phases of requests interacting with proxy.<br><br>Duration - distributions of the amount of time each request takes.</p>                                                                                                                |
| <p><code>http\_upstream\_processing\_</code><br><code>duration\_ms</code><br>(histogram)</p> | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - http<br><code>proxy</code> - reverse / forward<br><code>env</code> - sandbox / live<br><code>upstream\_host</code> - host, proxy upstreamed request to</p>                                         | <p>Representation of the time it took to process a request for an upstream.<br><br>Duration - distributions of the amount of time each request takes.</p>                                                                                                                |

### SFTP Proxy Metrics

| Metric                                                                                    | Dimensions                                                                                                                                                                                                                                                                                                     | Description                                                                                                                                                                                                                                                         |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>sftp\_proxy\_processing\_</code><br><code>duration\_ms</code><br>(histogram)</p> | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - sftp<br><code>env</code> - sandbox / live<br><code>sftp\_operation</code> - SFTP operation being performed (PUT or GET)<br><code>upstream</code> - SFTP upstream host and port<br><code>status</code> - SFTP processing status</p> | <p>Processing time for different phases of requests interacting with proxy, with breakdown on SFTP message specifics. Should be used for customers who employ SFTP proxy integration.<br><br>Duration - distributions of the amount of time each request takes.</p> |
| <p><code>sftp\_proxy\_request</code><br>(gauge)</p>                                       | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - sftp<br><code>env</code> - sandbox / live<br><code>sftp\_operation</code> - SFTP operation being performed (PUT or GET)<br><code>upstream</code> - SFTP upstream host and port<br><code>status</code> - SFTP processing status</p> | <p>Representation of every SFTP request to measure.<br><br>Rate - the number of requests, per minute, for the services that you are serving.</p>                                                                                                                    |

### ISO8583 Proxy Metrics

| Metric                                                                                         | Dimensions                                                                                                                                                                                                                                                                                                                                                                                            | Description                                                                                                                                                                                        |
| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>iso\_8583\_proxy\_processing\_</code><br><code>duration\_ms</code><br>(histogram)</p> | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - http<br><code>env</code> - sandbox / live<br><code>message\_type</code> - <a href="https://en.wikipedia.org/wiki/ISO_8583#Message_type_indicator_(MTI)">Message Type Indicator</a> (Hex Encoded)<br><code>execution\_type</code> - TCP execution type<br><code>label</code> - CLIENT\_TO\_SERVER / SERVER\_TO\_CLIENT</p> | <p>Processing time for different phases of requests interacting with proxy, with breakdown on TCP message specifics.<br><br>Duration - distributions of the amount of time each request takes.</p> |
| <p><code>iso\_8583\_proxy\_request</code><br>(gauge)</p>                                       | <p><code>tenant\_id</code> - vault identifier<br><code>application</code> - http<br><code>env</code> - sandbox / live<br><code>message\_type</code> - <a href="https://en.wikipedia.org/wiki/ISO_8583#Message_type_indicator_(MTI)">Message Type Indicator</a> (Hex Encoded)<br><code>execution\_type</code> - TCP execution type<br><code>label</code> - CLIENT\_TO\_SERVER / SERVER\_TO\_CLIENT</p> | <p>Representation of every HTTP or TCP request to measure.<br><br>Rate - the number of requests, per minute, for the services that you are serving.</p>                                            |

## Custom Metrics

### File Processing

| Metric                                               | Dimensions                                                                                                                                                                                                                                                              | Description                                                                                                                                                                                                                                         |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><code>file\_processing\_timestamps</code><br></p> | <p><code>state</code> - file state</p><ul><li>RECEIVED, PROCESSING, FAILED, PROCESSED, DELIVERED, UNDELIVERABLE (see the diagram below)</li></ul><p><code>file\_name</code> - file name including the path prefix<br><code>tenant\_id</code> - vault identifier<br></p> | File processing exposes a single metric called file\_processing\_timestamps with two dimensions: state and file\_name and then a unix timestamp as the value. The timestamp is used to avoid any inaccuracy with timestamps as metrics are ingested |
| <p><code>file\_processing\_bytes</code><br></p>      | <p><code>state</code> - file state</p><ul><li>RECEIVED, PROCESSING, FAILED, PROCESSED, DELIVERED, UNDELIVERABLE (see the diagram below)</li></ul><p><code>file\_name</code> - file name including the path prefix<br><code>tenant\_id</code> - vault identifier<br></p> | Representation of the file size of the processed file                                                                                                                                                                                               |

Files passing through VGS transition through several states that help provide insight into the progress of the file.&#x20;

<figure><img src="/files/0uHHyLoCdfUrL1GMk4z1" alt=""><figcaption></figcaption></figure>

Observability Metrics data can be filtered along any of the dimensions in the table above.

Metrics can be used to help you understand the health of your integration. For example, if you notice the abnormal upstream responses, you can find the spike on the graph of non-200 status codes and all the details for failing requests. End-to-end visibility of latency and errors makes it easy to troubleshoot issues.

## Example PromQL Queries

### HTTP Proxy

#### View upstreams returning HTTP 5xx status codes

`http_proxy_upstream_response{upstream_host=~".*upstreamhost.com", code=~"5.."}`

This promql query will return any HTTP request to "\*.upstreamhost.com" that has an HTTP status code starting with 5 (e.g., 500 - 599)


---

# Agent Instructions: 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:

```
GET https://docs.verygoodsecurity.com/enterprise-platform/core-platform-services/observability/metrics-definitions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
