improve tracking
This commit is contained in:
2
.github/workflows/docker-build-self.yml
vendored
2
.github/workflows/docker-build-self.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker run -d --name temp-$IMAGE_NAME -p $TEST_PORT:54321 $IMAGE_NAME:latest
|
docker run -d --name temp-$IMAGE_NAME -p $TEST_PORT:54321 $IMAGE_NAME:latest
|
||||||
sleep 10 # Wait for the container to start
|
sleep 10 # Wait for the container to start
|
||||||
if curl -f http://localhost:$TEST_PORT/health; then
|
if curl -f --max-time 10 http://localhost:$TEST_PORT/health; then
|
||||||
echo "Health check passed"
|
echo "Health check passed"
|
||||||
docker stop temp-$IMAGE_NAME
|
docker stop temp-$IMAGE_NAME
|
||||||
docker rm temp-$IMAGE_NAME
|
docker rm temp-$IMAGE_NAME
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ func main() {
|
|||||||
|
|
||||||
// MY supper tracking
|
// MY supper tracking
|
||||||
e.Use(tracking.EchoWithConfig(tracking.TrackingConfig{
|
e.Use(tracking.EchoWithConfig(tracking.TrackingConfig{
|
||||||
IgnorePaths: []string{"/tracking", "/metrics", "/css/*", "/js/*", "/boxes/ws"},
|
IgnorePaths: []string{"/tracking", "/metrics", "/css/*", "/js/*", "/boxes/ws", "*favicon*"},
|
||||||
IgnoreUserAgents: []string{"*Prometheus*", "*UptimeRobot*"},
|
IgnoreUserAgents: []string{"*Prometheus*", "*UptimeRobot*"},
|
||||||
}))
|
}))
|
||||||
trackingGroup := e.Group("/tracking")
|
trackingGroup := e.Group("/tracking")
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ func BasicTrackingHandler(c echo.Context) error {
|
|||||||
UniqueVisitors: ts.GetUniqueVisitors(),
|
UniqueVisitors: ts.GetUniqueVisitors(),
|
||||||
TodayVisits: ts.GetTodayVisits(),
|
TodayVisits: ts.GetTodayVisits(),
|
||||||
ActiveSessions: ts.GetActiveSessions(),
|
ActiveSessions: ts.GetActiveSessions(),
|
||||||
RecentVisits: ts.GetRecentVisits(20),
|
RecentVisits: ts.GetRecentVisits(50),
|
||||||
TopPages: ts.GetTopPages(5),
|
TopPages: ts.GetTopPages(5),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user