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

Function generateQueryWithTag

static/app/utils/queryString.tsx:199–221  ·  view source on GitHub ↗
(prevQuery: Query, tag: EventTag)

Source from the content-addressed store, hash-verified

197}
198
199export function generateQueryWithTag(prevQuery: Query, tag: EventTag): Query {
200 const query = {...prevQuery};
201
202 // some tags are dedicated query strings since other parts of the app consumes this,
203 // for example, the global selection header.
204 switch (tag.key) {
205 case 'environment':
206 query.environment = tag.value;
207 break;
208 case 'project':
209 query.project = tag.value;
210 break;
211 default:
212 query.query = appendTagCondition(query.query, tag.key, tag.value);
213 }
214
215 // Checking for the absence of a tag value.
216 if (tag.value === '') {
217 query.query = `!has:${tag.key}`;
218 }
219
220 return query;
221}

Callers 4

EventTagsTreeRowDropdownFunction · 0.90
TagValueActionsMenuFunction · 0.90
ResultsClass · 0.90

Calls 1

appendTagConditionFunction · 0.85

Tested by

no test coverage detected