@@ -133,27 +133,27 @@ private void connectAndLoop(URI uri, CountDownLatch signal) {
133
133
_log .debug (exc .getMessage ());
134
134
if (SOCKET_CLOSED_MESSAGE .equals (exc .getMessage ())) { // Connection closed by us
135
135
_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 ()));
137
137
return ;
138
138
}
139
139
// Connection closed by server
140
140
_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 ()));
142
142
return ;
143
143
} catch (IOException exc ) { // Other type of connection error
144
144
if (!_forcedStop .get ()) {
145
145
_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 ()));
147
147
_statusCallback .apply (StatusMessage .RETRYABLE_ERROR );
148
148
return ;
149
149
}
150
150
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 ()));
152
152
}
153
153
}
154
154
} catch (Exception e ) { // Any other error non related to the connection disables streaming altogether
155
155
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 ()));
157
157
_log .warn (e .getMessage (), e );
158
158
_statusCallback .apply (StatusMessage .NONRETRYABLE_ERROR );
159
159
} finally {
0 commit comments