Skip to content

fix: safely parse cache type metric labels#948

Merged
cybermaggedon merged 1 commit into
trustgraph-ai:release/v2.5from
jmolz:fix-safe-cache-type-label
May 26, 2026
Merged

fix: safely parse cache type metric labels#948
cybermaggedon merged 1 commit into
trustgraph-ai:release/v2.5from
jmolz:fix-safe-cache-type-label

Conversation

@jmolz

@jmolz jmolz commented May 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #873.

Summary

  • Add a safe metric-label extractor for ontology monitoring cache metrics.
  • Support both current unquoted labels and quoted Prometheus-style label values.
  • Ignore cache_type= substrings that are not labels.

Tests

  • PYTHONPATH=trustgraph-flow python3 -m py_compile trustgraph-flow/trustgraph/query/ontology/monitoring.py tests/unit/test_query/test_ontology_monitoring.py
  • PYTHONPATH=trustgraph-flow pytest tests/unit/test_query/test_ontology_monitoring.py
  • ruff check tests/unit/test_query/test_ontology_monitoring.py
  • git diff HEAD^ --check

@github-actions

github-actions Bot commented May 22, 2026

Copy link
Copy Markdown

Contributor License Agreement ✅

All contributors have signed the CLA. Thank you!

@jmolz

jmolz commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@cybermaggedon

Copy link
Copy Markdown
Contributor

Thanks for the PR, appreciated!

@cybermaggedon cybermaggedon merged commit c10f269 into trustgraph-ai:release/v2.5 May 26, 2026
2 checks passed
@jmolz jmolz deleted the fix-safe-cache-type-label branch May 26, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants