@@ -36,6 +36,7 @@ import (
36
36
"go.opentelemetry.io/collector/config/configopaque"
37
37
"go.opentelemetry.io/collector/config/configoptional"
38
38
"go.opentelemetry.io/collector/config/configtls"
39
+ "go.opentelemetry.io/collector/confmap"
39
40
"go.opentelemetry.io/collector/extension/extensionauth"
40
41
)
41
42
@@ -65,6 +66,15 @@ func BalancerName() string {
65
66
return "round_robin"
66
67
}
67
68
69
+ var _ confmap.Unmarshaler = (* Headers )(nil )
70
+
71
+ type Headers map [string ]configopaque.String
72
+
73
+ // Unmarshal implements confmap.Unmarshaler.
74
+ func (h * Headers ) Unmarshal (conf * confmap.Conf ) error {
75
+ panic ("I got called" )
76
+ }
77
+
68
78
// ClientConfig defines common settings for a gRPC client configuration.
69
79
type ClientConfig struct {
70
80
// The target to which the exporter is going to send traces or metrics,
@@ -95,7 +105,7 @@ type ClientConfig struct {
95
105
WaitForReady bool `mapstructure:"wait_for_ready,omitempty"`
96
106
97
107
// The headers associated with gRPC requests.
98
- Headers map [ string ]configopaque. String `mapstructure:"headers,omitempty"`
108
+ Headers Headers `mapstructure:"headers,omitempty"`
99
109
100
110
// Sets the balancer in grpclb_policy to discover the servers. Default is pick_first.
101
111
// https://github.com/grpc/grpc-go/blob/master/examples/features/load_balancing/README.md
0 commit comments