Skip to content

Add distributed monitoring service and real-time observability dashboard#2

Merged
DedSec2050 merged 1 commit into
mainfrom
feature/distributed-monitoring-dashboard
May 24, 2026
Merged

Add distributed monitoring service and real-time observability dashboard#2
DedSec2050 merged 1 commit into
mainfrom
feature/distributed-monitoring-dashboard

Conversation

@DedSec2050

Copy link
Copy Markdown
Contributor

Implement distributed monitoring and real-time dashboard

  • Added Spring Boot monitor-service
  • Implemented TCP telemetry ingestion
  • Added WebSocket metrics broadcasting
  • Integrated Vue.js real-time dashboard
  • Added shared telemetry DTO contracts
  • Implemented FFmpeg resource throttling
  • Added live processing metrics pipeline
  • Improved distributed observability architecture

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new Spring Boot monitor-service (TCP telemetry ingestion + WebSocket broadcast) and a Vue dashboard scaffold, and refactors the shared MetricsSnapshot DTO into a com.videoprocessor.shared package. However, the refactor leaves the main worker project in a broken state, the new TCP ingestion uses Java's unsafe ObjectInputStream.readObject(), the WebSocket endpoint is open to all origins, and the pom.xml references non-existent Spring Boot starter artifacts.

Changes:

  • New monitor-service Spring Boot module: MetricsTcpServer (port 8081), MetricsHub, MetricsWebSocketHandler broadcasting on /metrics, MetricsMessage envelope.
  • Move/duplicate of MetricsSnapshot into com.videoprocessor.shared (with no-arg constructor + setters for deserialization); the original location in the main source tree is reduced to an empty stub.
  • Vue dashboard scaffolding (mostly empty placeholder files) and a small metricsStore with default counters.

Reviewed changes

Copilot reviewed 17 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/com/videoprocessor/shared/MetricsSnapshot.java Replaced with empty stub — breaks main project compilation.
monitor-service/src/main/java/com/videoprocessor/shared/MetricsSnapshot.java Full DTO with no-arg ctor + setters for (de)serialization.
monitor-service/.../tcp/MetricsTcpServer.java Accepts TCP clients, deserializes via ObjectInputStream (unsafe).
monitor-service/.../websocket/MetricsWebSocketHandler.java Virtual-thread broadcast loop, every 2 s, with printStackTrace error handling.
monitor-service/.../websocket/WebSocketConfig.java Registers /metrics handler with setAllowedOrigins("*").
monitor-service/.../metrics/MetricsHub.java Volatile snapshot holder.
monitor-service/.../metrics/MetricsMessage.java JSON envelope (type, timestamp, payload).
monitor-service/.../MonitorServiceApplication.java Spring Boot entry point.
monitor-service/src/test/.../MonitorServiceApplicationTests.java Default contextLoads smoke test.
monitor-service/pom.xml Spring Boot 4.0.6 parent, Java 25, references non-existent spring-boot-starter-webmvc-test/-websocket-test artifacts.
monitor-service/application.properties Sets spring.application.name.
monitor-service/mvnw, mvnw.cmd, .mvn/wrapper/..., .gitignore, .gitattributes Standard Maven Wrapper / scaffolding files.
dashboard/src/stores/metricsStore.js Exports initialMetrics defaults.
dashboard/src/** (.vue, .css, .js) Empty placeholder files for the dashboard scaffold.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,4 @@
package com.videoprocessor.shared;

public class MetricsSnapshot {
Comment on lines +67 to +79
try (
ObjectInputStream input =
new ObjectInputStream(
socket.getInputStream()
)
) {
System.out.println(
"[TCP] Client connected"
);

MetricsSnapshot snapshot =
(MetricsSnapshot)
input.readObject();
Comment on lines +17 to +19
private static final String HOST = "localhost";

private static final int PORT = 8081;
Comment on lines +27 to +31
registry.addHandler(
handler,
"/metrics"
)
.setAllowedOrigins("*");
Comment on lines +72 to +88
Thread.ofVirtual().start(() -> {

while (true) {

try {

broadcastMetrics();

Thread.sleep(2000);

} catch (Exception e) {

e.printStackTrace();
}
}
});
}
Comment thread monitor-service/pom.xml
Comment on lines +61 to +69
<artifactId>spring-boot-starter-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@DedSec2050 DedSec2050 merged commit 9c4b856 into main May 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants