Closed joe-elliott closed 2 days ago
BenchmarkBlockTraceql was adjusted to:
{"plain", `{span:name=~"HTTP GET" }`},
{"||ed", `{span:name=~"HTTP GET|HTTP POST|HTTP PUT" }`},
{"prefix", `{span:name=~"HTTP GET.*" }`},
{"postfix", `{span:name=~".*GET" }`},
{"substring", `{span:name=~".*HTTP GET.*" }`},
{"caseinsensitive", `{span:name=~"(?i:HTTP GET)" }`},
{"rando", `{span:name=~".*G([A-Z]+)T.*" }`},
{"mutiple", `{span:name=~".*HTTP.*GET.*" }`},
{"all", `{span:name=~".*" }`},
My primary concern with this PR is that we are now memoizing at the fetch and engine layers. This will cause extra allocations for certain queries. Should we remove this for the engine layer to match current behavior?
To respond to my own question. I believe the implementation is fine as is. It would be preferable to share the memoization, but this is such a small percentage of total allocs and cpu and the solutions to sharing memoization are so gnarly that I believe this path is the best for now.
Perhaps some future developer can find a way to cleanly share memoization between the fetch layer and engine.
What this PR does: Uses prometheus' fast regexp package instead of the standard go regexp for performance. This does create a breaking change in Tempo as prometheus regexps are always anchored.
This
{ span.foo =~ "bar" }
used to be a substring search. After this PR it will be an exact match.My primary concern with this PR is that we are now memoizing at the fetch and engine layers. This will cause extra allocations for certain queries. Should we remove this for the engine layer to match current behavior?
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]