Skip to content

Commit ec7cee0

Browse files
committed
remove tracing oltp endpoint flag
Signed-off-by: Ben Ye <[email protected]>
1 parent a193896 commit ec7cee0

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

pkg/tracing/tracing.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ type Config struct {
3838
}
3939

4040
type Otel struct {
41-
OltpEndpoint string `yaml:"oltp_endpoint" json:"oltp_endpoint" doc:"hidden"`
4241
OtlpEndpoint string `yaml:"otlp_endpoint" json:"otlp_endpoint"`
4342
ExporterType string `yaml:"exporter_type" json:"exporter_type"`
4443
SampleRatio float64 `yaml:"sample_ratio" json:"sample_ratio"`
@@ -53,7 +52,6 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) {
5352
p := "tracing"
5453
f.StringVar(&c.Type, p+".type", JaegerType, "Tracing type. OTEL and JAEGER are currently supported. For jaeger `JAEGER_AGENT_HOST` environment variable should also be set. See: https://cortexmetrics.io/docs/guides/tracing .")
5554
f.Float64Var(&c.Otel.SampleRatio, p+".otel.sample-ratio", 0.001, "Fraction of traces to be sampled. Fractions >= 1 means sampling if off and everything is traced.")
56-
f.StringVar(&c.Otel.OltpEndpoint, p+".otel.oltp-endpoint", "", "DEPRECATED: use otel.otlp-endpoint instead.")
5755
f.StringVar(&c.Otel.OtlpEndpoint, p+".otel.otlp-endpoint", "", "otl collector endpoint that the driver will use to send spans.")
5856
f.StringVar(&c.Otel.ExporterType, p+".otel.exporter-type", "", "enhance/modify traces/propagators for specific exporter. If empty, OTEL defaults will apply. Supported values are: `awsxray.`")
5957
f.BoolVar(&c.Otel.TLSEnabled, p+".otel.tls-enabled", c.Otel.TLSEnabled, "Enable TLS in the GRPC client. This flag needs to be enabled when any other TLS flag is set. If set to false, insecure connection to gRPC server will be used.")
@@ -64,12 +62,9 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) {
6462
func (c *Config) Validate() error {
6563
switch strings.ToLower(c.Type) {
6664
case OtelType:
67-
if (c.Otel.OtlpEndpoint == "") && (c.Otel.OltpEndpoint == "") {
65+
if c.Otel.OtlpEndpoint == "" {
6866
return errors.New("otlp-endpoint must be defined when using otel exporter")
6967
}
70-
if len(c.Otel.OltpEndpoint) > 0 {
71-
level.Warn(util_log.Logger).Log("msg", "DEPRECATED: otel.oltp-endpoint is deprecated. Use otel.otlp-endpoint instead.")
72-
}
7368
}
7469

7570
return nil
@@ -90,15 +85,7 @@ func SetupTracing(ctx context.Context, name string, c Config) (func(context.Cont
9085
case OtelType:
9186
util_log.Logger.Log("msg", "creating otel exporter")
9287

93-
if (len(c.Otel.OtlpEndpoint) > 0) && (len(c.Otel.OltpEndpoint) > 0) {
94-
level.Warn(util_log.Logger).Log("msg", "DEPRECATED: otel.otlp and otel.oltp both set, using otel.otlp because otel.oltp is deprecated")
95-
}
96-
9788
endpoint := c.Otel.OtlpEndpoint
98-
if (c.Otel.OtlpEndpoint == "") && (len(c.Otel.OltpEndpoint) > 0) {
99-
level.Warn(util_log.Logger).Log("msg", "DEPRECATED: otel.oltp is deprecated use otel.otlp")
100-
endpoint = c.Otel.OltpEndpoint
101-
}
10289
options := []otlptracegrpc.Option{
10390
otlptracegrpc.WithEndpoint(endpoint),
10491
}

0 commit comments

Comments
 (0)