Summary
Add support for tracking feature flag usage and integrating with feature flag systems. Enables A/B testing analysis and understanding which features are being used.
Use Cases
- Track which features are enabled for users
- Correlate feature flags with errors/performance
- A/B testing analysis in observability tools
- Understand feature adoption
Proposed API
// Register feature flags (typically at startup)
VsixTelemetry.RegisterFeatureFlag("dark-mode", isDarkModeEnabled);
VsixTelemetry.RegisterFeatureFlag("new-editor", () => settings.UseNewEditor);
// Track feature flag evaluation
var isEnabled = VsixTelemetry.EvaluateFeature("new-editor");
// Automatically records: feature flag name, value, and adds to current span
// Bulk registration
VsixTelemetry.RegisterFeatureFlags(new Dictionary<string, bool>
{
["feature-a"] = true,
["feature-b"] = false,
});
// Integration with feature flag providers
VsixTelemetry.SetFeatureFlagProvider(new LaunchDarklyProvider(client));
Telemetry Emitted
Spans
feature.flag.name attribute on current span
feature.flag.value attribute on current span
Metrics
vs.extension.feature.evaluations (counter by flag name and value)
Resource Attributes
- All registered flags added as resource attributes for correlation
Benefits
- Correlate errors with specific feature flag combinations
- Understand feature usage patterns
- Debug issues specific to certain configurations
Summary
Add support for tracking feature flag usage and integrating with feature flag systems. Enables A/B testing analysis and understanding which features are being used.
Use Cases
Proposed API
Telemetry Emitted
Spans
feature.flag.nameattribute on current spanfeature.flag.valueattribute on current spanMetrics
vs.extension.feature.evaluations(counter by flag name and value)Resource Attributes
Benefits