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

Unify gRPC settings for server connections #1014

Closed
ccaraman opened this issue May 22, 2020 · 0 comments · Fixed by #1183
Closed

Unify gRPC settings for server connections #1014

ccaraman opened this issue May 22, 2020 · 0 comments · Fixed by #1183
Labels
enhancement New feature or request

Comments

@ccaraman
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Both Opencensus Receiver and Otlp Receiver have similar gRPC Server settings

type Config struct {
receiver.SecureReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
// Transport to use: one of tcp or unix, defaults to tcp
Transport string `mapstructure:"transport"`
// CorsOrigins are the allowed CORS origins for HTTP/JSON requests to grpc-gateway adapter
// for the OpenCensus receiver. See github.com/rs/cors
// An empty list means that CORS is not enabled at all. A wildcard (*) can be
// used to match any origin or one or more characters of an origin.
CorsOrigins []string `mapstructure:"cors_allowed_origins"`
// Keepalive anchor for all the settings related to keepalive.
Keepalive *serverParametersAndEnforcementPolicy `mapstructure:"keepalive,omitempty"`
// MaxRecvMsgSizeMiB sets the maximum size (in MiB) of messages accepted by the server.
MaxRecvMsgSizeMiB uint64 `mapstructure:"max_recv_msg_size_mib,omitempty"`
// MaxConcurrentStreams sets the limit on the number of concurrent streams to each ServerTransport.
MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams,omitempty"`
}
and
// Config defines configuration for OTLP receiver.
type Config struct {
receiver.SecureReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
// Transport to use: one of tcp or unix, defaults to tcp
Transport string `mapstructure:"transport"`
// CorsOrigins are the allowed CORS origins for HTTP/JSON requests to grpc-gateway adapter
// for the OTLP receiver. See github.com/rs/cors
// An empty list means that CORS is not enabled at all. A wildcard (*) can be
// used to match any origin or one or more characters of an origin.
CorsOrigins []string `mapstructure:"cors_allowed_origins"`
// Keepalive anchor for all the settings related to keepalive.
Keepalive *serverParametersAndEnforcementPolicy `mapstructure:"keepalive,omitempty"`
// MaxRecvMsgSizeMiB sets the maximum size (in MiB) of messages accepted by the server.
MaxRecvMsgSizeMiB uint64 `mapstructure:"max_recv_msg_size_mib,omitempty"`
// MaxConcurrentStreams sets the limit on the number of concurrent streams to each ServerTransport.
// TODO(nilebox): This setting affecting HTTP/2 streams need to be tested
MaxConcurrentStreams uint32 `mapstructure:"max_concurrent_streams,omitempty"`
}

These should be extracted into a common gRPC Server Setting to reduce duplicate logic and have it exposed for other Server connections.

Describe the solution you'd like
A clear and concise description of what you want to happen.
Have a struct similar to GRPCSettings

but for Server.

This would receiver the existing GRPCSettings to be renamed to GRPCClientSettings.

Additional context
This is just a cleanup.

@ccaraman ccaraman added enhancement New feature or request and removed feature request labels May 22, 2020
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
…y#1014)

Bumps [boto3](https://github.com/boto/boto3) from 1.20.20 to 1.20.21.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.20.20...1.20.21)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant