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

Add a generic grpc server settings config, cleanup client config #1183

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

bogdandrutu
Copy link
Member

@bogdandrutu bogdandrutu commented Jun 24, 2020

Backwards compatible change for the configuration.

Depends on #1172

Fixes #1014

@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #1183 into master will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1183      +/-   ##
==========================================
- Coverage   87.61%   87.59%   -0.02%     
==========================================
  Files         204      204              
  Lines       14697    14677      -20     
==========================================
- Hits        12877    12857      -20     
  Misses       1378     1378              
  Partials      442      442              
Impacted Files Coverage Δ
config/configgrpc/configgrpc.go 100.00% <100.00%> (ø)
exporter/jaegerexporter/exporter.go 86.20% <100.00%> (ø)
exporter/opencensusexporter/factory.go 90.32% <100.00%> (ø)
exporter/otlpexporter/exporter.go 67.53% <100.00%> (ø)
receiver/jaegerreceiver/trace_receiver.go 78.34% <100.00%> (ø)
receiver/opencensusreceiver/config.go 80.00% <100.00%> (-14.45%) ⬇️
receiver/opencensusreceiver/factory.go 95.12% <100.00%> (+0.25%) ⬆️
receiver/otlpreceiver/config.go 80.00% <100.00%> (-14.45%) ⬇️
receiver/otlpreceiver/factory.go 95.12% <100.00%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29542fc...5085671. Read the comment docs.

@bogdandrutu bogdandrutu force-pushed the grpcserver branch 3 times, most recently from 22a70c5 to f6e8583 Compare June 24, 2020 21:11
Copy link
Member Author

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL

Copy link
Member

@nilebox nilebox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few more minor comments.

Copy link
Member

@james-bebbington james-bebbington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than Nail's comment above re that function name.

I just have a couple questions around the structure of the config.

func GrpcSettingsToDialOptions(settings GRPCClientSettings) ([]grpc.DialOption, error) {
type GRPCServerSettings struct {
// Configures the generic server protocol.
configprotocol.ProtocolServerSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
Copy link
Member

@james-bebbington james-bebbington Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth putting consideration into how this will look in cases where we support multiple protocols over the same endpoint? e.g. gRPC Gateway or the Jaeger receiver config (something to think about for when generic HTTP Server settings are added as well)

Maybe gRPC Gateway is a special case where it makes sense to just continue to specificy CorsOrigins separate to the gRPC settings

Copy link
Member

@james-bebbington james-bebbington Jun 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also it seems weird to me that in gRPC (and HTTP) Client Settings, TLS settings are squashed, but in gRPC Server settings, TLS settings are under tls_configuration (inside ProtocolServerSettings). I know it may require a breaking change, but is there any possibilty we can make that more consistent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix that in a future PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright - I assume you're referring to the second comment.

Any thoughts on the first comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both will come soon :)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
@bogdandrutu bogdandrutu merged commit 5211772 into open-telemetry:master Jun 25, 2020
@bogdandrutu bogdandrutu deleted the grpcserver branch June 25, 2020 23:37
wyTrivail pushed a commit to mxiamxia/opentelemetry-collector that referenced this pull request Jul 13, 2020
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify gRPC settings for server connections
3 participants