File tree 2 files changed +20
-7
lines changed
2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,16 @@ exporters:
17
17
path : /tmp/metrics.json
18
18
file/traces :
19
19
path : /tmp/traces.json
20
+ debug :
21
+ verbosity : detailed
20
22
21
23
service :
22
24
pipelines :
23
25
metrics :
24
26
receivers : [otlp]
25
27
processors : []
26
- exporters : [file/metrics]
28
+ exporters : [file/metrics, debug ]
27
29
traces :
28
30
receivers : [otlp]
29
31
processors : []
30
- exporters : [file/traces]
32
+ exporters : [file/traces, debug ]
Original file line number Diff line number Diff line change @@ -955,11 +955,22 @@ async fn test_otel() {
955
955
. with_max_delay ( Duration :: from_secs ( 30 ) )
956
956
. with_max_times ( 5 ) ;
957
957
958
- let metrics_output_json =
959
- ( || async { parse_exporter_output ( metrics_output_file. as_file ( ) ) . await } )
960
- . retry ( exponential_backoff)
961
- . await
962
- . unwrap ( ) ;
958
+ let metrics_output_json = ( || async {
959
+ let out = otelc. stdout_to_vec ( ) . await . unwrap ( ) ;
960
+ println ! (
961
+ "stdout: {}" ,
962
+ String :: from_utf8( out) . unwrap_or( "cannot get stdout" . to_string( ) )
963
+ ) ;
964
+ let out = otelc. stderr_to_vec ( ) . await . unwrap ( ) ;
965
+ println ! (
966
+ "stderr: {}" ,
967
+ String :: from_utf8( out) . unwrap_or( "cannot get stderr" . to_string( ) )
968
+ ) ;
969
+ parse_exporter_output ( metrics_output_file. as_file ( ) ) . await
970
+ } )
971
+ . retry ( exponential_backoff)
972
+ . await
973
+ . unwrap ( ) ;
963
974
let metrics = & metrics_output_json[ "resourceMetrics" ] [ 0 ] [ "scopeMetrics" ] [ 0 ] ;
964
975
assert_eq ! ( metrics[ "scope" ] [ "name" ] , "kubewarden" ) ;
965
976
assert ! (
You can’t perform that action at this time.
0 commit comments