Skip to content

Commit 53bed0c

Browse files
authored
Merge branch 'main' into tag-filter
2 parents 9fbadc1 + b728d61 commit 53bed0c

File tree

114 files changed

+2181
-7978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2181
-7978
lines changed

.github/workflows/ci-unit-tests-go-tip.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@ jobs:
2626

2727
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2828

29-
- name: Set up stable Go for tools
30-
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
31-
with:
32-
go-version: 1.25.x
33-
34-
- name: Install test deps
35-
# even though the same target runs from test-ci, running it separately makes for cleaner log in GH workflow
36-
run: make install-test-tools
37-
3829
- name: Install Go Tip
3930
uses: ./.github/actions/setup-go-tip
4031
with:
@@ -48,5 +39,4 @@ jobs:
4839
- name: Run unit tests
4940
run: make test-ci
5041

51-
- name: Lint
52-
run: echo skip linting on Go tip
42+

.mockery.yaml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ filename: mocks.go
66
template-data:
77
boilerplate-file: .mockery.header.txt
88
packages:
9-
github.com/jaegertracing/jaeger/cmd/ingester/app/consumer:
10-
interfaces:
11-
Message: {}
12-
github.com/jaegertracing/jaeger/cmd/ingester/app/processor:
13-
interfaces:
14-
SpanProcessor: {}
159
github.com/jaegertracing/jaeger/crossdock/services:
1610
interfaces:
1711
CollectorService: {}
@@ -39,9 +33,6 @@ packages:
3933
github.com/jaegertracing/jaeger/internal/storage/elasticsearch/client:
4034
config:
4135
all: true
42-
github.com/jaegertracing/jaeger/internal/storage/kafka/consumer:
43-
interfaces:
44-
Consumer: {}
4536
github.com/jaegertracing/jaeger/internal/storage/v1:
4637
config:
4738
all: true
@@ -67,10 +58,6 @@ packages:
6758
github.com/jaegertracing/jaeger/internal/storage/v1/grpc/shared:
6859
interfaces:
6960
PluginCapabilities: {}
70-
github.com/jaegertracing/jaeger/internal/storage/v1/kafka:
71-
interfaces:
72-
Marshaller: {}
73-
Unmarshaller: {}
7461
github.com/jaegertracing/jaeger/internal/storage/v2/api/depstore:
7562
config:
7663
all: true

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ALL_SRC = $(shell find . -name '*.go' \
4040
# All .sh or .py or Makefile or .mk files that should be auto-formatted and linted.
4141
SCRIPTS_SRC = $(shell find . \( -name '*.sh' -o -name '*.py' -o -name '*.mk' -o -name 'Makefile*' -o -name 'Dockerfile*' \) \
4242
-not -path './.git/*' \
43+
-not -path './vendor/*' \
4344
-not -path './idl/*' \
4445
-not -path './jaeger-ui/*' \
4546
-type f | \

cmd/internal/env/command.go

Lines changed: 0 additions & 75 deletions
This file was deleted.

cmd/internal/env/command_test.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

cmd/internal/flags/flags.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ import (
1616
)
1717

1818
const (
19-
spanStorageType = "span-storage.type" // deprecated
20-
logLevel = "log-level"
21-
logEncoding = "log-encoding" // json or console
22-
configFile = "config-file"
19+
logLevel = "log-level"
20+
logEncoding = "log-encoding" // json or console
21+
configFile = "config-file"
2322
)
2423

2524
// AddConfigFileFlag adds flags for ExternalConfFlags
@@ -92,12 +91,6 @@ type logging struct {
9291
Encoding string
9392
}
9493

95-
// AddFlags adds flags for SharedFlags
96-
func AddFlags(flagSet *flag.FlagSet) {
97-
flagSet.String(spanStorageType, "", "(deprecated) please use SPAN_STORAGE_TYPE environment variable. Run this binary with the 'env' command for help.")
98-
AddLoggingFlags(flagSet)
99-
}
100-
10194
// AddLoggingFlag adds logging flag for SharedFlags
10295
func AddLoggingFlags(flagSet *flag.FlagSet) {
10396
flagSet.String(logLevel, "info", "Minimal allowed log Level. For more levels see https://github.com/uber-go/zap")

cmd/internal/flags/service.go

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ type Service struct {
2828
// AdminPort is the HTTP port number for admin server.
2929
AdminPort int
3030

31-
// NoStorage indicates that storage-type CLI flag is not applicable
32-
NoStorage bool
33-
3431
// Admin is the admin server that hosts the health check and metrics endpoints.
3532
Admin *AdminServer
3633

@@ -43,29 +40,6 @@ type Service struct {
4340
signalsChannel chan os.Signal
4441
}
4542

46-
func PrintV1EOL() {
47-
fmt.Fprintln(os.Stderr, (`
48-
*******************************************************************************
49-
50-
🛑 WARNING: End-of-life Notice for Jaeger v1
51-
52-
You are currently running a v1 version of Jaeger, which is deprecated and will
53-
reach end-of-life on December 31st, 2025. This means there will be no further
54-
development, bug fixes, or security patches for v1 after this date.
55-
56-
We strongly recommend migrating to Jaeger v2 for continued support and access
57-
to new features.
58-
59-
For detailed migration instructions, please refer to the official Jaeger
60-
documentation: https://www.jaegertracing.io/docs/latest/migration/
61-
62-
Tracking issue: https://github.com/jaegertracing/jaeger/issues/6321
63-
64-
🛑 WARNING: End-of-life Notice for Jaeger v1
65-
66-
*******************************************************************************`))
67-
}
68-
6943
// NewService creates a new Service.
7044
func NewService(adminPort int) *Service {
7145
signalsChannel := make(chan os.Signal, 1)
@@ -80,11 +54,7 @@ func NewService(adminPort int) *Service {
8054
// AddFlags registers CLI flags.
8155
func (s *Service) AddFlags(flagSet *flag.FlagSet) {
8256
AddConfigFileFlag(flagSet)
83-
if s.NoStorage {
84-
AddLoggingFlags(flagSet)
85-
} else {
86-
AddFlags(flagSet)
87-
}
57+
AddLoggingFlags(flagSet)
8858
metricsbuilder.AddFlags(flagSet)
8959
s.Admin.AddFlags(flagSet)
9060
featuregate.GlobalRegistry().RegisterFlags(flagSet)

cmd/internal/flags/service_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ import (
2121
func TestAddFlags(*testing.T) {
2222
s := NewService(0)
2323
s.AddFlags(new(flag.FlagSet))
24-
25-
s.NoStorage = true
26-
s.AddFlags(new(flag.FlagSet))
2724
}
2825

2926
func TestStartErrors(t *testing.T) {
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
// Copyright (c) 2025 The Jaeger Authors.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
package storageconfig
5+
6+
import (
7+
"errors"
8+
"fmt"
9+
"reflect"
10+
"time"
11+
12+
"go.opentelemetry.io/collector/confmap"
13+
14+
"github.com/jaegertracing/jaeger/internal/config/promcfg"
15+
cascfg "github.com/jaegertracing/jaeger/internal/storage/cassandra/config"
16+
escfg "github.com/jaegertracing/jaeger/internal/storage/elasticsearch/config"
17+
"github.com/jaegertracing/jaeger/internal/storage/metricstore/prometheus"
18+
"github.com/jaegertracing/jaeger/internal/storage/v1/badger"
19+
"github.com/jaegertracing/jaeger/internal/storage/v1/cassandra"
20+
es "github.com/jaegertracing/jaeger/internal/storage/v1/elasticsearch"
21+
"github.com/jaegertracing/jaeger/internal/storage/v2/clickhouse"
22+
"github.com/jaegertracing/jaeger/internal/storage/v2/grpc"
23+
"github.com/jaegertracing/jaeger/internal/storage/v2/memory"
24+
)
25+
26+
var (
27+
_ confmap.Unmarshaler = (*TraceBackend)(nil)
28+
_ confmap.Unmarshaler = (*MetricBackend)(nil)
29+
)
30+
31+
// Config contains configuration(s) for Jaeger trace storage.
32+
type Config struct {
33+
TraceBackends map[string]TraceBackend `mapstructure:"backends"`
34+
MetricBackends map[string]MetricBackend `mapstructure:"metric_backends"`
35+
}
36+
37+
// TraceBackend contains configuration for a single trace storage backend.
38+
type TraceBackend struct {
39+
Memory *memory.Configuration `mapstructure:"memory"`
40+
Badger *badger.Config `mapstructure:"badger"`
41+
GRPC *grpc.Config `mapstructure:"grpc"`
42+
Cassandra *cassandra.Options `mapstructure:"cassandra"`
43+
Elasticsearch *escfg.Configuration `mapstructure:"elasticsearch"`
44+
Opensearch *escfg.Configuration `mapstructure:"opensearch"`
45+
ClickHouse *clickhouse.Configuration `mapstructure:"clickhouse"`
46+
}
47+
48+
// MetricBackend contains configuration for a single metric storage backend.
49+
type MetricBackend struct {
50+
Prometheus *PrometheusConfiguration `mapstructure:"prometheus"`
51+
Elasticsearch *escfg.Configuration `mapstructure:"elasticsearch"`
52+
Opensearch *escfg.Configuration `mapstructure:"opensearch"`
53+
}
54+
55+
type PrometheusConfiguration struct {
56+
Configuration promcfg.Configuration `mapstructure:",squash"`
57+
Authentication escfg.Authentication `mapstructure:"auth"`
58+
}
59+
60+
// Unmarshal implements confmap.Unmarshaler. This allows us to provide
61+
// defaults for different configs.
62+
func (cfg *TraceBackend) Unmarshal(conf *confmap.Conf) error {
63+
// apply defaults
64+
if conf.IsSet("memory") {
65+
cfg.Memory = &memory.Configuration{
66+
MaxTraces: 1_000_000,
67+
}
68+
}
69+
if conf.IsSet("badger") {
70+
v := badger.DefaultConfig()
71+
cfg.Badger = v
72+
}
73+
if conf.IsSet("grpc") {
74+
v := grpc.DefaultConfig()
75+
cfg.GRPC = &v
76+
}
77+
if conf.IsSet("cassandra") {
78+
cfg.Cassandra = &cassandra.Options{
79+
NamespaceConfig: cassandra.NamespaceConfig{
80+
Configuration: cascfg.DefaultConfiguration(),
81+
Enabled: true,
82+
},
83+
SpanStoreWriteCacheTTL: 12 * time.Hour,
84+
Index: cassandra.IndexConfig{
85+
Tags: true,
86+
ProcessTags: true,
87+
Logs: true,
88+
},
89+
}
90+
}
91+
if conf.IsSet("elasticsearch") {
92+
v := es.DefaultConfig()
93+
cfg.Elasticsearch = &v
94+
}
95+
if conf.IsSet("opensearch") {
96+
v := es.DefaultConfig()
97+
cfg.Opensearch = &v
98+
}
99+
return conf.Unmarshal(cfg)
100+
}
101+
102+
// Unmarshal implements confmap.Unmarshaler for MetricBackend.
103+
func (cfg *MetricBackend) Unmarshal(conf *confmap.Conf) error {
104+
// apply defaults
105+
if conf.IsSet("prometheus") {
106+
v := prometheus.DefaultConfig()
107+
cfg.Prometheus = &PrometheusConfiguration{
108+
Configuration: v,
109+
}
110+
}
111+
if conf.IsSet("elasticsearch") {
112+
v := es.DefaultConfig()
113+
cfg.Elasticsearch = &v
114+
}
115+
if conf.IsSet("opensearch") {
116+
v := es.DefaultConfig()
117+
cfg.Opensearch = &v
118+
}
119+
return conf.Unmarshal(cfg)
120+
}
121+
122+
// Validate validates the storage configuration.
123+
func (c *Config) Validate() error {
124+
if len(c.TraceBackends) == 0 {
125+
return errors.New("at least one storage backend is required")
126+
}
127+
for name, b := range c.TraceBackends {
128+
empty := TraceBackend{}
129+
if reflect.DeepEqual(b, empty) {
130+
return fmt.Errorf("empty backend configuration for storage '%s'", name)
131+
}
132+
}
133+
return nil
134+
}

0 commit comments

Comments
 (0)