A simple gRPC server using the helloworld example to demonstrate instrumenting a grpc server with Open Telemetry and Google Cloud Trace.
The SayHello
will automatically fail with an internal grpc error to demonstrate the status handling in Cloud Trace.
Prerequisites:
- A GCP project with tracing enabled
- A GCP user logged in, with the correct IAM permission to create/view traces
To run it:
- PROJECT_ID=<gcp_project_id> go run *.go
- See that the call errored with this log message
could not greet: rpc error: code = Internal desc = force error
- Go to the Cloud Trace dashboard and observe that span appears normal, it's not coloured red.