Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _get_query_prometheus_value(self, query: str) -> Optional[float]:
value = query_result.vector_result[0]["value"]["value"]
return_value = float("%.2f" % float(value))
return return_value if return_value >= 0 else None
except:
except Exception:
logging.exception("PrometheusDiscoveryUtils failed to get prometheus results.")
return

Expand Down
2 changes: 1 addition & 1 deletion src/robusta/core/sinks/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def trim_markdown(text: str, max_length: int, suffix: str = "...") -> str:
def apply_length_limit_to_markdown(msg: str, max_length: int, truncator: str = "...") -> str:
try:
return Transformer.trim_markdown(msg, max_length, truncator)
except:
except Exception:
return Transformer.apply_length_limit(msg, max_length, truncator)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion src/robusta/integrations/prometheus/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def update_severity_map(global_config):
custom_severity_map = global_config.get("custom_severity_map", {})
for key in custom_severity_map.keys():
SEVERITY_MAP[key] = FindingSeverity.from_severity(custom_severity_map[key].upper())
except:
except Exception:
logging.exception("Failed to map custom severities")


Expand Down