Documentation ¶
Index ¶
- Constants
- Variables
- func AllSamplingStorageTypes() []string
- type Factory
- func (f *Factory) AddFlags(flagSet *flag.FlagSet)
- func (f *Factory) AddPipelineFlags(flagSet *flag.FlagSet)
- func (f *Factory) Close() error
- func (f *Factory) CreateArchiveSpanReader() (spanstore.Reader, error)
- func (f *Factory) CreateArchiveSpanWriter() (spanstore.Writer, error)
- func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error)
- func (f *Factory) CreateSamplingStoreFactory() (storage.SamplingStoreFactory, error)
- func (f *Factory) CreateSpanReader() (spanstore.Reader, error)
- func (f *Factory) CreateSpanWriter() (spanstore.Writer, error)
- func (f *Factory) InitFromViper(v *viper.Viper, logger *zap.Logger)
- func (f *Factory) Initialize(metricsFactory metrics.Factory, logger *zap.Logger) error
- type FactoryConfig
Constants ¶
const ( // SpanStorageTypeEnvVar is the name of the env var that defines the type of backend used for span storage. SpanStorageTypeEnvVar = "SPAN_STORAGE_TYPE" // DependencyStorageTypeEnvVar is the name of the env var that defines the type of backend used for dependencies storage. DependencyStorageTypeEnvVar = "DEPENDENCY_STORAGE_TYPE" // SamplingStorageTypeEnvVar is the name of the env var that defines the type of backend used for sampling data storage when using adaptive sampling. SamplingStorageTypeEnvVar = "SAMPLING_STORAGE_TYPE" )
Variables ¶
var AllStorageTypes = []string{
cassandraStorageType,
opensearchStorageType,
elasticsearchStorageType,
memoryStorageType,
kafkaStorageType,
badgerStorageType,
blackholeStorageType,
grpcPluginStorageType,
}
AllStorageTypes defines all available storage backends
Functions ¶
func AllSamplingStorageTypes ¶ added in v1.35.0
func AllSamplingStorageTypes() []string
AllSamplingStorageTypes returns all storage backends that implement adaptive sampling
Types ¶
type Factory ¶
type Factory struct { FactoryConfig // contains filtered or unexported fields }
Factory implements storage.Factory interface as a meta-factory for storage components.
func NewFactory ¶
func NewFactory(config FactoryConfig) (*Factory, error)
NewFactory creates the meta-factory.
func (*Factory) AddPipelineFlags ¶ added in v1.22.0
AddPipelineFlags adds all the standard flags as well as the downsampling flags. This is intended to be used in Jaeger pipeline services such as the collector or ingester.
func (*Factory) CreateArchiveSpanReader ¶
CreateArchiveSpanReader implements storage.ArchiveFactory
func (*Factory) CreateArchiveSpanWriter ¶
CreateArchiveSpanWriter implements storage.ArchiveFactory
func (*Factory) CreateDependencyReader ¶
func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error)
CreateDependencyReader implements storage.Factory
func (*Factory) CreateSamplingStoreFactory ¶ added in v1.27.0
func (f *Factory) CreateSamplingStoreFactory() (storage.SamplingStoreFactory, error)
CreateSamplingStoreFactory creates a distributedlock.Lock and samplingstore.Store for use with adaptive sampling
func (*Factory) CreateSpanReader ¶
CreateSpanReader implements storage.Factory.
func (*Factory) CreateSpanWriter ¶
CreateSpanWriter implements storage.Factory.
func (*Factory) InitFromViper ¶
InitFromViper implements plugin.Configurable
type FactoryConfig ¶
type FactoryConfig struct { SpanWriterTypes []string SpanReaderType string SamplingStorageType string DependenciesStorageType string DownsamplingRatio float64 DownsamplingHashSalt string }
FactoryConfig tells the Factory which types of backends it needs to create for different storage types.
func FactoryConfigFromEnvAndCLI ¶
func FactoryConfigFromEnvAndCLI(args []string, log io.Writer) FactoryConfig
FactoryConfigFromEnvAndCLI reads the desired types of storage backends from SPAN_STORAGE_TYPE and DEPENDENCY_STORAGE_TYPE environment variables. Allowed values: * `cassandra` - built-in * `opensearch` - built-in * `elasticsearch` - built-in * `memory` - built-in * `kafka` - built-in * `blackhole` - built-in * `plugin` - loads a dynamic plugin that implements storage.Factory interface (not supported at the moment)
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.