fix sigma modifier chains and true multi-engine service-map p95#261
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #255. Two correctness follow-ups from the bug-hunt sweep, both validated against real ClickHouse, MongoDB and TimescaleDB.
Item 1 - Sigma compound field-modifier chains
parseFieldWithModifiersplit a field key on|but kept only the first modifier, so chains likeCommandLine|utf16le|base64offset|contains(PowerShell-encstyle) matched incorrectly.base64,base64offset,utf16le/utf16/utf16be/wide,windash. Comparators: existing + newcidrand numericgt/gte/lt/lte.base64/base64offsetnow ENCODE the pattern (field checked forbase64(value)) rather than decoding the field;|allis now the list quantifier (OR -> AND over a value list), not the old "all whitespace-split words in any order". The two old tests asserting the previous behavior were replaced.Item 2 - true service-map p95 (multi-engine)
The map reported
MAX(duration_p95_ms)from the per-bucket spans continuous aggregate, which overestimates (a p95 is not derivable from per-bucket p95s) and was only ever produced on TimescaleDB.timescale/timescaledb:latest-pg16lackstimescaledb_toolkit, and MongoDB has no mergeable sketch.reservoir.getServiceHealthStatscomputes a true window p95 directly from raw spans per engine:percentile_cont(TimescaleDB),quantile(0.95)(ClickHouse),$percentile(MongoDB, approximate, 7.0+). ClickHouse/Mongo service maps now carry real call/error/latency/p95 figures where they previously had none.traces/service.tscalls the new method;spans_hourly_stats/spans_daily_statsare unchanged and still back the dashboards.No database migrations.
Tests
getServiceHealthStatsintegration tests per engine