Skip to content

Commit

Permalink
feat: add chart request by scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmendes21 committed Feb 6, 2025
1 parent 3015e74 commit de100bc
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const HELP_CENTER_URLS = {
missedRequests: '/real-time-metrics/edge-applications/requests/missed-requests',
requestsByMethod: '/real-time-metrics/edge-applications/requests/requests-by-method',
averageRequestTime: '/real-time-metrics/edge-applications/requests/average-request-time',
requestByScheme: '/real-time-metrics/edge-applications/requests/request-by-scheme',
requestsOffloaded: '/real-time-metrics/edge-applications/requests/requests-offloaded',
requestsPerSecondOffloaded:
'/real-time-metrics/edge-applications/requests/requests-per-second-offloaded',
Expand Down
27 changes: 27 additions & 0 deletions src/modules/real-time-metrics/constants/reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,33 @@ const REPORTS = [
dashboardId: '357548623571976783',
helpCenterPath: HELP_CENTER_URLS.edgeApplications.requests.averageRequestTime
},
{
id: '357825388709151312',
chartOwner: 'azion',
label: 'Requests by Scheme',
description: '',
aggregationType: 'sum',
columns: 6,
type: 'line',
xAxis: 'ts',
isTopX: false,
rotated: false,
dataset: 'httpMetrics',
dataUnit: 'count',
limit: 10000,
fields: [],
groupBy: ['ts', 'scheme'],
aggregations: [
{
aggregation: 'sum',
variable: 'requests'
}
],
orderDirection: 'ASC',
variationType: 'inverse',
dashboardId: '357548623571976783',
helpCenterPath: HELP_CENTER_URLS.edgeApplications.requests.requestByScheme
},
/**
* BUILD
* Edge Applications - Status Codes
Expand Down
27 changes: 27 additions & 0 deletions src/tests/modules/real-time-metrics/constants/reports.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,33 @@ describe('RealTimeMetricsModule', () => {
type: 'line',
xAxis: 'ts'
},
{
aggregationType: 'sum',
chartOwner: 'azion',
columns: 6,
dashboardId: '357548623571976783',
dataUnit: 'count',
dataset: 'httpMetrics',
description: '',
fields: [],
groupBy: ['ts', 'scheme'],
aggregations: [
{
aggregation: 'sum',
variable: 'requests'
}
],
helpCenterPath: '/real-time-metrics/edge-applications/requests/request-by-scheme',
id: '357825388709151312',
variationType: 'inverse',
isTopX: false,
label: 'Requests by Scheme',
limit: 10000,
orderDirection: 'ASC',
rotated: false,
type: 'line',
xAxis: 'ts'
},
{
aggregationType: 'sum',
chartOwner: 'azion',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,37 @@ ts
}
}
},
{
id: '357825388709151312',
label: 'Requests by Scheme',
gqlQuery: {
query: `query ($tsRange_begin:DateTime!, $tsRange_end:DateTime!) {
httpMetrics (
limit: 10000
aggregate: {sum: requests
}
groupBy: [ts, scheme]
orderBy: [ts_ASC]
filter: {
tsRange: {
begin: $tsRange_begin
end: $tsRange_end
}
}
) {
sum
ts
scheme
}
}`,
variables: {
tsRange_begin: '2024-01-01T12:00:00',
tsRange_end: '2024-12-01T12:00:00'
}
}
},
{
id: '357825388709151309',
label: 'Requests by Method',
Expand Down

0 comments on commit de100bc

Please sign in to comment.