SUBTRACE_TOKEN from the Subtrace dashboard
for free to set it as an environment variable.
main binary using the following commands:
localhost:8080 to see them automatically appear in
Chrome DevTools in the Subtrace dashboard!Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Connect your Go backend to Chrome DevTools using Subtrace
package main
import (
"fmt"
"net/http"
)
type server struct{}
func (s *server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "hello from golang!\n")
}
func main() {
fmt.Printf("listening on port 8080...\n")
if err := http.ListenAndServe(":8080", new(server)); err != nil {
panic(err)
}
}
curl -fsSL https://subtrace.dev/install.sh | sh
SUBTRACE_TOKEN from the Subtrace dashboard
for free to set it as an environment variable.
# get a tracer token for free at https://subtrace.dev/dashboard
export SUBTRACE_TOKEN=
main binary using the following commands:
go mod init
go mod tidy
go build -o main main.go
subtrace run -- ./main
localhost:8080 to see them automatically appear in
Chrome DevTools in the Subtrace dashboard!