diff --git a/README.md b/README.md index aa0c2ae..c1e1700 100644 --- a/README.md +++ b/README.md @@ -101,19 +101,6 @@ Right now this tool sends metrics to DataDog only. However, if you want to use t # Setting Up Your Dashboards -Gusto has two dashboards that we've created to view these metrics. We've also exported and released the Dashboard JSON for each of these dashboards. You can create a new dashboard and then click "import dashboard JSON" to get a jump start on tracking your metrics. Note you may want to make some tweaks to these dashboards to better fit your organization's circumstances and goals. +We recommend the use of the dashboard that is shipped with this gem. You can create a new dashboard and then click "import dashboard JSON" to get a jump start on tracking your metrics. Note you may want to make some tweaks to these dashboards to better fit your organization's circumstances and goals. -## [Modularization] Executive Summary - -This helps answer questions like: -- How are we doing on reducing dependency and privacy violations in your monolith overall? -- How are we doing overall on adopting packwerk? - -[Dashboard JSON](docs/executive_summary.json) - -## [Modularization] Per-Package and Per-Team -- How is each team and package doing on reducing dependency and privacy violations in your monolith? -- What is the total count of dependency/privacy violations for each pack/team and what's the change since last month? -- Which pack/team does my pack/team have the most dependency/privacy violations on? - -[Dashboard JSON](docs/per_package_and_per_team.json) +[Dashboard JSON](docs/dashboard.json) diff --git a/docs/dashboard.json b/docs/dashboard.json new file mode 100644 index 0000000..fa8d8dc --- /dev/null +++ b/docs/dashboard.json @@ -0,0 +1,931 @@ +{ + "title": "[Modularization] Pack Stats", + "description": "See text widget for dashboard documentation. (cloned)", + "widgets": [ + { + "id": 6370727016503428, + "definition": { + "title": "Click here to see the documentation for this dashboard!", + "background_color": "vivid_blue", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [ + { + "id": 5169947781850282, + "definition": { + "type": "note", + "content": "At the top, there are some template variables you can set to filter the entire dashboard by...\n\n- *app*: You can change this to HI (*hawaiianice*) or ZP (*zenpayroll*). Note if this is not set, you may see double-counting on some widgets.\n- *team*, e.g. `payments`\n- *package*: e.g. `packs/background_jobs`\n- *violation_type*: e.g. `dependency`, `privacy`\n- *max_enforcements*: By setting this to `true`, you will get the metrics as if `enforce_privacy` and `enforce_dependencies` were turned on for all packages.\n\nPro-tip: Click \"split graph\" in the \"full-screen\" mode of a widget to see a graph broken up by team, violation type, or package. Here's an [example (violations over time)](https://app.datadoghq.com/dashboard/s3q-cb3-bed?fullscreen_end_ts=1683557460383&fullscreen_paused=false&fullscreen_section=split%20graph&fullscreen_start_ts=1683543060383&fullscreen_widget=452601886481639&from_ts=1683543021000&to_ts=1683557421000&live=true)\n\nMore information at [https://go/packs](https://docs.google.com/document/d/1OGYqV1pt1r6g6LimCDs8RSIR7hBZ7BVO1yohk2Jnu0M/edit#heading=h.4cufcvb5oqvd)", + "background_color": "white", + "font_size": "16", + "text_align": "left", + "vertical_align": "top", + "show_tick": false, + "tick_pos": "50%", + "tick_edge": "left", + "has_padding": true + }, + "layout": { + "x": 0, + "y": 0, + "width": 12, + "height": 3 + } + } + ] + }, + "layout": { + "x": 0, + "y": 0, + "width": 12, + "height": 1 + } + }, + { + "id": 6323770581286804, + "definition": { + "title": "Violations By Package", + "title_align": "center", + "background_color": "vivid_purple", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [ + { + "id": 3643760892520117, + "definition": { + "title": "Current count (left) and monthly change (right) of violations", + "title_size": "16", + "title_align": "left", + "type": "change", + "requests": [ + { + "change_type": "absolute", + "compare_to": "hour_before", + "formulas": [ + { + "formula": "month_before(query1)" + }, + { + "formula": "query1", + "alias": "current violation count" + } + ], + "increase_good": false, + "order_by": "present", + "order_dir": "desc", + "queries": [ + { + "aggregator": "last", + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_package.violations.count{$app,$package,$team,$max_enforcements,$violation_type} by {package,violation_type}" + } + ], + "response_format": "scalar", + "show_present": true + } + ] + }, + "layout": { + "x": 0, + "y": 0, + "width": 12, + "height": 3 + } + }, + { + "id": 452601886481639, + "definition": { + "title": "Violations over time", + "title_size": "16", + "title_align": "left", + "show_legend": false, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "alias": "violation count", + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_package.violations.count{$app,$package,$team,$max_enforcements,$violation_type} by {package,violation_type}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ] + }, + "layout": { + "x": 0, + "y": 3, + "width": 12, + "height": 3 + } + }, + { + "id": 4999182362039404, + "definition": { + "title": "Count of violation pairs (format is count, violation type, pack responsible for violation, other pack)", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "conditional_formats": [ + { + "comparator": ">", + "palette": "white_on_red", + "value": 0 + } + ], + "formulas": [ + { + "formula": "query1", + "limit": { + "count": 500, + "order": "desc" + } + } + ], + "queries": [ + { + "aggregator": "last", + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_package.violations.by_other_package.count{$app,$package,$team,$max_enforcements,$violation_type} by {violation_type,package,other_package}" + } + ], + "response_format": "scalar" + } + ] + }, + "layout": { + "x": 0, + "y": 6, + "width": 12, + "height": 3 + } + } + ] + }, + "layout": { + "x": 0, + "y": 1, + "width": 12, + "height": 10 + } + }, + { + "id": 8036812677312511, + "definition": { + "title": "Violations By Team", + "title_align": "center", + "background_color": "vivid_pink", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [ + { + "id": 729312621174170, + "definition": { + "title": "Current count (left) and monthly change (right) of violations", + "title_size": "16", + "title_align": "left", + "type": "change", + "requests": [ + { + "change_type": "absolute", + "compare_to": "hour_before", + "formulas": [ + { + "formula": "month_before(query1)" + }, + { + "formula": "query1", + "alias": "current violation count" + } + ], + "increase_good": false, + "order_by": "present", + "order_dir": "desc", + "queries": [ + { + "aggregator": "last", + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_team.violations.count{$app,$package,$team,$max_enforcements,$violation_type} by {team,violation_type}" + } + ], + "response_format": "scalar", + "show_present": true + } + ] + }, + "layout": { + "x": 0, + "y": 0, + "width": 12, + "height": 3 + } + }, + { + "id": 8106464030577332, + "definition": { + "title": "Violations over time", + "title_size": "16", + "title_align": "left", + "show_legend": false, + "legend_layout": "auto", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "alias": "violation count", + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_team.violations.count{$app,$package,$team,$max_enforcements,$violation_type} by {team,violation_type}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ] + }, + "layout": { + "x": 0, + "y": 3, + "width": 12, + "height": 3 + } + }, + { + "id": 7551686457697865, + "definition": { + "title": "Count of violation pairs (format is count, violation type, team responsible for violation, other team)", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "conditional_formats": [ + { + "comparator": ">", + "palette": "white_on_red", + "value": 0 + } + ], + "formulas": [ + { + "formula": "query1", + "limit": { + "count": 500, + "order": "desc" + } + } + ], + "queries": [ + { + "aggregator": "last", + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_team.violations.by_other_team.count{$app,$package,$team,$max_enforcements,$violation_type} by {violation_type,team,other_team}" + } + ], + "response_format": "scalar" + } + ] + }, + "layout": { + "x": 0, + "y": 6, + "width": 12, + "height": 3 + } + } + ] + }, + "layout": { + "x": 0, + "y": 11, + "width": 12, + "height": 1 + } + }, + { + "id": 5988093184398876, + "definition": { + "title": "Team Specific Metrics", + "title_align": "center", + "background_color": "vivid_orange", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [ + { + "id": 2759533194955744, + "definition": { + "title": "Number of packs", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "formulas": [ + { + "formula": "query1", + "limit": { + "count": 500, + "order": "desc" + } + } + ], + "queries": [ + { + "aggregator": "last", + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_team.all_packages.count{$app,$package,$team,$max_enforcements} by {team}" + } + ], + "response_format": "scalar" + } + ] + }, + "layout": { + "x": 0, + "y": 0, + "width": 6, + "height": 3 + } + }, + { + "id": 7803071284986718, + "definition": { + "title": "% of packs using enforce_*", + "title_size": "16", + "title_align": "left", + "type": "query_table", + "requests": [ + { + "response_format": "scalar", + "formulas": [ + { + "alias": "% of packs enforcing violation_type", + "formula": "(query1 + query3) / (query2 + query1 + query3) * 100", + "limit": { + "count": 500, + "order": "asc" + } + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.by_team.packwerk_checkers.true.count{$app,$team,$package,$max_enforcements,$violation_type} by {team,violation_type}", + "aggregator": "avg" + }, + { + "data_source": "metrics", + "name": "query3", + "query": "avg:test.4.modularization.by_team.packwerk_checkers.strict.count{$app,$team,$package,$max_enforcements,$violation_type} by {team,violation_type}", + "aggregator": "avg" + }, + { + "data_source": "metrics", + "name": "query2", + "query": "avg:test.4.modularization.by_team.packwerk_checkers.false.count{$app,$team,$package,$max_enforcements,$violation_type} by {team,violation_type}", + "aggregator": "avg" + } + ] + } + ] + }, + "layout": { + "x": 6, + "y": 0, + "width": 6, + "height": 3 + } + } + ] + }, + "layout": { + "x": 0, + "y": 12, + "width": 12, + "height": 1 + } + }, + { + "id": 3553542546106134, + "definition": { + "title": "Overall Packwerk Usage", + "background_color": "vivid_yellow", + "show_title": true, + "type": "group", + "layout_type": "ordered", + "widgets": [ + { + "id": 6899218535842667, + "definition": { + "title": "Total violations over time", + "title_size": "16", + "title_align": "left", + "show_legend": true, + "legend_layout": "vertical", + "legend_columns": [ + "value" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "alias": "total violations", + "formula": "query1" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.all_packages.violations.count{$app,$max_enforcements,$violation_type} by {violation_type}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ] + }, + "layout": { + "x": 0, + "y": 0, + "width": 12, + "height": 3 + } + }, + { + "id": 5484448588630899, + "definition": { + "title": "% of packs using packwerk checker enforcements", + "title_size": "16", + "title_align": "left", + "show_legend": true, + "legend_layout": "vertical", + "legend_columns": [ + "value" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "alias": "% packages using enforce_violation_type: true | strict", + "formula": "(query2 + query3) / query5 * 100" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query2", + "query": "avg:test.4.modularization.all_packages.packwerk_checkers.true.count{$app,$max_enforcements,$violation_type} by {app,violation_type}" + }, + { + "data_source": "metrics", + "name": "query5", + "query": "avg:test.4.modularization.all_packages.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query4", + "query": "avg:test.4.modularization.all_packages.packwerk_checkers.false.count{$app,$max_enforcements,$violation_type} by {app,violation_type}" + }, + { + "data_source": "metrics", + "name": "query3", + "query": "avg:test.4.modularization.all_packages.packwerk_checkers.strict.count{$app,$max_enforcements,$violation_type} by {app,violation_type}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ], + "yaxis": { + "min": "0", + "max": "100" + }, + "markers": [] + }, + "layout": { + "x": 0, + "y": 3, + "width": 6, + "height": 3 + } + }, + { + "id": 6522220798476128, + "definition": { + "title": "% of packs using rubocop-packs cops", + "title_size": "16", + "title_align": "left", + "show_legend": true, + "legend_layout": "vertical", + "legend_columns": [ + "value" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "alias": "% packs using Packs/RootNamespaceIsPackName", + "formula": "(query4 + query1) / query2 * 100" + }, + { + "alias": "% packs using Packs/ClassMethodsAsPublicApis", + "formula": "(query3 + query5) / query2 * 100" + }, + { + "alias": "% packs using Packs/DocumentedPublicApis", + "formula": "(query6 + query7) / query2 * 100" + }, + { + "alias": "% packs using Packs/TypedPublicApis", + "formula": "(query8 + query9) / query2 * 10" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query4", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_rootnamespaceispackname.true.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_rootnamespaceispackname.strict.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query2", + "query": "avg:test.4.modularization.all_packages.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query3", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_classmethodsaspublicapis.strict.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query5", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_classmethodsaspublicapis.strict.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query6", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_documentedpublicapis.true.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query7", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_documentedpublicapis.strict.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query8", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_typedpublicapis.true.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query9", + "query": "avg:test.4.modularization.all_packages.rubocops.packs_typedpublicapis.strict.count{$app,$max_enforcements} by {app}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ], + "yaxis": { + "min": "0", + "max": "100" + }, + "markers": [], + "custom_links": [ + { + "override_label": "hosts", + "is_hidden": true + }, + { + "override_label": "logs", + "is_hidden": true + }, + { + "override_label": "traces", + "is_hidden": true + }, + { + "override_label": "profiles", + "is_hidden": true + }, + { + "override_label": "containers", + "is_hidden": true + } + ] + }, + "layout": { + "x": 6, + "y": 3, + "width": 6, + "height": 3 + } + }, + { + "id": 7370986557741715, + "definition": { + "title": "% of packs that have a README", + "title_size": "16", + "title_align": "left", + "show_legend": false, + "legend_layout": "vertical", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "alias": "% of packages with README.md", + "formula": "query3 / query1 * 100" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query3", + "query": "avg:test.4.modularization.all_packages.has_readme.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.all_packages.count{$app,$max_enforcements} by {app}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ], + "yaxis": { + "min": "0", + "max": "100" + }, + "markers": [] + }, + "layout": { + "x": 0, + "y": 6, + "width": 6, + "height": 2 + } + }, + { + "id": 2831082575270868, + "definition": { + "title": "% of packs with non-empty public API", + "title_size": "16", + "title_align": "left", + "show_legend": false, + "legend_layout": "vertical", + "legend_columns": [ + "avg", + "min", + "max", + "value", + "sum" + ], + "type": "timeseries", + "requests": [ + { + "formulas": [ + { + "alias": "% of packages with non-empty public API", + "formula": "query3 / query1 * 100" + } + ], + "queries": [ + { + "data_source": "metrics", + "name": "query3", + "query": "avg:test.4.modularization.all_packages.using_public_directory.count{$app,$max_enforcements} by {app}" + }, + { + "data_source": "metrics", + "name": "query1", + "query": "avg:test.4.modularization.all_packages.count{$app,$max_enforcements} by {app}" + } + ], + "response_format": "timeseries", + "style": { + "palette": "dog_classic", + "line_type": "solid", + "line_width": "normal" + }, + "display_type": "line" + } + ], + "yaxis": { + "min": "0", + "max": "100" + }, + "markers": [] + }, + "layout": { + "x": 6, + "y": 6, + "width": 6, + "height": 2 + } + }, + { + "id": 505612504525801, + "definition": { + "title": "Packs most depended on", + "title_size": "16", + "title_align": "left", + "type": "toplist", + "requests": [ + { + "response_format": "scalar", + "queries": [ + { + "data_source": "metrics", + "name": "query3", + "query": "avg:test.4.modularization.by_package.depended_on.count{$app,$package,$team} by {app,package}", + "aggregator": "avg" + } + ], + "formulas": [ + { + "formula": "query3", + "limit": { + "count": 500, + "order": "desc" + } + } + ] + } + ] + }, + "layout": { + "x": 0, + "y": 8, + "width": 6, + "height": 2 + } + } + ] + }, + "layout": { + "x": 0, + "y": 13, + "width": 12, + "height": 1 + } + } + ], + "template_variables": [ + { + "name": "app", + "prefix": "app", + "available_values": [], + "default": "zenpayroll" + }, + { + "name": "team", + "prefix": "team", + "available_values": [], + "default": "*" + }, + { + "name": "package", + "prefix": "package", + "available_values": [], + "default": "*" + }, + { + "name": "max_enforcements", + "prefix": "max_enforcements", + "available_values": [], + "default": "false" + }, + { + "name": "violation_type", + "prefix": "violation_type", + "available_values": [], + "defaults": [ + "dependency", + "privacy" + ] + } + ], + "layout_type": "ordered", + "notify_list": [], + "template_variable_presets": [ + { + "name": "Wallet Experience", + "template_variables": [ + { + "name": "app", + "value": "zenpayroll" + }, + { + "name": "team", + "values": [ + "mobile", + "wallet_experience" + ] + } + ] + }, + { + "name": "hawaiianice", + "template_variables": [ + { + "name": "app", + "value": "hawaiianice" + }, + { + "name": "violation_type", + "value": "*" + } + ] + } + ], + "reflow_type": "fixed", + "tags": [] +} diff --git a/docs/executive_summary.json b/docs/executive_summary.json deleted file mode 100644 index 7b3d957..0000000 --- a/docs/executive_summary.json +++ /dev/null @@ -1,1465 +0,0 @@ -{ - "title": "[Modularization] Executive Summary", - "description": "Contains overall app-level progress", - "widgets": [ - { - "id": 1762219509721238, - "definition": { - "title": "Active Improvement Projects", - "type": "group", - "background_color": "vivid_green", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 3555995942758817, - "definition": { - "title": "% of packs using enforce_dependencies", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% active for new or any", - "formula": "100 - (query4 / query2 * 100)" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.packwerk_checkers.enforce_dependencies.strict.count{$app} by {app}", - "data_source": "metrics", - "name": "query3" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_packages.packwerk_checkers.enforce_dependencies.true.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.all_packages.packwerk_checkers.enforce_dependencies.false.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 1621792549896175, - "definition": { - "title": "% of packs using enforce_privacy", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% active for new OR any", - "formula": "100 - (query4 / query2 * 100)" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.packwerk_checkers.enforce_privacy.false.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_packages.packwerk_checkers.enforce_privacy.strict.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.all_packages.packwerk_checkers.enforce_privacy.true.count{$app} by {app}", - "data_source": "metrics", - "name": "query3" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 6388203743649046, - "definition": { - "title": "% of packs using Packs/RootNamespaceIsPublicApi", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% active for new or any", - "formula": "100 - (query4 / query2 * 100)" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.rubocops.packs_rootnamespaceispackname.strict.count{$app} by {app}", - "data_source": "metrics", - "name": "query3" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_packages.rubocops.packs_rootnamespaceispackname.true.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.all_packages.rubocops.packs_rootnamespaceispackname.false.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 2, - "width": 6, - "height": 2 - } - }, - { - "id": 5962406528944100, - "definition": { - "title": "% of packs using Packs/ClassMethodsAsPublicApis", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% active for new or any", - "formula": "100 - (query4 / query2 * 100)" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.rubocops.packs_classmethodsaspublicapis.false.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_packages.rubocops.packs_classmethodsaspublicapis.strict.count{$app} by {app}", - "data_source": "metrics", - "name": "query3" - }, - { - "query": "avg:modularization.all_packages.rubocops.packs_classmethodsaspublicapis.true.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 2, - "width": 6, - "height": 2 - } - }, - { - "id": 1720007410639650, - "definition": { - "title": "% of packs that have a README", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% of packages", - "formula": "query3 / query1 * 100" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.has_readme.count{$app} by {app}", - "data_source": "metrics", - "name": "query3" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 4, - "width": 6, - "height": 2 - } - }, - { - "id": 7668763757655714, - "definition": { - "title": "% of packs with non-empty public API", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% of packages", - "formula": "query3 / query1 * 100" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.using_public_directory.count{$app} by {app}", - "data_source": "metrics", - "name": "query3" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 4, - "width": 6, - "height": 2 - } - }, - { - "id": 5271796268198946, - "definition": { - "title": "Dependency violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.dependency_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "include_zero": true, - "scale": "linear", - "label": "", - "min": "auto", - "max": "auto" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 6, - "width": 6, - "height": 2 - } - }, - { - "id": 4560563537926884, - "definition": { - "title": "Privacy violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query2" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.privacy_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "include_zero": true, - "scale": "linear", - "label": "", - "min": "auto", - "max": "auto" - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 6, - "width": 6, - "height": 2 - } - }, - { - "id": 3710388442448397, - "definition": { - "title": "Rubocop exclusions for Packs/TypedPublicApis", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query4" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.rubocops.packs_typedpublicapis.exclusions.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 8, - "width": 6, - "height": 2 - } - }, - { - "id": 3558918127678761, - "definition": { - "title": "Rubocop exclusions for Packs/RootNamespaceIsPackName", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query4" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.rubocops.packs_rootnamespaceispackname.exclusions.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "include_zero": false - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 8, - "width": 6, - "height": 2 - } - }, - { - "id": 6694137786654306, - "definition": { - "title": "Rubocop exclusions for Packs/DocumentedPublicApis", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query4" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.rubocops.packs_documentedpublicapis.exclusions.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 10, - "width": 6, - "height": 2 - } - }, - { - "id": 8837101224476499, - "definition": { - "title": "Rubocop exclusions for Packs/ClassMethodsAsPublicApis", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "time": {}, - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query4" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.rubocops.packs_classmethodsaspublicapis.exclusions.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 10, - "width": 6, - "height": 2 - } - } - ] - }, - "layout": { - "x": 0, - "y": 0, - "width": 12, - "height": 13 - } - }, - { - "id": 1922063293462370, - "definition": { - "title": "Pack Group Metrics", - "type": "group", - "background_color": "vivid_green", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 7068948772244777, - "definition": { - "title": "Percent of packs that are parents or children", - "title_size": "16", - "title_align": "left", - "show_legend": true, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "Percent of packs that are parents or children", - "formula": "(query2 + query3) / query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "max:modularization.all_pack_groups.count{*} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "max:modularization.parent_packs.count{*} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "max:modularization.child_packs.count{*} by {app}", - "data_source": "metrics", - "name": "query3" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 0, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 7255565052784329, - "definition": { - "title": "Dependency Violations Over Time", - "title_size": "16", - "title_align": "left", - "show_legend": true, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query2" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "max:modularization.all_pack_groups.dependency_violations.count{*} by {app}", - "data_source": "metrics", - "name": "query2" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 6, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 4108467235730609, - "definition": { - "title": "Privacy Violations Over Time", - "title_size": "16", - "title_align": "left", - "show_legend": true, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query2" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "max:modularization.all_pack_groups.privacy_violations.count{*} by {app}", - "data_source": "metrics", - "name": "query2" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 0, - "y": 2, - "width": 6, - "height": 2 - } - } - ] - }, - "layout": { - "x": 0, - "y": 13, - "width": 12, - "height": 5 - } - }, - { - "id": 4244707695447991, - "definition": { - "title": "Stable State Projects", - "type": "group", - "background_color": "vivid_green", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 2823867709555564, - "definition": { - "title": "% of files that are modularized", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% modularized", - "formula": "(query1 + query2) / query3 * 100" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.packaged_files.totals{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.component_files.totals{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_files.totals{$app} by {app}", - "data_source": "metrics", - "name": "query3" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 4004412921109988, - "definition": { - "title": "Pack count over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "include_zero": true, - "scale": "linear", - "label": "", - "min": "auto", - "max": "auto" - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 6510739279423844, - "definition": { - "title": "% of packs using team ownership", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% package-based file ownership", - "formula": "query1 / query2 * 100" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.package_based_file_ownership.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 2, - "width": 6, - "height": 2 - } - }, - { - "id": 8417206133020973, - "definition": { - "title": "% of packs using typed API protection", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "% active for new or any", - "formula": "100 - (query4 / query2 * 100)" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.rubocops.packs_typedpublicapis.false.count{$app} by {app}", - "data_source": "metrics", - "name": "query4" - }, - { - "query": "avg:modularization.all_packages.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_packages.rubocops.packs_typedpublicapis.true.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.all_packages.rubocops.packs_typedpublicapis.strict.count{$app} by {app}", - "data_source": "metrics", - "name": "query3" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 4, - "width": 6, - "height": 2 - } - } - ] - }, - "layout": { - "x": 0, - "y": 18, - "width": 12, - "height": 7 - } - }, - { - "id": 845018456323256, - "definition": { - "title": "Experimental Projects/Metrics", - "type": "group", - "background_color": "vivid_green", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 2567280760008676, - "definition": { - "title": "Dependency violations change month over month", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1 - month_before(query2)" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.dependency_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.all_packages.dependency_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "include_zero": true, - "scale": "linear", - "label": "", - "min": "auto", - "max": "auto" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 7651681293017961, - "definition": { - "title": "Privacy violations change month over month", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query2 - month_before(query1)" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.privacy_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_packages.privacy_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "include_zero": true, - "scale": "linear", - "label": "", - "min": "auto", - "max": "auto" - }, - "markers": [] - }, - "layout": { - "x": 6, - "y": 0, - "width": 6, - "height": 2 - } - }, - { - "id": 4420780477364542, - "definition": { - "title": "Percent change of dependency violations since a month ago", - "title_size": "16", - "title_align": "left", - "type": "query_value", - "requests": [ - { - "formulas": [ - { - "formula": "100 * (query2 - month_before(query1)) / month_before(query1)" - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.all_packages.dependency_violations.count{$app}", - "data_source": "metrics", - "name": "query2", - "aggregator": "last" - }, - { - "query": "avg:modularization.all_packages.dependency_violations.count{$app}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ], - "autoscale": false, - "custom_unit": "%", - "precision": 2 - }, - "layout": { - "x": 0, - "y": 2, - "width": 6, - "height": 2 - } - }, - { - "id": 5872063200064110, - "definition": { - "title": "Percent change of privacy violations since a month ago", - "title_size": "16", - "title_align": "left", - "type": "query_value", - "requests": [ - { - "formulas": [ - { - "formula": "100 * (query2 - month_before(query1)) / month_before(query1)" - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.all_packages.privacy_violations.count{$app}", - "data_source": "metrics", - "name": "query2", - "aggregator": "last" - }, - { - "query": "avg:modularization.all_packages.privacy_violations.count{$app}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ], - "autoscale": false, - "custom_unit": "%", - "precision": 2 - }, - "layout": { - "x": 6, - "y": 2, - "width": 6, - "height": 2 - } - }, - { - "id": 8145055765189856, - "definition": { - "title": "Average Violations Per File Over Time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "(query2 + query1) / query3" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_packages.privacy_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.all_packages.dependency_violations.count{$app} by {app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.all_files.totals{$app} by {app}", - "data_source": "metrics", - "name": "query3" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": ".4", - "max": "1.5" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 4, - "width": 6, - "height": 2 - } - } - ] - }, - "layout": { - "x": 0, - "y": 25, - "width": 12, - "height": 7 - } - } - ], - "template_variables": [ - { - "name": "app", - "prefix": "app", - "available_values": [], - "default": "*" - } - ], - "layout_type": "ordered", - "is_read_only": false, - "notify_list": [], - "reflow_type": "fixed", - "id": "ftd-ueb-zdf" -} diff --git a/docs/per_package_and_per_team.json b/docs/per_package_and_per_team.json deleted file mode 100644 index 095a0e0..0000000 --- a/docs/per_package_and_per_team.json +++ /dev/null @@ -1,1236 +0,0 @@ -{ - "title": "[Modularization] Per-Package and Per-Team", - "description": "Modularization statitsics per-package and per-team.", - "widgets": [ - { - "id": 6323770581286804, - "definition": { - "title": "Violations By Package", - "title_align": "center", - "type": "group", - "background_color": "vivid_green", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 3643760892520117, - "definition": { - "title": "Current count and monthly change of dependency violations", - "title_size": "16", - "title_align": "left", - "type": "change", - "requests": [ - { - "formulas": [ - { - "formula": "month_before(query1)" - }, - { - "formula": "query1" - } - ], - "order_by": "present", - "order_dir": "desc", - "compare_to": "hour_before", - "response_format": "scalar", - "show_present": true, - "increase_good": false, - "queries": [ - { - "query": "avg:modularization.by_package.outbound_dependency_violations.count{$app,$package,$team,$to_team} by {package}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ], - "change_type": "absolute" - } - ] - }, - "layout": { - "x": 0, - "y": 0, - "width": 6, - "height": 3 - } - }, - { - "id": 4357118931596542, - "definition": { - "title": "Current count and monthly change of privacy violations", - "title_size": "16", - "title_align": "left", - "type": "change", - "requests": [ - { - "formulas": [ - { - "formula": "month_before(query1)" - }, - { - "formula": "query1" - } - ], - "order_by": "present", - "order_dir": "desc", - "compare_to": "hour_before", - "response_format": "scalar", - "show_present": true, - "increase_good": false, - "queries": [ - { - "query": "avg:modularization.by_package.inbound_privacy_violations.count{$app,$package,$team,$to_team} by {package}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ], - "change_type": "absolute" - } - ] - }, - "layout": { - "x": 6, - "y": 0, - "width": 6, - "height": 3 - } - }, - { - "id": 2724524204274685, - "definition": { - "title": "Dependency violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.by_package.outbound_dependency_violations.count{$app,$package,$team,$to_team} by {package}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 0, - "y": 3, - "width": 6, - "height": 3 - } - }, - { - "id": 452601886481639, - "definition": { - "title": "Privacy violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.by_package.inbound_privacy_violations.count{$app,$package,$team,$to_team} by {package}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 6, - "y": 3, - "width": 6, - "height": 3 - } - }, - { - "id": 4999182362039404, - "definition": { - "title": "Count of pack1's dependency violations on pack2", - "title_size": "16", - "title_align": "left", - "type": "toplist", - "requests": [ - { - "formulas": [ - { - "formula": "query1", - "limit": { - "count": 500, - "order": "desc" - } - } - ], - "conditional_formats": [ - { - "comparator": ">", - "palette": "white_on_red", - "value": 0 - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_package.outbound_dependency_violations.per_package.count{$app,$package,$team,$to_package,$to_team} by {package,to_package}.rollup(avg, 86400)", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 0, - "y": 6, - "width": 6, - "height": 11 - } - }, - { - "id": 8346623107466227, - "definition": { - "title": "Count of pack1's privacy violations on pack2", - "title_size": "16", - "title_align": "left", - "type": "toplist", - "requests": [ - { - "formulas": [ - { - "formula": "query1", - "limit": { - "count": 500, - "order": "desc" - } - } - ], - "conditional_formats": [ - { - "comparator": ">", - "palette": "white_on_red", - "value": 0 - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_package.outbound_privacy_violations.per_package.count{$app,$package,$team,$to_package,$to_team} by {package,to_package}.rollup(avg, 86400)", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 6, - "y": 6, - "width": 6, - "height": 11 - } - } - ] - }, - "layout": { - "x": 0, - "y": 3, - "width": 12, - "height": 18 - } - }, - { - "id": 6319630204960444, - "definition": { - "title": "Violations By Team", - "title_align": "center", - "type": "group", - "background_color": "vivid_green", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 6135573918791895, - "definition": { - "title": "Current count and monthly change of dependency violations", - "title_size": "16", - "title_align": "left", - "type": "change", - "requests": [ - { - "formulas": [ - { - "formula": "month_before(query1)" - }, - { - "formula": "query1" - } - ], - "order_by": "present", - "order_dir": "desc", - "compare_to": "hour_before", - "response_format": "scalar", - "show_present": true, - "increase_good": false, - "queries": [ - { - "query": "avg:modularization.by_package.outbound_dependency_violations.count{$app,$package,$team,$to_team} by {team}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ], - "change_type": "absolute" - } - ] - }, - "layout": { - "x": 0, - "y": 0, - "width": 6, - "height": 3 - } - }, - { - "id": 5644048970569046, - "definition": { - "title": "Current count and monthly change of privacy violations", - "title_size": "16", - "title_align": "left", - "type": "change", - "requests": [ - { - "formulas": [ - { - "formula": "month_before(query1)" - }, - { - "formula": "query1" - } - ], - "order_by": "present", - "order_dir": "desc", - "compare_to": "hour_before", - "response_format": "scalar", - "show_present": true, - "increase_good": false, - "queries": [ - { - "query": "avg:modularization.by_package.inbound_privacy_violations.count{$app,$package,$team,$to_team} by {team}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ], - "change_type": "absolute" - } - ] - }, - "layout": { - "x": 6, - "y": 0, - "width": 6, - "height": 3 - } - }, - { - "id": 2776122379908014, - "definition": { - "title": "Dependency violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.by_package.outbound_dependency_violations.count{$app,$package,$team,$to_team} by {team}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 0, - "y": 3, - "width": 6, - "height": 4 - } - }, - { - "id": 7495508497807123, - "definition": { - "title": "Privacy violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.by_package.inbound_privacy_violations.count{$app,$package,$team,$to_team} by {team}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 6, - "y": 3, - "width": 6, - "height": 4 - } - }, - { - "id": 8102230868737082, - "definition": { - "title": "Count of team1's dependency violations on team2", - "title_size": "16", - "title_align": "left", - "type": "toplist", - "requests": [ - { - "formulas": [ - { - "formula": "query1", - "limit": { - "count": 500, - "order": "desc" - } - } - ], - "conditional_formats": [ - { - "comparator": ">", - "palette": "white_on_red", - "value": 0 - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_team.outbound_dependency_violations.per_team.count{$app,$package,$team,$to_team} by {team,to_team}.rollup(avg, 86400)", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 0, - "y": 7, - "width": 6, - "height": 3 - } - }, - { - "id": 7457840753223458, - "definition": { - "title": "Count of team1's privacy violations on team2", - "title_size": "16", - "title_align": "left", - "type": "toplist", - "requests": [ - { - "formulas": [ - { - "formula": "query1", - "limit": { - "count": 500, - "order": "desc" - } - } - ], - "conditional_formats": [ - { - "comparator": ">", - "palette": "white_on_red", - "value": 0 - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_team.outbound_privacy_violations.per_team.count{$app,$package,$team,$to_team} by {team,to_team}.rollup(avg, 86400)", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 6, - "y": 7, - "width": 6, - "height": 3 - } - } - ] - }, - "layout": { - "x": 0, - "y": 21, - "width": 12, - "height": 11, - "is_column_break": true - } - }, - { - "id": 5988093184398876, - "definition": { - "title": "Team Specific Metrics", - "title_align": "center", - "type": "group", - "background_color": "vivid_purple", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 2759533194955744, - "definition": { - "title": "Number of packs", - "title_size": "16", - "title_align": "left", - "type": "toplist", - "requests": [ - { - "formulas": [ - { - "formula": "query1", - "limit": { - "count": 500, - "order": "desc" - } - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_team.all_packages.count{$app,$package,$team,$to_team} by {team}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 0, - "y": 0, - "width": 4, - "height": 3 - } - }, - { - "id": 7803071284986718, - "definition": { - "title": "% of packs using enforce_dependencies", - "title_size": "16", - "title_align": "left", - "time": {}, - "type": "query_table", - "requests": [ - { - "formulas": [ - { - "alias": "Count of Packages", - "limit": { - "count": 500, - "order": "desc" - }, - "formula": "query2" - }, - { - "alias": "% active for new OR any", - "conditional_formats": [ - { - "palette": "black_on_light_green", - "comparator": ">", - "value": 99 - }, - { - "palette": "black_on_light_red", - "comparator": "<", - "value": 1 - }, - { - "palette": "black_on_light_yellow", - "comparator": ">", - "value": 1 - } - ], - "formula": "100 - (query4 / query2 * 100)" - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_team.all_packages.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query2", - "aggregator": "last" - }, - { - "query": "avg:modularization.by_team.packwerk_checkers.enforce_dependencies.false.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query4", - "aggregator": "last" - }, - { - "query": "avg:modularization.by_team.packwerk_checkers.enforce_dependencies.true.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - }, - { - "query": "avg:modularization.by_team.packwerk_checkers.enforce_dependencies.strict.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query3", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 4, - "y": 0, - "width": 4, - "height": 3 - } - }, - { - "id": 8682597218095916, - "definition": { - "title": "% of packs using enforce_privacy", - "title_size": "16", - "title_align": "left", - "time": {}, - "type": "query_table", - "requests": [ - { - "formulas": [ - { - "alias": "Count of Packages", - "limit": { - "count": 500, - "order": "desc" - }, - "formula": "query2" - }, - { - "alias": "% active for new OR any", - "cell_display_mode": "bar", - "conditional_formats": [ - { - "palette": "black_on_light_green", - "comparator": ">", - "value": 99 - }, - { - "palette": "black_on_light_red", - "comparator": "<", - "value": 1 - }, - { - "palette": "black_on_light_yellow", - "comparator": ">", - "value": 2 - } - ], - "formula": "100 - (query4 / query2 * 100)" - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_team.all_packages.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query2", - "aggregator": "last" - }, - { - "query": "avg:modularization.by_team.packwerk_checkers.enforce_privacy.false.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query4", - "aggregator": "last" - }, - { - "query": "avg:modularization.by_team.packwerk_checkers.enforce_privacy.fail_the_build_if_new_instances_appear.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - }, - { - "query": "avg:modularization.by_team.packwerk_checkers.enforce_privacy.strict.count{$app,$to_team,$team,$package} by {team}", - "data_source": "metrics", - "name": "query3", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 8, - "y": 0, - "width": 4, - "height": 3 - } - }, - { - "id": 3828221045542324, - "definition": { - "title": "% of packaged files in public directories (higher/lower != better)", - "title_size": "16", - "title_align": "left", - "show_legend": true, - "legend_layout": "horizontal", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "alias": "Percent of files in public directories", - "formula": "query1 / query3 * 100" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.by_team.public_files.count{$app,$package,$team,$to_team} by {team}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.by_team.all_files.count{$app,$package,$team,$to_team} by {team}", - "data_source": "metrics", - "name": "query3" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "min": "0", - "max": "100" - }, - "markers": [] - }, - "layout": { - "x": 0, - "y": 3, - "width": 4, - "height": 3 - } - }, - { - "id": 4079783361962082, - "definition": { - "title": "Unmodularized files over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "vertical", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "top(query1, 50, 'last', 'desc') - top(query2, 50, 'last', 'desc') - top(query3, 50, 'last', 'desc')" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "avg:modularization.all_files.by_team{$app,$package,$team,$to_team} by {team,app}", - "data_source": "metrics", - "name": "query1" - }, - { - "query": "avg:modularization.component_files.by_team{$app,$package,$team,$to_team} by {team,app}", - "data_source": "metrics", - "name": "query2" - }, - { - "query": "avg:modularization.packaged_files.by_team{$app,$package,$team,$to_team} by {team,app}", - "data_source": "metrics", - "name": "query3" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ], - "yaxis": { - "include_zero": true, - "scale": "linear", - "label": "", - "min": "auto", - "max": "auto" - }, - "markers": [] - }, - "layout": { - "x": 4, - "y": 3, - "width": 4, - "height": 3 - } - } - ] - }, - "layout": { - "x": 0, - "y": 32, - "width": 12, - "height": 7 - } - }, - { - "id": 8311212471572021, - "definition": { - "title": "Violations By Pack Group", - "title_align": "center", - "type": "group", - "background_color": "vivid_green", - "show_title": true, - "layout_type": "ordered", - "widgets": [ - { - "id": 1835021175198464, - "definition": { - "title": "Current count and monthly change of dependency violations", - "title_size": "16", - "title_align": "left", - "type": "change", - "requests": [ - { - "formulas": [ - { - "formula": "month_before(query1)" - }, - { - "formula": "query1" - } - ], - "order_by": "present", - "order_dir": "desc", - "compare_to": "hour_before", - "response_format": "scalar", - "show_present": true, - "increase_good": false, - "queries": [ - { - "query": "max:modularization.by_pack_group.outbound_dependency_violations.count{$app} by {pack_group}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ], - "change_type": "absolute" - } - ] - }, - "layout": { - "x": 0, - "y": 0, - "width": 6, - "height": 3 - } - }, - { - "id": 4623520471350830, - "definition": { - "title": "Current count and monthly change of privacy violations", - "title_size": "16", - "title_align": "left", - "type": "change", - "requests": [ - { - "formulas": [ - { - "formula": "month_before(query1)" - }, - { - "formula": "query1" - } - ], - "order_by": "present", - "order_dir": "desc", - "compare_to": "hour_before", - "response_format": "scalar", - "show_present": true, - "increase_good": false, - "queries": [ - { - "query": "max:modularization.by_pack_group.inbound_privacy_violations.count{$app} by {pack_group}", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ], - "change_type": "absolute" - } - ] - }, - "layout": { - "x": 6, - "y": 0, - "width": 6, - "height": 3 - } - }, - { - "id": 5949330413583335, - "definition": { - "title": "Dependency violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "max:modularization.by_pack_group.outbound_dependency_violations.count{$app} by {pack_group}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 0, - "y": 3, - "width": 6, - "height": 3 - } - }, - { - "id": 1218832616718258, - "definition": { - "title": "Privacy violations over time", - "title_size": "16", - "title_align": "left", - "show_legend": false, - "legend_layout": "auto", - "legend_columns": [ - "avg", - "min", - "max", - "value", - "sum" - ], - "type": "timeseries", - "requests": [ - { - "formulas": [ - { - "formula": "query1" - } - ], - "response_format": "timeseries", - "queries": [ - { - "query": "max:modularization.by_pack_group.inbound_privacy_violations.count{$app} by {pack_group}", - "data_source": "metrics", - "name": "query1" - } - ], - "style": { - "palette": "dog_classic", - "line_type": "solid", - "line_width": "normal" - }, - "display_type": "line" - } - ] - }, - "layout": { - "x": 6, - "y": 3, - "width": 6, - "height": 3 - } - }, - { - "id": 1723807712034365, - "definition": { - "title": "Count of pack_group1's dependency violations on pack_group2", - "title_size": "16", - "title_align": "left", - "type": "toplist", - "requests": [ - { - "formulas": [ - { - "formula": "query1", - "limit": { - "count": 500, - "order": "desc" - } - } - ], - "conditional_formats": [ - { - "comparator": ">", - "palette": "white_on_red", - "value": 0 - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "avg:modularization.by_pack_group.outbound_dependency_violations.per_pack_group.count{$app} by {pack_group,to_pack_group}.rollup(avg, 86400)", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 0, - "y": 6, - "width": 6, - "height": 10 - } - }, - { - "id": 5678318102820381, - "definition": { - "title": "Count of pack_group1's privacy violations on pack_group2", - "title_size": "16", - "title_align": "left", - "type": "toplist", - "requests": [ - { - "formulas": [ - { - "formula": "query1", - "limit": { - "count": 500, - "order": "desc" - } - } - ], - "conditional_formats": [ - { - "comparator": ">", - "palette": "white_on_red", - "value": 0 - } - ], - "response_format": "scalar", - "queries": [ - { - "query": "max:modularization.by_pack_group.outbound_privacy_violations.per_pack_group.count{$app} by {pack_group,to_pack_group}.rollup(avg, 86400)", - "data_source": "metrics", - "name": "query1", - "aggregator": "last" - } - ] - } - ] - }, - "layout": { - "x": 6, - "y": 6, - "width": 6, - "height": 10 - } - } - ] - }, - "layout": { - "x": 0, - "y": 39, - "width": 12, - "height": 17 - } - } - ], - "template_variables": [ - { - "name": "app", - "prefix": "app", - "available_values": [], - "default": "*" - }, - { - "name": "team", - "prefix": "team", - "available_values": [], - "default": "*" - }, - { - "name": "package", - "prefix": "package", - "available_values": [], - "default": "*" - }, - { - "name": "to_package", - "prefix": "to_package", - "available_values": [], - "default": "*" - }, - { - "name": "to_team", - "prefix": "to_team", - "available_values": [], - "default": "*" - } - ], - "layout_type": "ordered", - "is_read_only": false, - "notify_list": [], - "template_variable_presets": [], - "reflow_type": "fixed", - "id": "gry-hpa-kyk" -}