Repository navigation
feat(workbench): introduce timeline severity bitmask cache and hasSeverity CEL function - #914
Merged
Merged
Conversation
…erity CEL function Previously, timeline filtering by severity in the backend was limited to minSeverity(order), which only checked whether the timeline's maximum severity met a given threshold. Specific severity matching or arbitrary sets of severities could not be filtered efficiently at the timeline level. This commit introduces: - SeverityMask uint8 on cel.TimelineData to record which severity levels are present in each timeline using bitwise operations across events and revisions during indexing. - hasSeverity(int) and hasSeverity(list<int>) CEL functions in TimelineEvaluator to evaluate whether a timeline contains logs matching a single severity or any severity in a given list.
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
August 27, 2026 00:45
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new hasSeverity CEL function to check if a timeline matches a specific severity or a list of severities. This is supported by adding a SeverityMask to TimelineData and computing it during timeline indexing. The review feedback points out a potential runtime panic in hasSeverityList where list.Size().(types.Int) is type-asserted without the comma-ok idiom, which could crash the application if an error or non-integer type is returned.
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.
Summary
Previously, timeline filtering by severity in the backend was limited to
minSeverity(order), which only checked whether the timeline's maximum severity met a given threshold. Specific severity matching or arbitrary sets of severities could not be filtered efficiently at the timeline level.This PR introduces:
SeverityMask uint8oncel.TimelineDatato record which severity levels are present in each timeline using bitwise operations across events and revisions during indexing.hasSeverity(int)andhasSeverity(list<int>)CEL functions inTimelineEvaluatorto evaluate whether a timeline contains logs matching a single severity or any severity in a given list.cel/env_test.goandworkbench/index_test.go.Testing
go test ./pkg/server/workbench/...make build-gomake test-gomake lint-gomake format-gomake pre-commit