File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -215,14 +215,6 @@ class Subscriber {
215215 * @returns {Context } either new context or existing
216216 */
217217 handler ( data , ctx ) {
218- if ( this . #usageMetricRecorded === false ) {
219- recordSupportabilityMetric ( {
220- agent : this . agent ,
221- moduleName : this . packageName ,
222- moduleVersion : data . moduleVersion
223- } )
224- this . #usageMetricRecorded = true
225- }
226218 return ctx
227219 }
228220
@@ -246,6 +238,15 @@ class Subscriber {
246238 * @returns {Context } The context after processing the event
247239 */
248240 const handler = ( data ) => {
241+ if ( this . #usageMetricRecorded === false ) {
242+ recordSupportabilityMetric ( {
243+ agent : this . agent ,
244+ moduleName : this . packageName ,
245+ moduleVersion : data . moduleVersion
246+ } )
247+ this . #usageMetricRecorded = true
248+ }
249+
249250 // only wrap the callback if a subscriber has a callback property defined
250251 if ( this . callback !== null ) {
251252 this . traceCallback ( this . callback , data )
You can’t perform that action at this time.
0 commit comments