-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
58 additions
and
7 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -25,3 +25,5 @@ | |
CONFIG_NODE_PORT = "port" | ||
|
||
DEFAULT_SERVER_HOST = "localhost" | ||
|
||
ENDPOINT_DEVICES = "devices" |
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
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 |
---|---|---|
@@ -1,11 +1,28 @@ | ||
from prometheus_client import Gauge | ||
from prometheus_client import Gauge, Summary | ||
|
||
from barcode_server.const import * | ||
|
||
WEBSOCKET_CLIENT_COUNT = Gauge( | ||
'websocket_client_count', | ||
'Number of currently connected websocket clients' | ||
) | ||
|
||
DEVICES_COUNT = Gauge( | ||
'devices_count', | ||
'Number of devices currently detected' | ||
'Number of currently detected devices' | ||
) | ||
|
||
SCAN_COUNT = Gauge( | ||
'scan_count', | ||
'Number of times a scan has been detected' | ||
) | ||
|
||
DEVICE_DETECTION_TIME = Summary('device_detection_processing_seconds', 'Time spent detecting devices') | ||
|
||
REST_TIME = Summary('rest_endpoint_processing_seconds', 'Time spent in a rest command handler', ['endpoint']) | ||
REST_TIME_DEVICES = REST_TIME.labels(endpoint=ENDPOINT_DEVICES) | ||
|
||
NOTIFIER_TIME = Summary('notifier_processing_seconds', 'Time spent in a notifier', ['type']) | ||
WEBSOCKET_NOTIFIER_TIME = NOTIFIER_TIME.labels(type='websocket') | ||
HTTP_NOTIFIER_TIME = NOTIFIER_TIME.labels(type='http') | ||
MQTT_NOTIFIER_TIME = NOTIFIER_TIME.labels(type='mqtt') |
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