@@ -133,27 +133,27 @@ private void connectAndLoop(URI uri, CountDownLatch signal) {
133133 _log .debug (exc .getMessage ());
134134 if (SOCKET_CLOSED_MESSAGE .equals (exc .getMessage ())) { // Connection closed by us
135135 _statusCallback .apply (StatusMessage .FORCED_STOP );
136- _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .StreamEventsValues .REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
136+ _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .SseConnectionErrorValues .REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
137137 return ;
138138 }
139139 // Connection closed by server
140140 _statusCallback .apply (StatusMessage .RETRYABLE_ERROR );
141- _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .StreamEventsValues .NON_REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
141+ _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .SseConnectionErrorValues .NON_REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
142142 return ;
143143 } catch (IOException exc ) { // Other type of connection error
144144 if (!_forcedStop .get ()) {
145145 _log .debug (String .format ("SSE connection ended abruptly: %s. Retying" , exc .getMessage ()));
146- _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .StreamEventsValues .REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
146+ _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .SseConnectionErrorValues .REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
147147 _statusCallback .apply (StatusMessage .RETRYABLE_ERROR );
148148 return ;
149149 }
150150
151- _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .StreamEventsValues .NON_REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
151+ _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .SseConnectionErrorValues .NON_REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
152152 }
153153 }
154154 } catch (Exception e ) { // Any other error non related to the connection disables streaming altogether
155155
156- _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .StreamEventsValues .NON_REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
156+ _telemetryRuntimeProducer .recordStreamingEvents (new StreamingEvent (StreamEventsEnum .SSE_CONNECTION_ERROR .getType (), StreamEventsEnum .SseConnectionErrorValues .NON_REQUESTED_CONNECTION_ERROR .getValue (), System .currentTimeMillis ()));
157157 _log .warn (e .getMessage (), e );
158158 _statusCallback .apply (StatusMessage .NONRETRYABLE_ERROR );
159159 } finally {
0 commit comments