mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
fix get_url test to take config.url into account
This commit is contained in:
parent
329d45ee45
commit
a62f1d891a
3 changed files with 7 additions and 2 deletions
|
|
@ -559,6 +559,9 @@ end
|
|||
|
||||
let setup_ ?(stop = Atomic.make false) ~(config : Config.t) () =
|
||||
debug_ := config.debug;
|
||||
|
||||
if config.url <> get_url () then set_url config.url;
|
||||
|
||||
let module B =
|
||||
Backend
|
||||
(struct
|
||||
|
|
|
|||
|
|
@ -446,6 +446,8 @@ let setup_ ?(stop = Atomic.make false) ~(config : Config.t) () =
|
|||
let ((module B) as backend) = mk_backend ~stop ~config () in
|
||||
Opentelemetry.Collector.set_backend backend;
|
||||
|
||||
if config.url <> get_url () then set_url config.url;
|
||||
|
||||
if config.ticker_thread then (
|
||||
let sleep_ms = min 5_000 (max 2 config.batch_timeout_ms) in
|
||||
ignore (setup_ticker_thread ~stop ~sleep_ms backend () : Thread.t)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
ocurl url = http://localhost:4318
|
||||
cohttp url = http://localhost:4318
|
||||
ocurl url = http://localhost:3000
|
||||
cohttp url = http://localhost:3000
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue