some refinement
Build and Publish / Metadata (push) Has been cancelled
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
2026-04-07 12:44:55 +02:00
parent 89e1db8edf
commit 0ed1cb4355
14 changed files with 390 additions and 104 deletions
+6 -1
View File
@@ -6,6 +6,7 @@ import (
"log"
"net"
"net/http"
"os"
"strings"
"git.tornberg.me/go-otel/internal/collector"
@@ -152,7 +153,11 @@ func main() {
// Configure history size (default 100, can be made configurable)
historySize := 100
store := storage.NewFileStore("otel-agent.log")
logPath := os.Getenv("OTELLOG_PATH")
if logPath == "" {
logPath = "otel-agent.log"
}
store := storage.NewFileStore(logPath)
coll := collector.New(nil, historySize, store) // Temporary nil for wsServer
wsServer := websocket.New(coll)
// Update collector with wsServer