Skip to content

Commit

Permalink
Bug 1823684 - Server Knobs for iOS
Browse files Browse the repository at this point in the history
changelog
- adds the new `glean-server-knobs` feature to the Nimbus config
- call `setMetricsEnabledConfig` on init & pull values directly from the Nimbus experiment
  • Loading branch information
rosahbruno committed Feb 7, 2024
1 parent ccbbaf0 commit e05aba3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions firefox-ios/Client/Telemetry/TelemetryWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ class TelemetryWrapper: TelemetryWrapperProtocol, FeatureFlaggable {
configuration: gleanConfig,
buildInfo: GleanMetrics.GleanBuild.info)

// Set the metric configuration from Nimbus.
glean.setMetricsEnabledConfig(FxNimbus.shared.features.gleanServerKnobs.value().toJSONString())

// Save the profile so we can record settings from it when the notification below fires.
self.profile = profile

Expand Down
8 changes: 8 additions & 0 deletions firefox-ios/nimbus-features/gleanServerKnobs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
features:
glean-server-knobs:
description: "A feature that provides server-side configurations for Glean metrics (aka Server Knobs)."
variables:
metrics-enabled:
description: "A map of metric base-identifiers to booleans representing the state of the 'enabled' flag for that metric."
type: Map<String, Boolean>
default: {}
1 change: 1 addition & 0 deletions firefox-ios/nimbus.fml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ include:
- nimbus-features/fakespotFeature.yaml
- nimbus-features/feltPrivacyFeature.yaml
- nimbus-features/firefoxSuggestFeature.yaml
- nimbus-features/gleanServerKnobs.yaml
- nimbus-features/generalFeatures.yaml
- nimbus-features/homescreenFeature.yaml
- nimbus-features/messagingFeature.yaml
Expand Down

0 comments on commit e05aba3

Please sign in to comment.