MCPcopy Index your code
hub / github.com/getsentry/sentry / appendExcludeTagValuesCondition

Function appendExcludeTagValuesCondition

static/app/utils/queryString.tsx:73–99  ·  view source on GitHub ↗
(
  query: QueryValue,
  key: string,
  values: string[]
)

Source from the content-addressed store, hash-verified

71}
72
73export function appendExcludeTagValuesCondition(
74 query: QueryValue,
75 key: string,
76 values: string[]
77): string {
78 let currentQuery = Array.isArray(query)
79 ? query.pop()
80 : typeof query === 'string'
81 ? query
82 : '';
83 const filteredValuesCondition = `[${values
84 .map(value => {
85 if (typeof value === 'string' && /[\s"]/.test(value)) {
86 value = `"${escapeDoubleQuotes(value)}"`;
87 }
88 return value;
89 })
90 .join(', ')}]`;
91
92 if (currentQuery) {
93 currentQuery += ` !${key}:${filteredValuesCondition}`;
94 } else {
95 currentQuery = `!${key}:${filteredValuesCondition}`;
96 }
97
98 return currentQuery;
99}
100
101// This function has multiple signatures to help with typing in callers.
102export function decodeScalar(value: QueryValue): string | undefined;

Callers 2

Calls 4

escapeDoubleQuotesFunction · 0.90
popMethod · 0.45
joinMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected