Skip to content

Commit

Permalink
Move gRPC instrumentation from go.opentelemetry.io/otel (#189)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
MrAlias authored Aug 6, 2020
1 parent 94a1029 commit 87806b1
Show file tree
Hide file tree
Showing 17 changed files with 2,046 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ updates:
directory: "/instrumentation/go.mongodb.org/mongo-driver" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/instrumentation/google.golang.org/grpc" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/instrumentation/gopkg.in/macaron.v1" # Location of package manifests
schedule:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ Thumbs.db
*.so
coverage.*

instrumentation/google.golang.org/grpc/example/server/server
instrumentation/google.golang.org/grpc/example/client/client
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### Added

- 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)

## [0.10.0] - 2020-07-31

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.
Expand Down
28 changes: 28 additions & 0 deletions instrumentation/google.golang.org/grpc/example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# gRPC Tracing Example

Traces client and server calls via interceptors.

### Compile .proto

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

```sh
cd ./example/grpc

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

### Run server

```sh
cd ./example/grpc

go run ./server
```

### Run client

```sh
go run ./client
```
Loading

0 comments on commit 87806b1

Please sign in to comment.