Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the grpc.ClientConn to handle connections for the otlptracegrpc client #2329

Merged
merged 37 commits into from Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fabc9bf
POC using the grpc.ClientConn to handle connections
MrAlias Oct 26, 2021
d9dd484
Update invalid client security test
MrAlias Oct 26, 2021
df30aa7
Update client start test for a bad endpoint
MrAlias Oct 26, 2021
faa7981
Use any ClientConn a user provides
MrAlias Oct 26, 2021
03ff8a7
Connect ReconnectionPeriod to gRPC conn retries
MrAlias Oct 26, 2021
8e5494b
Replace connection retry handling direct in otlptracegrpc
MrAlias Nov 22, 2021
a6872c3
Fix client comments
MrAlias Oct 26, 2021
2c19be8
Fix comment for NewGRPCConfig
MrAlias Oct 26, 2021
d37ea99
Replace reconnection test
MrAlias Nov 16, 2021
2629f11
Fix grammar
MrAlias Nov 1, 2021
2cccd27
Remove unrelated changes
MrAlias Nov 16, 2021
9637c81
Remove connection pkg
MrAlias Nov 17, 2021
071cc40
Rename evaluate to retryable
MrAlias Nov 17, 2021
2aebe6a
POC using the grpc.ClientConn to handle connections
MrAlias Oct 26, 2021
1cffc27
Replace connection retry handling direct in otlptracegrpc
MrAlias Oct 26, 2021
25defaa
Add ClientConn use changes to changelog
MrAlias Nov 17, 2021
6d06f64
Update otlptracegrpc options
MrAlias Nov 17, 2021
5f30159
Only close ClientConn that the Client create
MrAlias Nov 17, 2021
8c7cb66
Remove listener wrapper from mock_collector_test
MrAlias Nov 17, 2021
bc0c507
Fix spelling error
MrAlias Nov 17, 2021
0dfcac2
Do not use deprecated options in the otel-collector example
MrAlias Nov 17, 2021
2ce320f
Add unit tests for retryable and throttleDelay funcs
MrAlias Nov 17, 2021
a50e7d6
Add unit tests for context heredity
MrAlias Nov 18, 2021
c7b7a8c
Add test that exporter stop is linked to context cancel
MrAlias Nov 18, 2021
2326ecb
go mod tidy
MrAlias Nov 18, 2021
5c07c31
Update exporters/otlp/otlptrace/otlptracegrpc/client.go
MrAlias Nov 18, 2021
b3e151d
Fix go.mod from rebase
MrAlias Nov 22, 2021
ab98555
Remove wrong comment about client stop closing gRPC conn
MrAlias Nov 22, 2021
7067fe0
Fix shutdown test cleanup
MrAlias Nov 22, 2021
549f1f8
Make lint fixes
MrAlias Nov 22, 2021
0952683
Fix flaky unit test
MrAlias Nov 22, 2021
8c07b29
Remove deprecation
MrAlias Nov 22, 2021
e7f98e6
Merge branch 'main' into poc-grpc-clientconn
MrAlias Nov 22, 2021
2b313ef
Fix grammatical error in comment
MrAlias Nov 23, 2021
702fdd7
Merge branch 'main' into poc-grpc-clientconn
MrAlias Nov 23, 2021
460535c
Merge branch 'main' into poc-grpc-clientconn
MrAlias Nov 23, 2021
5c9bcc3
Merge branch 'main' into poc-grpc-clientconn
MrAlias Nov 23, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

### Changed

- The `"go.opentelemetry.io/otel/exporter/otel/otlptrace/otlptracegrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2329)

### Removed

- Remove the metric Processor's ability to convert cumulative to delta aggregation temporality. (#2350)
Expand Down
8 changes: 3 additions & 5 deletions example/otel-collector/main.go
Expand Up @@ -53,13 +53,11 @@ func initProvider() func() {
// `localhost:30080` endpoint. Otherwise, replace `localhost` with the
// endpoint of your cluster. If you run the app inside k8s, then you can
// probably connect directly to the service through dns
conn, err := grpc.DialContext(ctx, "localhost:30080", grpc.WithInsecure(), grpc.WithBlock())
handleErr(err, "failed to create gRPC connection to collector")

// Set up a trace exporter
traceExporter, err := otlptracegrpc.New(ctx,
otlptracegrpc.WithInsecure(),
otlptracegrpc.WithEndpoint("localhost:30080"),
otlptracegrpc.WithDialOption(grpc.WithBlock()),
)
traceExporter, err := otlptracegrpc.New(ctx, otlptracegrpc.WithGRPCConn(conn))
handleErr(err, "failed to create trace exporter")

// Register the trace exporter with a TracerProvider, using a batch
Expand Down
1 change: 0 additions & 1 deletion exporters/otlp/otlptrace/go.mod
Expand Up @@ -10,7 +10,6 @@ require (
go.opentelemetry.io/otel/sdk v1.2.0
go.opentelemetry.io/otel/trace v1.2.0
go.opentelemetry.io/proto/otlp v0.11.0
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.27.1
)
Expand Down
38 changes: 0 additions & 38 deletions exporters/otlp/otlptrace/internal/connection/alignment_test.go

This file was deleted.