Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace grpc-plugin storage type name with just grpc #5442

Merged
merged 2 commits into from
May 12, 2024
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
4 changes: 2 additions & 2 deletions crossdock/jaeger-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
- "14250"
- "9411:9411"
environment:
- SPAN_STORAGE_TYPE=grpc-plugin
- SPAN_STORAGE_TYPE=grpc
- LOG_LEVEL=debug
restart: on-failure
depends_on:
Expand All @@ -37,7 +37,7 @@ services:
- "16686:16686"
- "16687"
environment:
- SPAN_STORAGE_TYPE=grpc-plugin
- SPAN_STORAGE_TYPE=grpc
restart: on-failure
depends_on:
- jaeger-remote-storage
Expand Down
4 changes: 2 additions & 2 deletions docker-compose/kafka/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ services:
- "--grpc-storage.server=jaeger-remote-storage:17271"
- "--log-level=debug"
environment:
- SPAN_STORAGE_TYPE=grpc-plugin
- SPAN_STORAGE_TYPE=grpc
- KAFKA_CONSUMER_BROKERS=kafka:9092
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:14270/ || exit 1"]
Expand Down Expand Up @@ -117,7 +117,7 @@ services:
- "--grpc-storage.server=jaeger-remote-storage:17271"
- "--log-level=debug"
environment:
- SPAN_STORAGE_TYPE=grpc-plugin
- SPAN_STORAGE_TYPE=grpc
- JAEGER_AGENT_HOST=jaeger-agent
ports:
- "16686:16686"
Expand Down
7 changes: 4 additions & 3 deletions plugin/storage/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const (
elasticsearchStorageType = "elasticsearch"
memoryStorageType = "memory"
kafkaStorageType = "kafka"
grpcPluginStorageType = "grpc-plugin"
grpcStorageType = "grpc"
grpcPluginDeprecated = "grpc-plugin"
badgerStorageType = "badger"
blackholeStorageType = "blackhole"

Expand All @@ -67,7 +68,7 @@ var AllStorageTypes = []string{
kafkaStorageType,
badgerStorageType,
blackholeStorageType,
grpcPluginStorageType,
grpcStorageType,
}

// AllSamplingStorageTypes returns all storage backends that implement adaptive sampling
Expand Down Expand Up @@ -135,7 +136,7 @@ func (f *Factory) getFactoryOfType(factoryType string) (storage.Factory, error)
return kafka.NewFactory(), nil
case badgerStorageType:
return badger.NewFactory(), nil
case grpcPluginStorageType:
case grpcStorageType:
return grpc.NewFactory(), nil
case blackholeStorageType:
return blackhole.NewFactory(), nil
Expand Down
9 changes: 8 additions & 1 deletion plugin/storage/factory_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
// * `memory` - built-in
// * `kafka` - built-in
// * `blackhole` - built-in
// * `plugin` - loads a dynamic plugin that implements storage.Factory interface (not supported at the moment)
// * `grpc` - build-in
//
// For backwards compatibility it also parses the args looking for deprecated --span-storage.type flag.
// If found, it writes a deprecation warning to the log.
Expand All @@ -66,6 +66,13 @@
if spanStorageType == "" {
spanStorageType = cassandraStorageType
}
if spanStorageType == grpcPluginDeprecated {
fmt.Fprintf(log,
"WARNING: `%s` storage type is deprecated and will be remove from v1.60. Use `%s`.\n\n",
grpcPluginDeprecated, grpcStorageType,
)
spanStorageType = grpcStorageType

Check warning on line 74 in plugin/storage/factory_config.go

View check run for this annotation

Codecov / codecov/patch

plugin/storage/factory_config.go#L70-L74

Added lines #L70 - L74 were not covered by tests
}
spanWriterTypes := strings.Split(spanStorageType, ",")
if len(spanWriterTypes) > 1 {
fmt.Fprintf(log,
Expand Down
4 changes: 2 additions & 2 deletions plugin/storage/grpc/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger)

services, err := f.builder.Build(logger, f.tracerProvider)
if err != nil {
return fmt.Errorf("grpc-plugin builder failed to create a store: %w", err)
return fmt.Errorf("grpc storage builder failed to create a store: %w", err)
}

f.store = services.Store
f.archiveStore = services.ArchiveStore
f.capabilities = services.Capabilities
f.streamingSpanWriter = services.StreamingSpanWriter
logger.Info("External plugin storage configuration", zap.Any("configuration", f.options.Configuration))
logger.Info("Remote storage configuration", zap.Any("configuration", f.options.Configuration))
return nil
}

Expand Down
8 changes: 4 additions & 4 deletions scripts/generate-help-output.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function gen {
set -ex

gen agent nostorage
gen collector cassandra elasticsearch memory kafka badger grpc-plugin
gen query cassandra elasticsearch memory badger grpc-plugin
gen ingester cassandra elasticsearch memory badger grpc-plugin
gen all-in-one cassandra elasticsearch memory badger grpc-plugin
gen collector cassandra elasticsearch memory kafka badger grpc
gen query cassandra elasticsearch memory badger grpc
gen ingester cassandra elasticsearch memory badger grpc
gen all-in-one cassandra elasticsearch memory badger grpc
Loading