jaegerstorage

package
v1.59.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

README

jaeger_storage

This module implements an extension that allows to configure different storage backends that implement Jaeger's V1 storage APIs. The usual OpenTelemetry Collector's pipeline of receiver-processor-exporter does not require this because each exporter can be supporting just one storage backend, and many of then can be wired up via the pipeline. But in order to run jaeger-query service, which is not a part of the pipeline, we need the ability to access a shared storage backend implementations, and this extension serves as such shared container.

Configuration

The extension can declare multiple storage backend implementations, separating them by storage type first, and then by user-assigned names. Here's an example that may lets query-service extension use Cassandra as the main backend, but memory storage as Dependencies store:

jaeger_storage:
  memory:
    memstore:
      max_traces: 100000
  cassandra:
    cassandra_primary:
      servers: [...]
      namespace: jaeger
    cassandra_archive:
      servers: [...]
      namespace: jaeger_archive

jaeger_query:
    trace_storage: cassandra_primary
    trace_archive: cassandra_archive
    dependencies: memstore
    metrics_store: prometheus_store

NB: this is work in progress, only memory section is currently supported.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ID = component.NewID(componentType)

ID is the identifier of this extension.

Functions

func GetStorageFactory

func GetStorageFactory(name string, host component.Host) (storage.Factory, error)

GetStorageFactory locates the extension in Host and retrieves a storage factory from it with the given name.

func GetStorageFactoryV2 added in v1.59.0

func GetStorageFactoryV2(name string, host component.Host) (spanstore.Factory, error)

func NewFactory

func NewFactory() extension.Factory

Types

type Backend added in v1.59.0

type Backend struct {
	Memory        *memory.Configuration   `mapstructure:"memory"`
	Badger        *badger.NamespaceConfig `mapstructure:"badger"`
	GRPC          *grpc.ConfigV2          `mapstructure:"grpc"`
	Cassandra     *cassandra.Options      `mapstructure:"cassandra"`
	Elasticsearch *esCfg.Configuration    `mapstructure:"elasticsearch"`
	Opensearch    *esCfg.Configuration    `mapstructure:"opensearch"`
}

func (*Backend) Unmarshal added in v1.59.0

func (cfg *Backend) Unmarshal(conf *confmap.Conf) error

Unmarshal implements confmap.Unmarshaler. This allows us to provide defaults for different configs. It cannot be done in createDefaultConfig() because at that time we don't know which backends the user wants to use.

type Config

type Config struct {
	Backends map[string]Backend `mapstructure:"backends"`
}

Config contains configuration(s) for jaeger trace storage. Keys in the map are storage names that can be used to refer to them from other components, e.g. from jaeger_storage_exporter or jaeger_query. We tried to alias this type directly to a map, but conf did not populated it correctly. Note also that the Backend struct has a custom unmarshaler.

func (*Config) Validate added in v1.54.0

func (cfg *Config) Validate() error

type Extension added in v1.55.0

type Extension interface {
	extension.Extension
	Factory(name string) (storage.Factory, bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL