some refinement
This commit is contained in:
+6
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user