This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CVE-2020-14319: Deny mutation operations unless an existing session e…
…xists (cherry picked from commit ee03e22)
- Loading branch information
Showing
8 changed files
with
276 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright 2020, EnMasse authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
* | ||
*/ | ||
|
||
package server | ||
|
||
import "github.com/prometheus/client_golang/prometheus" | ||
|
||
func CreateMetrics() (*prometheus.HistogramVec, *prometheus.CounterVec, prometheus.Gauge) { | ||
queryTimeMetric := prometheus.NewHistogramVec(prometheus.HistogramOpts{ | ||
Name: "console_query_time_seconds", | ||
Help: "The query time in seconds", | ||
Buckets: prometheus.DefBuckets, | ||
}, []string{"operationName"}) | ||
queryErrorCountMetric := prometheus.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "console_query_error_total", | ||
Help: "Number of queries that have ended in error", | ||
}, []string{"operationName"}) | ||
sessionCountMetric := prometheus.NewGauge(prometheus.GaugeOpts{ | ||
Name: "console_active_sessions", | ||
Help: "Number of active HTTP sessions", | ||
}) | ||
return queryTimeMetric, queryErrorCountMetric, sessionCountMetric | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
*/ | ||
|
||
package server | ||
package query | ||
|
||
import ( | ||
"github.com/stretchr/testify/assert" | ||
|
Oops, something went wrong.