diff options
Diffstat (limited to 'pkg/metrics/statistics-provider.go')
-rw-r--r-- | pkg/metrics/statistics-provider.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/metrics/statistics-provider.go b/pkg/metrics/statistics-provider.go index 67cee79..ba55b27 100644 --- a/pkg/metrics/statistics-provider.go +++ b/pkg/metrics/statistics-provider.go @@ -1,3 +1,22 @@ +// - +// ========================LICENSE_START================================= +// Copyright (C) 2024: Deutsche Telekom +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// ========================LICENSE_END=================================== +// + // Handles an HTTP request to fetch the current system statistics. // It aggregates various decision counts (e.g., indeterminate, permit, deny) // and error counts into a structured response and sends it back to the client in JSON format. @@ -43,6 +62,8 @@ func FetchCurrentStatistics(res http.ResponseWriter, req *http.Request) { statReport.PermitDecisionsCount = PermitDecisionsCountRef() statReport.DenyDecisionsCount = DenyDecisionsCountRef() statReport.TotalErrorCount = TotalErrorCountRef() + statReport.QuerySuccessCount = TotalQuerySuccessCountRef() + statReport.QueryFailureCount = TotalQueryFailureCountRef() // not implemented hardcoding the values to zero // will be implemeneted in phase-2 |