@@ -29,22 +29,15 @@ export class Aggregate extends AggregateBase {
29
29
30
30
this . referrerUrl = ( isBrowserScope && document . referrer ) ? cleanURL ( document . referrer ) : undefined
31
31
32
- /** track usage SMs to improve these experimental features */
33
- const configPerfTag = 'Config/Performance/'
34
- if ( agentRef . init . performance . capture_marks ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'CaptureMarks/Enabled' ] )
35
- if ( agentRef . init . performance . capture_measures ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'CaptureMeasures/Enabled' ] )
36
- if ( agentRef . init . performance . resources . enabled ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/Enabled' ] )
37
- if ( agentRef . init . performance . resources . asset_types ?. length !== 0 ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/AssetTypes/Changed' ] )
38
- if ( agentRef . init . performance . resources . first_party_domains ?. length !== 0 ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/FirstPartyDomains/Changed' ] )
39
- if ( agentRef . init . performance . resources . ignore_newrelic === false ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/IgnoreNewrelic/Changed' ] )
40
-
41
32
this . waitForFlags ( [ 'ins' ] ) . then ( ( [ ins ] ) => {
42
33
if ( ! ins ) {
43
34
this . blocked = true
44
35
this . deregisterDrain ( )
45
36
return
46
37
}
47
38
39
+ this . trackSupportabilityMetrics ( )
40
+
48
41
if ( agentRef . init . page_action . enabled ) {
49
42
registerHandler ( 'api-addPageAction' , ( timestamp , name , attributes ) => {
50
43
this . addEvent ( {
@@ -249,4 +242,15 @@ export class Aggregate extends AggregateBase {
249
242
this . harvestScheduler . runHarvest ( )
250
243
}
251
244
}
245
+
246
+ trackSupportabilityMetrics ( ) {
247
+ /** track usage SMs to improve these experimental features */
248
+ const configPerfTag = 'Config/Performance/'
249
+ if ( this . agentRef . init . performance . capture_marks ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'CaptureMarks/Enabled' ] )
250
+ if ( this . agentRef . init . performance . capture_measures ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'CaptureMeasures/Enabled' ] )
251
+ if ( this . agentRef . init . performance . resources . enabled ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/Enabled' ] )
252
+ if ( this . agentRef . init . performance . resources . asset_types ?. length !== 0 ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/AssetTypes/Changed' ] )
253
+ if ( this . agentRef . init . performance . resources . first_party_domains ?. length !== 0 ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/FirstPartyDomains/Changed' ] )
254
+ if ( this . agentRef . init . performance . resources . ignore_newrelic === false ) handle ( SUPPORTABILITY_METRIC_CHANNEL , [ configPerfTag + 'Resources/IgnoreNewrelic/Changed' ] )
255
+ }
252
256
}
0 commit comments