Skip to content

Commit

Permalink
always track error count, even if no error
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Jan 31, 2024
1 parent 22ed8f8 commit a381d9b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions google/cloud/bigtable/data/_metrics/handlers/opentelemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def on_attempt_complete(
attempt.gfe_latency,
{"streaming": is_streaming, "status": status, **labels},
)
else:
# gfe headers not attached. Record a connectivity error.
# TODO: this should not be recorded as an error when direct path is enabled
self.otel.connectivity_error_count.add(1, {"status": status, **labels})
# gfe headers not attached. Record a connectivity error.
# TODO: this should not be recorded as an error when direct path is enabled
is_error = attempt.gfe_latency is None
self.otel.connectivity_error_count.add(int(is_error), {"status": status, **labels})

0 comments on commit a381d9b

Please sign in to comment.