Add agent session duration tracking to dashboard graphs#86
Merged
Conversation
Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add Session Duration for Websocket sessions into agents in graphs
Add agent session duration tracking to dashboard graphs
Jul 26, 2025
Contributor
|
@copilot build failures... |
Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com>
Contributor
Author
Fixed the build failure in commit cd8c9bb. The issue was a type mismatch in the test mocks where Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The dashboard session duration graphs previously only displayed terminal/SSH session metrics, providing an incomplete view of system activity. This PR extends the session tracking to include agent websocket sessions, ensuring that all session types are represented in the dashboard analytics.
Changes Made
Enhanced Agent Session Tracking
GET /api/v1/sessions/agent/durations- Returns completed agent sessionsGET /api/v1/sessions/agent/active-durations- Returns active agent sessionsUnified Dashboard Integration
getGraphData()to fetch and combine both terminal and agent session dataagentproxy.externalUrlproperty to connect to agent servicesData Flow
Example Output
Before: Dashboard showed only terminal sessions (incomplete view)
After: Dashboard shows combined session duration distribution:
{ "0-5 min": 5, // 3 terminal + 2 agent sessions "5-15 min": 8, // 4 terminal + 4 agent sessions "15-30 min": 3, // 2 terminal + 1 agent session "30+ min": 2 // 2 terminal sessions }Benefits
Fixes #85.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
repository.jboss.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/Sentrius/Sentrius org.codehaus.plexus.classworlds.launcher.Launcher clean compile -DskipTests -q(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.