File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ pub(crate) fn default_test_config() -> Config {
120
120
log_level : "info" . to_owned ( ) ,
121
121
log_fmt : "json" . to_owned ( ) ,
122
122
log_no_color : false ,
123
+ otlp_endpoint : None ,
123
124
daemon : false ,
124
125
daemon_pid_file : "policy_server.pid" . to_owned ( ) ,
125
126
daemon_stdout_file : None ,
Original file line number Diff line number Diff line change @@ -773,7 +773,7 @@ async fn test_otel() {
773
773
traces_output_file_path. to_str ( ) . unwrap ( ) ,
774
774
"/tmp/traces.json" ,
775
775
) )
776
- . with_mapped_port ( 4317 , 4317 . into ( ) )
776
+ . with_mapped_port ( 1337 , 4317 . into ( ) )
777
777
. with_cmd ( vec ! [ "--config=/etc/otel-collector-config.yaml" ] )
778
778
. with_startup_timeout ( Duration :: from_secs ( 30 ) )
779
779
. start ( )
@@ -783,8 +783,15 @@ async fn test_otel() {
783
783
let mut config = default_test_config ( ) ;
784
784
config. metrics_enabled = true ;
785
785
config. log_fmt = "otlp" . to_string ( ) ;
786
- setup_metrics ( ) . unwrap ( ) ;
787
- setup_tracing ( & config. log_level , & config. log_fmt , config. log_no_color ) . unwrap ( ) ;
786
+ config. otlp_endpoint = Some ( "http://localhost:1337" . to_string ( ) ) ;
787
+ setup_metrics ( config. otlp_endpoint . as_deref ( ) ) . unwrap ( ) ;
788
+ setup_tracing (
789
+ & config. log_level ,
790
+ & config. log_fmt ,
791
+ config. log_no_color ,
792
+ config. otlp_endpoint . as_deref ( ) ,
793
+ )
794
+ . unwrap ( ) ;
788
795
789
796
let app = app ( config) . await ;
790
797
You can’t perform that action at this time.
0 commit comments