Skip to content

Commit ffaf3d3

Browse files
mishaschwartzhuard
andauthored
Apply suggestions from code review
Co-authored-by: David Huard <[email protected]>
1 parent 3f052e4 commit ffaf3d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

birdhouse/optional-components/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ To view all metrics exported by the log parser:
469469

470470
For developers, to create a new parser that can be used to track log files:
471471

472-
1. create a python file that is can be mounted as a volume to the ``PROMETHEUS_LOG_PARSER_PARSERS_DIR``
472+
1. create a python file that can be mounted as a volume to the ``PROMETHEUS_LOG_PARSER_PARSERS_DIR``
473473
directory on the ``prometheus-log-parser`` container.
474474
2. mount any log files that you want to parse as a volume on the ``prometheus-log-parser`` container.
475475
3. the python script must contain a variable named ``LOG_PARSER_CONFIG`` which is a

birdhouse/optional-components/prometheus-log-parser/config/thredds/prometheus-log-exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
LABEL_KEYS = ("remote_addr", "date", "tds_service", "dataset", "variable")
2828

29-
Counter = prometheus_client.Counter(
29+
counter = prometheus_client.Counter(
3030
name="thredds_transfer_size_kb",
3131
documentation="THREDDS data transferred",
3232
labelnames=LABEL_KEYS,
@@ -39,6 +39,6 @@ def parse_line(line):
3939
labels = {label: match.group(label) or "" for label in LABEL_KEYS}
4040
if body_byte_sent := match.group("body_byte_sent") is not None:
4141
body_byte_sent = int(body_byte_sent) / 1024
42-
Counter.labels(**labels).inc(body_byte_sent)
42+
counter.labels(**labels).inc(body_byte_sent)
4343

4444
LOG_PARSER_CONFIG = {f"/var/log/proxy/{os.getenv('PROXY_LOG_FILE')}": [parse_line]}

0 commit comments

Comments
 (0)