This is an example of producing distributed traces using the SignalFx Tracing Library for Go. This example provides an instrumented API server that serves a simple in-memory store exposing a CRUD API.
To run this example locally and send traces to your available Smart Agent or Gateway, please clone this repository and from this directory do the following:
$ cd server
$ go get
$ go run server.go
By default the service name is simple-crud-api
and the tracing endpoint is http://localhost:9080/v1/trace
. These values can be overridden by setting ECHO_SERVICE_NAME
and ECHO_TRACING_ENDPOINT
environment variables
The following operations can be performed to generate traces.
curl -X POST \
-H 'Content-Type: application/json' \
-d '{"record":{"name":"Joe Doe", "age" : 29}}' \
localhost:1323/records
curl localhost:1323/records/1
curl -X PUT \
-H 'Content-Type: application/json' \
-d '{"record":{"name":"Joe Doe", "age" : 28, "email" : "joedoe@gmail.com"}}' \
localhost:1323/records/1
curl -XDELETE localhost:1323/records/1