File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @hyperdx/browser ' : patch
3+ ---
4+
5+ Support per-signal OTLP exporter endpoints in hyperdx/browser
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ type BrowserSDKConfig = {
3333 service : string ;
3434 tracePropagationTargets ?: ( string | RegExp ) [ ] ;
3535 url ?: string ;
36+ tracesUrl ?: string ;
37+ logsUrl ?: string ;
3638 otelResourceAttributes ?: ResourceAttributes ;
3739} ;
3840
@@ -66,6 +68,8 @@ class Browser {
6668 service,
6769 tracePropagationTargets,
6870 url,
71+ tracesUrl,
72+ logsUrl,
6973 otelResourceAttributes,
7074 } : BrowserSDKConfig ) {
7175 if ( ! hasWindow ( ) ) {
@@ -85,12 +89,14 @@ class Browser {
8589 }
8690
8791 const urlBase = url ?? URL_BASE ;
92+ const resolvedTracesUrl = tracesUrl ?? `${ urlBase } /v1/traces` ;
93+ const resolvedLogsUrl = logsUrl ?? `${ urlBase } /v1/logs` ;
8894
8995 this . _advancedNetworkCapture = advancedNetworkCapture ;
9096
9197 Rum . init ( {
9298 debug,
93- url : ` ${ urlBase } /v1/traces` ,
99+ url : resolvedTracesUrl ,
94100 allowInsecureUrl : true ,
95101 apiKey,
96102 applicationName : service ,
@@ -130,7 +136,7 @@ class Browser {
130136 maskTextSelector : maskAllText ? '*' : undefined ,
131137 recordCanvas,
132138 sampling,
133- url : ` ${ urlBase } /v1/logs` ,
139+ url : resolvedLogsUrl ,
134140 } ) ;
135141 }
136142
You can’t perform that action at this time.
0 commit comments