1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-12 02:28:07 +02:00
opentelemetry-go/example/grpc
Paul Reichelt 6de3dab6b6
Resolve #72 - gRPC Interceptor (#621)
* Move interceptor to plugin

* Add basic net.peer info

* Ensure that grpc status match span status

See: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/data-rpc.md#status

* Set rpc.service attribute

* Add StreamClientInterceptor and StreamServerInterceptor

* Fix: golint errors

* Apply automated go.mod changes from make

* Implement suggestions to improve readability
2020-04-23 13:07:14 -07:00
..
api Resolve #72 - gRPC Interceptor (#621) 2020-04-23 13:07:14 -07:00
client Resolve #72 - gRPC Interceptor (#621) 2020-04-23 13:07:14 -07:00
config Update License header for all source files (#586) 2020-03-23 22:41:10 -07:00
server Resolve #72 - gRPC Interceptor (#621) 2020-04-23 13:07:14 -07:00
go.mod Resolve #72 - gRPC Interceptor (#621) 2020-04-23 13:07:14 -07:00
go.sum update to v0.2.3 (#512) 2020-03-04 16:12:25 -05:00
README.md Unary gRPC tracing example (#351) 2019-11-26 16:14:09 -08:00

gRPC Tracing Example

Traces client and server calls via interceptors.

Compile .proto

Only required if the service definition (.proto) changes.

cd ./example/grpc

# protobuf v1.3.2
protoc -I api --go_out=plugins=grpc,paths=source_relative:./api api/hello-service.proto

Run server

cd ./example/grpc

go run ./server

Run client

go run ./client