File tree Expand file tree Collapse file tree 3 files changed +11
-20
lines changed
feature-management-applicationinsights-browser/src
feature-management-applicationinsights-node/src
feature-management/src/telemetry Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,6 @@ export function createTelemetryPublisher(client: ApplicationInsights): (result:
1919 }
2020
2121 const eventProperties = createFeatureEvaluationEventProperties ( result ) ;
22-
23- const metadata = result . feature . telemetry ?. metadata ;
24- if ( metadata ) {
25- for ( const key in metadata ) {
26- if ( ! ( key in eventProperties ) ) {
27- eventProperties [ key ] = metadata [ key ] ;
28- }
29- }
30- }
31-
3222 client . trackEvent ( { name : FEATURE_EVALUATION_EVENT_NAME } , eventProperties ) ;
3323 } ;
3424}
Original file line number Diff line number Diff line change @@ -19,16 +19,6 @@ export function createTelemetryPublisher(client: TelemetryClient): (result: Eval
1919 }
2020
2121 const eventProperties = createFeatureEvaluationEventProperties ( result ) ;
22-
23- const metadata = result . feature . telemetry ?. metadata ;
24- if ( metadata ) {
25- for ( const key in metadata ) {
26- if ( ! ( key in eventProperties ) ) {
27- eventProperties [ key ] = metadata [ key ] ;
28- }
29- }
30- }
31-
3222 client . trackEvent ( { name : FEATURE_EVALUATION_EVENT_NAME , properties : eventProperties } ) ;
3323 } ;
3424}
Original file line number Diff line number Diff line change @@ -52,4 +52,15 @@ export function createFeatureEvaluationEventProperties(result: EvaluationResult)
5252 }
5353 eventProperties [ VARIANT_ASSIGNMENT_PERCENTAGE ] = percentileAllocationPercentage . toString ( ) ;
5454 }
55+
56+ const metadata = result . feature . telemetry ?. metadata ;
57+ if ( metadata ) {
58+ for ( const key in metadata ) {
59+ if ( ! ( key in eventProperties ) ) {
60+ eventProperties [ key ] = metadata [ key ] ;
61+ }
62+ }
63+ }
64+
65+ return eventProperties ;
5566}
You can’t perform that action at this time.
0 commit comments