Rust prometheus client causing parsing exception
I'm trying to debug the https://gitlab.com/gitlab-org/gitlab/-/jobs/4455309084 since some time.
- It appears that this is problem due to usage of
fast_mmapped_rs
implementation - The
.db
reproducing error counter_process_16709-0.db - It appears that it fails on parsing the
["gitlab_database_decomposition_gitlab_schemas_used","gitlab_database_decomposition_gitlab_schemas_used",["db_config_name","gitlab_schemas"],["main","gitlab_ci,gitlab_main"]]
- Likely due to manual parsing of JSON labels without understanding commas, quotes and escape sequences: https://gitlab.com/gitlab-org/ruby/gems/prometheus-client-mmap/-/blob/master/ext/fast_mmaped_file_rs/src/parser.rs#L123
RuntimeError:
Processed entries 5150 != map entries 5151
Shared Example Group: "rate-limited unauthenticated requests" called from ./spec/requests/rack_attack_global_spec.rb:51
# ./app/services/metrics_service.rb:8:in `prometheus_metrics_text'
# ./app/services/metrics_service.rb:15:in `metrics_text'
# ./app/controllers/metrics_controller.rb:11:in `index'
Edited by Kamil Trzciński (Back 2025-01-01)