Skip to content
Function call tracer for golang
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Goapptrace is a function call tracer for golang.

Currently State

The goapptrace has not reached a stable release yet. So interfaces and data formats might be change without notice.


$ go get -u


1. Start goapptrace server

The goapptrace consists of server and client. You should start the goapptrace server before tracing.

$ goapptrace server run &

NOTE: The goapptrace server creates ~/goapptrace directory, and stores all log files in it. Log files might grow very large. You can change log storage location by --config argument.

2. Start application with goapptrace

If target application can be run with go run command, we recommnd using goapptrace run command.

$ goapptrace run -- ./foo.go [args]

If you want executable binaries, use goapptrace build command instead of go build. When start applications, it requires the GOAPPTRACE_SERVER environment variable.

$ goapptrace build -o ./foo ./file.go
$ GOAPPTRACE_SERVER=tcp:// ./foo [args]

3. Show logs

You can see logs with CLI.

$ goapptrace log ls             # Check LOG_ID.
$ goapptrace log cat "$LOG_ID"  # Print all log messages.

4. Reduce logs to increase performance

Did your application become unbearably slow down? Are logs too many? Let's try to disable trace of unnecessary functions.

goapptrace trace ls command shows all function names and currently settings. You can choose functions from it, and change settings by goapptrace trace start/stop commands.

$ goapptrace log ls                # Check LOG_ID.
$ goapptrace trace ls "$LOG_ID"    # Check function names and current status.
$ goapptrace trace stop "$LOG_ID"  # Disable all.
$ goapptrace trace start "$LOG_ID" baz.qux

Please see goapptrace --help for more information about available commands.


  • Implement TUI completely.
  • Collect more information from runtime.ReadTrace().
  • Create tests for tracer, builder and CLI commands.
  • Create documents.
  • Release a stable version.
  • Enable linters that are currently disabled.

Copyright and license

These codes are written by yuuki <\>. Codes released under the MIT license.

You can’t perform that action at this time.