1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-01-05 22:54:18 +02:00
opentelemetry-go/example/grpc
Krzesimir Nowak 6b4acf47b8 Reorganize propagation code (shrink PR 381) (#444)
* Rename distributedcontext package to correlation

Correlation is the name we agreed upon.

* Move trace propagators to api/trace

The trace propagators tests had to be moved to a testtrace subpackage
to avoid import cycles between api/trace and internal/trace.

Needed to shut up golint about stutter in trace.TraceContext -
TraceContext is a name of a W3C spec, so this stutter is
expected. It's certainly still better than golint's suggestion of
having trace.Context.

* Rename api/propagators to api/propagation

This package will not contain any propagators in the long run, just
the interface definitions.

Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
2020-01-28 10:13:46 -08:00
..
api Unary gRPC tracing example (#351) 2019-11-26 16:14:09 -08:00
client Consistently use pointer receivers for core.Number (#375) 2019-12-09 13:03:11 -08:00
config Unary gRPC tracing example (#351) 2019-11-26 16:14:09 -08:00
middleware/tracing Reorganize propagation code (shrink PR 381) (#444) 2020-01-28 10:13:46 -08:00
server Unary gRPC tracing example (#351) 2019-11-26 16:14:09 -08:00
go.mod go module update for release v0.2.1 (#413) 2020-01-08 09:41:58 -05:00
go.sum Global meter forwarding implementation (#392) 2019-12-23 23:03:04 -08: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