mirror of
https://github.com/SigNoz/signoz.git
synced 2026-04-26 22:00:23 +01:00
* fix: handle empty not() expression * fix: handle more cases * fix: short circuit conditions and updated unit tests * fix: revert commented code * fix: added more unit tests * fix: added integration tests * fix: make py-lint and make py-fmt * fix: moved from traces to logs for testing full text search * fix: simplify code * fix: added more unit tests * fix: addressed comments * fix: update comment Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> * fix: update unit test Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> * fix: update unit test Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com> * fix: instead of using true, using a skip literal * fix: unit test * fix: update integration test * fix: update unit for relevance * fix: lint error * fix: added a new literal for error condition, added more unit tests * fix: merge issues * fix: inline comments * fix: update unit tests merging from main * fix: make py-fmt and make py-lint * fix: type handling --------- Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
28 lines
491 B
Go
28 lines
491 B
Go
package querybuilder
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
TrueConditionLiteral = "true"
|
|
SkipConditionLiteral = "__skip__"
|
|
ErrorConditionLiteral = "__skip_because_of_error__"
|
|
)
|
|
|
|
var (
|
|
SkippableConditionLiterals = []string{SkipConditionLiteral, ErrorConditionLiteral}
|
|
)
|
|
|
|
var (
|
|
BodyJSONQueryEnabled = GetOrDefaultEnv("BODY_JSON_QUERY_ENABLED", "false") == "true"
|
|
)
|
|
|
|
func GetOrDefaultEnv(key string, fallback string) string {
|
|
v := os.Getenv(key)
|
|
if len(v) == 0 {
|
|
return fallback
|
|
}
|
|
return v
|
|
}
|