diff --git a/.netlify/glam_metrics_blocklist.json b/.netlify/glam_metrics_blocklist.json index 4a31364bf..c38d399b5 100644 --- a/.netlify/glam_metrics_blocklist.json +++ b/.netlify/glam_metrics_blocklist.json @@ -1,5 +1,5 @@ { - "regex": "/search_counts|browser_search|event_counts|browser_engagement_navigation|manager_message_size|dropped_frames_proportion/", + "regex": "search_counts|browser_search|event_counts|browser_engagement_navigation|manager_message_size|dropped_frames_proportion", "confidentialMetricsFenix": [ "characteristics.color_depth", "characteristics.color_gamut", diff --git a/etl/glean_etl.py b/etl/glean_etl.py index a2d265bb0..73ca53343 100644 --- a/etl/glean_etl.py +++ b/etl/glean_etl.py @@ -484,6 +484,7 @@ def write_glean_metadata(output_dir, functions_dir, app_names=None): in ["client_info", "ping_info"], bugs=metric.definition["bugs"], monitor=metric.definition.get("metadata", {}).get("monitor", {}), + notification_emails=metric.definition["notification_emails"], ), metric_annotation, ) diff --git a/src/state/filter.js b/src/state/filter.js index 342cda51e..24f670427 100644 --- a/src/state/filter.js +++ b/src/state/filter.js @@ -20,6 +20,10 @@ export const filterItemsByLabels = (items, labels) => { (label === "bugs" && labelsToFilter.bugs.every((el) => item.bugs.some((bug) => bug.endsWith(el)) + )) || + (label === "notification_emails" && + labelsToFilter.notification_emails.every((el) => + item.notification_emails.some((email) => email.startsWith(el)) ))) ); diff --git a/src/state/search.js b/src/state/search.js index c2d1404f0..7293f53a4 100644 --- a/src/state/search.js +++ b/src/state/search.js @@ -5,7 +5,15 @@ import { filterItemsByLabels, filterItemsByExpiration } from "./filter"; export const generateSearchIndex = (items) => { const searchIndex = new Document({ tokenize: "forward", - index: ["id", "type", "tags", "origin", "description", "bugs"], + index: [ + "id", + "type", + "tags", + "origin", + "description", + "bugs", + "notification_emails", + ], }); items.forEach((item) => { @@ -17,6 +25,7 @@ export const generateSearchIndex = (items) => { description: item.description, expires: item.expires, bugs: item.bugs, + notification_emails: item.notification_emails, }); }); @@ -35,6 +44,7 @@ export const fullTextSearch = (searchIndex, query, searchItems) => { expires: [], name: [], bugs: [], + notification_emails: [], }; searchTerms.forEach((term) => { @@ -44,10 +54,14 @@ export const fullTextSearch = (searchIndex, query, searchItems) => { term.startsWith("type:") || term.startsWith("expires:") || term.startsWith("name:") || - term.startsWith("bugs:") + term.startsWith("bugs:") || + term.startsWith("email:") ) { const splitter = term.indexOf(":"); - const labelType = term.slice(0, splitter); + let labelType = term.slice(0, splitter); + if (labelType === "email") { + labelType = "notification_emails"; + } labels[labelType] = [ ...labels[labelType], term.slice(splitter + 1).replace(/"?(.*?)"?$/, "$1"), diff --git a/tests/fixtures/glean.1.schema.json b/tests/fixtures/glean.1.schema.json index 49957c487..3b1697675 100644 --- a/tests/fixtures/glean.1.schema.json +++ b/tests/fixtures/glean.1.schema.json @@ -811,6 +811,42 @@ "seq": { "type": "integer" }, + "server_knobs_config": { + "additionalProperties": false, + "description": "The Server Knobs configuration applied via applyServerKnobsConfig. Contains the complete configuration including metrics_enabled, pings_enabled, and event_threshold settings.", + "properties": { + "event_threshold": { + "description": "Optional threshold for event buffering before an events ping is collected and submitted", + "minimum": 0, + "type": ["integer", "null"] + }, + "metrics_enabled": { + "additionalProperties": { + "type": "boolean" + }, + "description": "Map of metric identifiers (category.name) to boolean values indicating whether the metric is enabled", + "propertyNames": { + "maxLength": 61, + "pattern": "^[a-z_][a-z0-9_]{0,29}(\\.[a-z_][a-z0-9_]{0,29})+$", + "type": "string" + }, + "type": "object" + }, + "pings_enabled": { + "additionalProperties": { + "type": "boolean" + }, + "description": "Map of ping names to boolean values indicating whether the ping is enabled", + "propertyNames": { + "maxLength": 30, + "pattern": "^[a-z-_][a-z0-9-_]*$", + "type": "string" + }, + "type": "object" + } + }, + "type": "object" + }, "start_time": { "format": "datetime", "type": "string"