@@ -45,6 +45,8 @@ const (
4545 LoadBalancingEnabledTag = "LB"
4646
4747 // Feature flag usage tracing
48+ FMGoVerEnv = "MS_FEATURE_MANAGEMENT_GO_VERSION"
49+ FMGoVerKey = "FMGoVer"
4850 FeatureFilterTypeKey = "Filter"
4951 CustomFilterKey = "CSTM"
5052 TimeWindowFilterKey = "TIME"
@@ -76,6 +78,7 @@ type Options struct {
7678 ReplicaCount int
7779 IsLoadBalancingEnabled bool
7880 FeatureFlagTracing * FeatureFlagTracing
81+ FMVersion string
7982}
8083
8184func GetHostType () HostType {
@@ -93,6 +96,10 @@ func GetHostType() HostType {
9396 return ""
9497}
9598
99+ func GetFeatureManagementVersion () string {
100+ return os .Getenv (FMGoVerEnv )
101+ }
102+
96103func CreateCorrelationContextHeader (ctx context.Context , options Options ) http.Header {
97104 header := http.Header {}
98105 output := make ([]string , 0 )
@@ -141,6 +148,10 @@ func CreateCorrelationContextHeader(ctx context.Context, options Options) http.H
141148 output = append (output , featureStr )
142149 }
143150
151+ if options .FMVersion != "" {
152+ output = append (output , FMGoVerKey + "=" + options .FMVersion )
153+ }
154+
144155 if options .FeatureFlagTracing != nil {
145156 if options .FeatureFlagTracing .UsesAnyFeatureFilter () {
146157 output = append (output , FeatureFilterTypeKey + "=" + options .FeatureFlagTracing .CreateFeatureFiltersString ())
0 commit comments