Skip to content

Commit

Permalink
Bug 1892726 - Update Server Knobs configuration snippets (#2197)
Browse files Browse the repository at this point in the history
* Bug 1892726 - Update Server Knobs configuration snippets

With the recent additions to Glean v60.0.0, the configuration snippets
needed some updates to match the current configuration schema.

* Bug 1892726 - Part 2: Add configuration snippets for pings

This adds Server Knobs configuration snippets to the Ping detail page.
  • Loading branch information
travis79 authored Apr 25, 2024
1 parent d22b6b0 commit 77fe338
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/MetricDetail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
</td>
<td>
<CopyButton
textToCopy="{'{\n "gleanMetricConfiguration": {\n "'}{metric.name}{'": true\n }\n}'}"
textToCopy="{'{\n "gleanMetricConfiguration": {\n "metrics_enabled": {\n "'}{metric.name}{'": true\n }\n }\n}'}"
type="MetricDetail.MetricSampling.CopySamplingConfigurationSnippet"
/>
</td>
Expand Down
36 changes: 36 additions & 0 deletions src/pages/PingDetail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import VariantSelector from "../components/VariantSelector.svelte";
import AuthenticatedLink from "../components/AuthenticatedLink.svelte";
import Commentary from "../components/Commentary.svelte";
import CopyButton from "../components/CopyButton.svelte";
import HelpHoverable from "../components/HelpHoverable.svelte";
import ItemList from "../components/ItemList.svelte";
import Label from "../components/Label.svelte";
Expand Down Expand Up @@ -88,6 +89,41 @@
/>
<Commentary item={ping} itemType={"ping"} />

<SubHeading
title={"Server Knobs Configuration"}
helpText={"Information about Server Knobs configuration for this ping."}
/>
<table>
<col />
<col />
<col />
<tr>
<td>
Sampling Configuration Snippet
<HelpHoverable
content={"Click the button to copy a configuration snippet for use in Mozilla Experimenter configuration"}
link={"https://mozilla.github.io/glean/book/user/pings/data-control-plane/experimenter-configuration.html"}
/>
</td>
<td>
Click the button to copy a snippet for use in a
<a
href="https://mozilla.github.io/glean/book/user/pings/data-control-plane/experimenter-configuration.html"
data-glean-label="Mozilla Experimenter configuration"
data-glean-type="PingDetail.PingSampling.MozillaExperimenterConfigurationURL"
>
Mozilla Experimenter configuration.
</a>
</td>
<td>
<CopyButton
textToCopy="{'{\n "gleanMetricConfiguration": {\n "pings_enabled": {\n "'}{ping.name}{'": true\n }\n }\n}'}"
type="PingDetail.PingSampling.CopySamplingConfigurationSnippet"
/>
</td>
</tr>
</table>

<SubHeading
title={"Access"}
helpText={"Ways to access this metric in Mozilla's data warehouse."}
Expand Down

0 comments on commit 77fe338

Please sign in to comment.