Skip to content

Commit

Permalink
remove guid and leave just the protocol label
Browse files Browse the repository at this point in the history
  • Loading branch information
themarcelor committed May 17, 2021
1 parent ad27a97 commit c51f3df
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fence/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def _setup_prometheus(app):
app.prometheus_counters["pre_signed_url_req"] = Counter(
"pre_signed_url_req",
"tracking presigned url requests",
["guid", "requested_protocol"],
["requested_protocol"],
)


Expand Down
2 changes: 1 addition & 1 deletion fence/blueprints/data/indexd.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_signed_url_for_file(action, file_id, file_name=None):
# increment counter for gen3-metrics
counter = flask.current_app.prometheus_counters.get("pre_signed_url_req")
if counter:
counter.labels(file_id, requested_protocol).inc()
counter.labels(requested_protocol).inc()

if action == "download": # for now only record download requests
create_presigned_url_audit_log(
Expand Down
2 changes: 0 additions & 2 deletions tests/data/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def test_indexd_prometheus_presigned_url_counter(
app.prometheus_registry.get_sample_value(
"pre_signed_url_req_total",
{
"guid": "1",
"requested_protocol": indexd_client["indexed_file_location"],
},
)
Expand Down Expand Up @@ -138,7 +137,6 @@ def test_indexd_prometheus_presigned_url_counter(
after = app.prometheus_registry.get_sample_value(
"pre_signed_url_req_total",
{
"guid": "1",
"requested_protocol": indexd_client["indexed_file_location"],
},
)
Expand Down

0 comments on commit c51f3df

Please sign in to comment.