Skip to content

Commit 87806b1

Browse files
authored
Move gRPC instrumentation from go.opentelemetry.io/otel (#189)
* Add google.golang.org/grpc instrumentation from otel repo Move the existing grpctrace package from the go.opentelemetry.io/otel repository to here. This is based on the package last modified in: 96a5f8f This is related to: https://github.com/open-telemetry/opentelemetry-go/issues/976 * Update package name: grpctrace -> grpc * Revert back to the v0.10.0 api/standard package for now * Make into Go module * Update the Changelog * Move the gRPC example from otel Taken from the otel repository at 5438916 * Update packaging of example * Update go.sum for example * Add grpc instrumentation to dependabot config
1 parent 94a1029 commit 87806b1

17 files changed

+2046
-0
lines changed

.github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ updates:
4949
directory: "/instrumentation/go.mongodb.org/mongo-driver" # Location of package manifests
5050
schedule:
5151
interval: "daily"
52+
- package-ecosystem: "gomod" # See documentation for possible values
53+
directory: "/instrumentation/google.golang.org/grpc" # Location of package manifests
54+
schedule:
55+
interval: "daily"
5256
- package-ecosystem: "gomod" # See documentation for possible values
5357
directory: "/instrumentation/gopkg.in/macaron.v1" # Location of package manifests
5458
schedule:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ Thumbs.db
88
*.so
99
coverage.*
1010

11+
instrumentation/google.golang.org/grpc/example/server/server
12+
instrumentation/google.golang.org/grpc/example/client/client

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
88

99
## [Unreleased]
1010

11+
### Added
12+
13+
- The `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc` module has been added to replace the instrumentation that had previoiusly existed in the `go.opentelemetry.io/otel/instrumentation/grpctrace` package. (#189)
14+
1115
## [0.10.0] - 2020-07-31
1216

1317
This release upgrades its [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0) dependency to v0.10.0 and includes new instrumentation for popular Kafka and Cassandra clients.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# gRPC Tracing Example
2+
3+
Traces client and server calls via interceptors.
4+
5+
### Compile .proto
6+
7+
Only required if the service definition (.proto) changes.
8+
9+
```sh
10+
cd ./example/grpc
11+
12+
# protobuf v1.3.2
13+
protoc -I api --go_out=plugins=grpc,paths=source_relative:./api api/hello-service.proto
14+
```
15+
16+
### Run server
17+
18+
```sh
19+
cd ./example/grpc
20+
21+
go run ./server
22+
```
23+
24+
### Run client
25+
26+
```sh
27+
go run ./client
28+
```

0 commit comments

Comments
 (0)