File tree 2 files changed +4
-3
lines changed
artillery-engine-playwright
artillery-plugin-publish-metrics/lib/open-telemetry
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ class PlaywrightEngine {
11
11
this . launchOptions = this . config . launchOptions || { } ;
12
12
this . contextOptions = this . config . contextOptions || { } ;
13
13
14
- this . tracing = ( script . config ?. plugins ?. [ 'publish-metrics' ] || [ ] ) . some ( ( config ) => {
15
- return ( config . type === 'open-telemetry' ) && config . traces } )
14
+ this . tracing = global . artillery . OTEL_TRACING_ENABLED || false ;
16
15
17
16
this . defaultNavigationTimeout =
18
17
( parseInt ( this . config . defaultNavigationTimeout , 10 ) || 30 ) * 1000 ;
Original file line number Diff line number Diff line change @@ -68,7 +68,9 @@ class OTelReporter {
68
68
if ( ! this . metricsConfig && ! this . tracesConfig ) {
69
69
return this ;
70
70
}
71
-
71
+ if ( this . tracesConfig ) {
72
+ global . artillery . OTEL_TRACING_ENABLED = true ;
73
+ }
72
74
// Warn if traces are configured in multiple reporters
73
75
this . warnIfDuplicateTracesConfigured ( this . translatedConfigsList ) ;
74
76
You can’t perform that action at this time.
0 commit comments