Skip to content

Commit

Permalink
fix names and updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
taniyourstruly committed Jun 13, 2024
1 parent de43922 commit a8ed955
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .chloggen/load-balancer-round-robin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ note: Update the default load balancer strategy to round_robin
# One or more tracking issues or pull requests related to the change
issues: [10319]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: To restore the behavior that was previously the default, set `balancer_name` to `pick_first`.

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
Expand Down
4 changes: 2 additions & 2 deletions config/configgrpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ configuration parameters are also defined under `tls` like server
configuration. For more information, see [configtls
README](../configtls/README.md).

- [`balancer_name`](https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md)
- `compression` Compression type to use among `gzip`, `snappy`, `zstd`, and `none`.
- [`balancer_name`](https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md): Default before v0.103.0 is `pick_first`, default for v0.103.0 is `round_robin`. See [issue](https://github.com/open-telemetry/opentelemetry-collector/issues/10298). To restore the previous behavior, set `balancer_name` to `pick_first`.
- `compression`: Compression type to use among `gzip`, `snappy`, `zstd`, and `none`.
- `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md)
- [`tls`](../configtls/README.md)
- `headers`: name/value pairs added to the request
Expand Down
6 changes: 3 additions & 3 deletions config/configgrpc/configgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func NewDefaultKeepaliveClientConfig() *KeepaliveClientConfig {
}
}

// NewDefaultBalancernameClientConfig returns a new instance of BalancernameClientConfig with default values.
func NewDefaultBalancernameClientConfig() string {
// BalancerName returns a string with default load balancer value
func BalancerName() string {
return "round_robin"
}

Expand Down Expand Up @@ -110,7 +110,7 @@ func NewDefaultClientConfig() *ClientConfig {
TLSSetting: configtls.NewDefaultClientConfig(),
Keepalive: NewDefaultKeepaliveClientConfig(),
Auth: configauth.NewDefaultAuthentication(),
BalancerName: NewDefaultBalancernameClientConfig(),
BalancerName: BalancerName(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion config/configgrpc/configgrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestNewDefaultClientConfig(t *testing.T) {
TLSSetting: configtls.NewDefaultClientConfig(),
Keepalive: NewDefaultKeepaliveClientConfig(),
Auth: configauth.NewDefaultAuthentication(),
BalancerName: NewDefaultBalancernameClientConfig(),
BalancerName: BalancerName(),
}

result := NewDefaultClientConfig()
Expand Down

0 comments on commit a8ed955

Please sign in to comment.