@@ -16,13 +16,12 @@ use std::time::{Duration, SystemTime};
16
16
use std:: { env, thread} ;
17
17
18
18
use config:: TelemetryConfig ;
19
- use deno_core:: anyhow:: { self , bail} ;
20
19
use deno_core:: futures:: channel:: mpsc;
21
20
use deno_core:: futures:: channel:: mpsc:: UnboundedSender ;
22
21
use deno_core:: futures:: future:: BoxFuture ;
23
22
use deno_core:: futures:: { stream, FutureExt , Stream , StreamExt } ;
24
23
use deno_core:: v8:: DataError ;
25
- use deno_core:: { op2, v8, GarbageCollected , OpState } ;
24
+ use deno_core:: { anyhow , op2, v8, GarbageCollected , OpState } ;
26
25
use deno_error:: { JsError , JsErrorBox } ;
27
26
use once_cell:: sync:: Lazy ;
28
27
use opentelemetry:: logs:: { AnyValue , LogRecord as LogRecordTrait , Severity } ;
@@ -543,9 +542,7 @@ pub fn init(
543
542
) -> deno_core:: anyhow:: Result < OtelGlobals > {
544
543
let protocol = config. protocol ;
545
544
546
- let Some ( endpoint) = config. endpoint else {
547
- bail ! ( "missing endpoint" ) ;
548
- } ;
545
+ let endpoint = config. endpoint . unwrap_or ( "" . to_string ( ) ) ;
549
546
let endpoint = endpoint. trim_end_matches ( "/" ) . to_string ( ) ; // normalize endpoint
550
547
551
548
// Define the resource attributes that will be attached to all log records.
0 commit comments