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

[jaeger-v2] Add support for Opensearch #5257

Merged
merged 6 commits into from
Mar 21, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 54 additions & 0 deletions cmd/jaeger/config-opensearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
service:
extensions: [jaeger_storage, jaeger_query]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger_storage_exporter]

extensions:
jaeger_query:
trace_storage: os_main
trace_storage_archive: os_archive
ui_config: ./cmd/jaeger/config-ui.json

jaeger_storage:
opensearch:
os_main:
server_urls: https://localhost:9200
log_level: "error"
index_prefix: "jaeger-main"
use_aliases: true
username: "admin"
password: "admin"
tls:
enabled: true
skip_host_verify: true
tags_as_fields:
all: true

os_archive:
server_urls: https://localhost:9200
log_level: "error"
index_prefix: "jaeger-archive"
use_aliases: true
username: "admin"
password: "admin"
tls:
enabled: true
skip_host_verify: true
tags_as_fields:
all: true

receivers:
otlp:
protocols:
grpc:
http:

processors:
batch:

exporters:
jaeger_storage_exporter:
trace_storage: os_main
1 change: 1 addition & 0 deletions cmd/jaeger/internal/extension/jaegerstorage/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Config struct {
Memory map[string]memoryCfg.Configuration `mapstructure:"memory"`
Badger map[string]badgerCfg.NamespaceConfig `mapstructure:"badger"`
GRPC map[string]grpcCfg.Configuration `mapstructure:"grpc"`
Opensearch map[string]esCfg.Configuration `mapstructure:"opensearch"`
Elasticsearch map[string]esCfg.Configuration `mapstructure:"elasticsearch"`
Cassandra map[string]cassandraCfg.Configuration `mapstructure:"cassandra"`
// TODO add other storage types here
Expand Down
7 changes: 7 additions & 0 deletions cmd/jaeger/internal/extension/jaegerstorage/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ func (s *storageExt) Start(ctx context.Context, host component.Host) error {
cfg: s.config.Elasticsearch,
builder: es.NewFactoryWithConfig,
}
osStarter := &starter[esCfg.Configuration, *es.Factory]{
ext: s,
storageKind: "opensearch",
cfg: s.config.Opensearch,
builder: es.NewFactoryWithConfig,
}
cassandraStarter := &starter[cassandraCfg.Configuration, *cassandra.Factory]{
ext: s,
storageKind: "cassandra",
Expand All @@ -142,6 +148,7 @@ func (s *storageExt) Start(ctx context.Context, host component.Host) error {
badgerStarter.build,
grpcStarter.build,
esStarter.build,
osStarter.build,
cassandraStarter.build,
// TODO add support for other backends
}
Expand Down