Querying Privacy Gateway Metrics
Privacy Gateway now supports enhanced monitoring through our GraphQL API, providing detailed insights into your gateway traffic and performance. To access these metrics, ensure you have:
- A relay gateway proxy implementation where Cloudflare acts as the oblivious relay party.
- An API token with Analytics Read permissions.
We offer two GraphQL nodes to retrieve metrics:
ohttpMetricsAdaptiveandohttpMetricsAdaptiveGroups. The first node provides comprehensive request data, while the second facilitates grouped analytics.
ohttpMetricsAdaptive
The ohttpMetricsAdaptive node is designed for detailed insights into individual OHTTP requests with adaptive sampling. This node can help in understanding the performance and load on your server and client setup.
Key Arguments
filter- Apply filters to narrow down your data set.
accountTagis a required filter.
- Apply filters to narrow down your data set.
limit- Specify the maximum number of records to return.
orderBy- Choose how to sort your data, with options for various dimensions and metrics.
Available Fields
bytesToClientint- The number of bytes returned to the client.
bytesToGatewayint- Total bytes received from the client.
colostring- Airport code of the Cloudflare data center that served the request.
datetimeTime- The date and time when the event was recorded.
gatewayStatusCodeint- Status code returned by the gateway.
relayStatusCodeint- Status code returned by the relay.
This node is useful for a granular view of traffic, helping you identify patterns, performance issues, or anomalies in your data flow.
ohttpMetricsAdaptiveGroups
The ohttpMetricsAdaptiveGroups node allows for aggregated analysis of OHTTP request metrics with adaptive sampling. This node is particularly useful for identifying trends and patterns across different dimensions of your traffic and operations.
Key Arguments
filter- Apply filters to narrow down your data set.
accountTagis a required filter.
- Apply filters to narrow down your data set.
limit- Specify the maximum number of records to return.
orderBy- Choose how to sort your data, with options for various dimensions and metrics.
Available Fields
countint- The number of records that meet the criteria.
dimensions- Specifies the grouping dimensions for your data.
sum- Aggregated totals for various metrics, per dimension.
Dimensions
You can group your metrics by various dimensions to get a more segmented view of your data:
colostring- The airport code of the Cloudflare data center.
dateDate- The date of OHTTP request metrics.
datetimeFifteenMinutesTime- Timestamp truncated to fifteen minutes.
datetimeFiveMinutesTime- Timestamp truncated to five minutes.
datetimeHourTime- Timestamp truncated to the hour.
datetimeMinuteTime- Timestamp truncated to the minute.
endpointstring- The appId that generated traffic.
gatewayStatusCodeint- Status code returned by the gateway.
relayStatusCodeint- Status code returned by the relay.
Sum Fields
Sum fields offer a cumulative view of various metrics over your selected time period:
bytesToClientint- Total bytes sent from the gateway to the client.
bytesToGatewayint- Total bytes from the client to the gateway.
clientRequestErrorsint- Total number of client request errors.
gatewayResponseErrorsint- Total number of gateway response errors.
Utilize the ohttpMetricsAdaptiveGroups node to gain comprehensive, aggregated insights into your traffic patterns, helping you optimize performance and user experience.