Skip to content

Commit 6509fb2

Browse files
authored
Remove tracing oltp endpoint flag (#6158)
1 parent a193896 commit 6509fb2

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* [CHANGE] Ingesters: Enable 'snappy-block' compression on ingester clients by default. #6148
1212
* [CHANGE] Ruler: Scheduling `ruler.evaluation-delay-duration` to be deprecated. Use the highest value between `ruler.evaluation-delay-duration` and `ruler.query-offset` #6149
1313
* [CHANGE] Querier: Remove `-querier.at-modifier-enabled` flag. #6157
14+
* [CHANGE] Tracing: Remove deprecated `oltp_endpoint` config entirely. #6158
1415
* [FEATURE] Ingester/Distributor: Experimental: Enable native histogram ingestion via `-blocks-storage.tsdb.enable-native-histograms` flag. #5986 #6010 #6020
1516
* [FEATURE] Querier: Enable querying native histogram chunks. #5944 #6031
1617
* [FEATURE] Query Frontend: Support native histogram in query frontend response. #5996 #6043

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)