Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .chloggen/configgrpc-remove-deprecated-items.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: configgrpc

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated `GRPCClientSettings`, `GRPCServerSettings`, and `ServerConfig.ToListenerContext`.

# One or more tracking issues or pull requests related to the change
issues: [9616]

# (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:

# 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.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
16 changes: 0 additions & 16 deletions config/configgrpc/configgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"crypto/tls"
"errors"
"fmt"
"net"
"strings"
"time"

Expand Down Expand Up @@ -47,10 +46,6 @@ type KeepaliveClientConfig struct {
PermitWithoutStream bool `mapstructure:"permit_without_stream"`
}

// GRPCClientSettings defines common settings for a gRPC client configuration.
// Deprecated: [v0.94.0] Use ClientConfig instead
type GRPCClientSettings = ClientConfig

// ClientConfig defines common settings for a gRPC client configuration.
type ClientConfig struct {
// The target to which the exporter is going to send traces or metrics,
Expand Down Expand Up @@ -120,10 +115,6 @@ type KeepaliveEnforcementPolicy struct {
PermitWithoutStream bool `mapstructure:"permit_without_stream"`
}

// GRPCServerSettings defines common settings for a gRPC server configuration.
// Deprecated: [v0.94.0] Use ServerConfig instead
type GRPCServerSettings = ServerConfig

// ServerConfig defines common settings for a gRPC server configuration.
type ServerConfig struct {
// Server net.Addr config. For transport only "tcp" and "unix" are valid options.
Expand Down Expand Up @@ -160,7 +151,6 @@ type ServerConfig struct {
}

// SanitizedEndpoint strips the prefix of either http:// or https:// from configgrpc.ClientConfig.Endpoint.
// Deprecated: [v0.95.0] Trim the prefix from configgrpc.ClientConfig.Endpoint directly.
func (gcs *ClientConfig) SanitizedEndpoint() string {
switch {
case gcs.isSchemeHTTP():
Expand Down Expand Up @@ -277,12 +267,6 @@ func validateBalancerName(balancerName string) bool {
return balancer.Get(balancerName) != nil
}

// ToListenerContext returns the net.Listener constructed from the settings.
// Deprecated: [v0.95.0] Call Listen directly on the NetAddr field.
func (gss *ServerConfig) ToListenerContext(ctx context.Context) (net.Listener, error) {
return gss.NetAddr.Listen(ctx)
}

func (gss *ServerConfig) ToServer(host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.ServerOption) (*grpc.Server, error) {
opts, err := gss.toServerOption(host, settings)
if err != nil {
Expand Down
8 changes: 1 addition & 7 deletions config/configgrpc/configgrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,14 +493,8 @@ func TestGRPCServerSettings_ToListener_Error(t *testing.T) {
Endpoint: "127.0.0.1:1234567",
Transport: "tcp",
},
TLSSetting: &configtls.TLSServerSetting{
TLSSetting: configtls.TLSSetting{
CertFile: "/doesnt/exist",
},
},
Keepalive: nil,
}
_, err := settings.ToListenerContext(context.Background())
_, err := settings.NetAddr.Listen(context.Background())
assert.Error(t, err)
}

Expand Down