File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,12 @@ func (s *Server) Start() {
119
119
}
120
120
121
121
// start the OpenTelemetry tracing service
122
- err := s .otelService .Init (context .Background (), * s .config )
123
- if err != nil {
124
- s .zapLog .Error ("error while initializing Otel" , zap .Error (err ))
125
- // we can continue because otel is not mandatory to start the server
122
+ if s .config .OpenTelemetryOtlpEndpoint != "" {
123
+ err := s .otelService .Init (context .Background (), * s .config )
124
+ if err != nil {
125
+ s .zapLog .Error ("error while initializing Otel" , zap .Error (err ))
126
+ // we can continue because otel is not mandatory to start the server
127
+ }
126
128
}
127
129
128
130
// starting the main application
@@ -135,7 +137,7 @@ func (s *Server) Start() {
135
137
zap .String ("address" , address ),
136
138
zap .String ("version" , s .config .Version ))
137
139
138
- err = s .apiEcho .Start (address )
140
+ err : = s .apiEcho .Start (address )
139
141
if err != nil && ! errors .Is (err , http .ErrServerClosed ) {
140
142
s .zapLog .Fatal ("Error starting relay proxy" , zap .Error (err ))
141
143
}
You can’t perform that action at this time.
0 commit comments