Clean up metrics
This commit is contained in:
parent
a30c7b2996
commit
857e47e539
@ -11,10 +11,10 @@ from sanic_prometheus import monitor
|
|||||||
from bson.objectid import ObjectId
|
from bson.objectid import ObjectId
|
||||||
|
|
||||||
|
|
||||||
streams_opened = Counter("pinecrypt_events_stream_opened",
|
streams_opened = Counter("pinecrypt_gateway_streams_started",
|
||||||
"Event stream opened count")
|
"Total number event stream has been opened.")
|
||||||
events_emitted = Counter("pinecrypt_events_emitted",
|
events_emitted = Counter("pinecrypt_gateway_events_emitted",
|
||||||
"Events emitted count")
|
"Total number of events emitted via event streams.")
|
||||||
|
|
||||||
|
|
||||||
app = Sanic("events")
|
app = Sanic("events")
|
||||||
|
@ -16,11 +16,15 @@ from pinecrypt.server.user import User
|
|||||||
from pinecrypt.server import const, errors, db
|
from pinecrypt.server import const, errors, db
|
||||||
from prometheus_client import Counter, Histogram
|
from prometheus_client import Counter, Histogram
|
||||||
|
|
||||||
clock_skew = Histogram("pinecrypt_authority_clock_skew",
|
clock_skew = Histogram(
|
||||||
"Histogram of client-server clock skew", ["method", "path", "passed"],
|
"pinecrypt_gateway_clock_skew",
|
||||||
|
"Histogram of client-server clock skew.",
|
||||||
|
["method", "path", "passed"],
|
||||||
buckets=(0.1, 0.5, 1.0, 5.0, 10.0, 50.0, 100.0, 500.0, 1000.0, 5000.0))
|
buckets=(0.1, 0.5, 1.0, 5.0, 10.0, 50.0, 100.0, 500.0, 1000.0, 5000.0))
|
||||||
whitelist_blocked_requests = Counter("pinecrypt_authority_whitelist_blocked_requests",
|
whitelist_blocked_requests = Counter(
|
||||||
"Requests blocked by whitelists", ["method", "path"])
|
"pinecrypt_gateway_whitelist_blocked_requests",
|
||||||
|
"Requests blocked by whitelists.",
|
||||||
|
["method", "path"])
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user