Skip to content

Commit

Permalink
Added server side gRPC handler
Browse files Browse the repository at this point in the history
Signed-off-by: Alok Kumar Singh <[email protected]>
  • Loading branch information
akstron committed Dec 7, 2024
1 parent c753064 commit 596b5bb
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 72 deletions.
12 changes: 9 additions & 3 deletions cmd/remote-storage/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/jaegertracing/jaeger/plugin/storage/grpc/shared"
"github.com/jaegertracing/jaeger/storage"
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/samplingstore"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand All @@ -36,8 +37,8 @@ type Server struct {
}

// NewServer creates and initializes Server.
func NewServer(options *Options, storageFactory storage.BaseFactory, tm *tenancy.Manager, telset telemetry.Settings) (*Server, error) {
handler, err := createGRPCHandler(storageFactory, telset.Logger)
func NewServer(options *Options, storageFactory storage.BaseFactory, tm *tenancy.Manager, telset telemetry.Settings, samplingStoreFactory storage.SamplingStoreFactory) (*Server, error) {
handler, err := createGRPCHandler(storageFactory, samplingStoreFactory, telset.Logger)
if err != nil {
return nil, err
}
Expand All @@ -54,7 +55,7 @@ func NewServer(options *Options, storageFactory storage.BaseFactory, tm *tenancy
}, nil
}

func createGRPCHandler(f storage.BaseFactory, logger *zap.Logger) (*shared.GRPCHandler, error) {
func createGRPCHandler(f storage.BaseFactory, samplingStoreFactory storage.SamplingStoreFactory, logger *zap.Logger) (*shared.GRPCHandler, error) {
reader, err := f.CreateSpanReader()
if err != nil {
return nil, err
Expand All @@ -67,12 +68,17 @@ func createGRPCHandler(f storage.BaseFactory, logger *zap.Logger) (*shared.GRPCH
if err != nil {
return nil, err
}
samplingStore, err := samplingStoreFactory.CreateSamplingStore(1)
if err != nil {
return nil, err
}

impl := &shared.GRPCHandlerStorageImpl{
SpanReader: func() spanstore.Reader { return reader },
SpanWriter: func() spanstore.Writer { return writer },
DependencyReader: func() dependencystore.Reader { return depReader },
StreamingSpanWriter: func() spanstore.Writer { return nil },
SamplingStore: func() samplingstore.Store { return samplingStore },
}

// borrow code from Query service for archive storage
Expand Down
2 changes: 1 addition & 1 deletion cmd/remote-storage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func main() {
tm := tenancy.NewManager(&opts.Tenancy)
telset := baseTelset // copy
telset.Metrics = metricsFactory
server, err := app.NewServer(opts, storageFactory, tm, telset)
server, err := app.NewServer(opts, storageFactory, tm, telset, nil)
if err != nil {
logger.Fatal("Failed to create server", zap.Error(err))
}
Expand Down
3 changes: 0 additions & 3 deletions plugin/storage/factory_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ func FactoryConfigFromEnvAndCLI(args []string, log io.Writer) FactoryConfig {
depStorageType = spanWriterTypes[0]
}
samplingStorageType := os.Getenv(SamplingStorageTypeEnvVar)
if samplingStorageType == "" {
samplingStorageType = cassandraStorageType
}
// TODO support explicit configuration for readers
return FactoryConfig{
SpanWriterTypes: spanWriterTypes,
Expand Down
72 changes: 8 additions & 64 deletions plugin/storage/grpc/shared/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"errors"
"fmt"
"io"
"strconv"
"time"

"google.golang.org/grpc"
Expand Down Expand Up @@ -278,26 +277,12 @@ func readTrace(stream storage_v1.SpanReaderPlugin_GetTraceClient) (*model.Trace,

func (c *GRPCClient) InsertThroughput(throughputs []*samplingStoreModel.Throughput) error {
ctx := context.Background()
storageV1Throughput := []*storage_v1.Throughput{}
for _, throughput := range throughputs {
probsAsArray := []float64{}
for prob := range throughput.Probabilities {
probInFloat, err := strconv.ParseFloat(prob, 64)
if err != nil {
return err
}
probsAsArray = append(probsAsArray, probInFloat)
}

storageV1Throughput = append(storageV1Throughput, &storage_v1.Throughput{
Service: throughput.Service,
Operation: throughput.Operation,
Count: throughput.Count,
Probabilities: probsAsArray,
})
storageV1Throughput, err := samplingStoreThroughpusToStorageV1Throughputs(throughputs)

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / lint

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 280 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: samplingStoreThroughpusToStorageV1Throughputs
if err != nil {
return err
}

_, err := c.samplingStoreClient.InsertThroughput(ctx, &storage_v1.InsertThroughputRequest{
_, err = c.samplingStoreClient.InsertThroughput(ctx, &storage_v1.InsertThroughputRequest{
Throughput: storageV1Throughput,
})
if err != nil {
Expand All @@ -309,27 +294,14 @@ func (c *GRPCClient) InsertThroughput(throughputs []*samplingStoreModel.Throughp

func (c *GRPCClient) InsertProbabilitiesAndQPS(hostname string, probabilities samplingStoreModel.ServiceOperationProbabilities, qps samplingStoreModel.ServiceOperationQPS) error {
ctx := context.Background()
stringFloatMapToV1StringFloatMap := func(in map[string]float64) *storage_v1.StringFloatMap {
return &storage_v1.StringFloatMap{
StringFloatMap: in,
}
}

convertToV1Map := func(in map[string]map[string]float64) map[string]*storage_v1.StringFloatMap {
res := make(map[string]*storage_v1.StringFloatMap)
for k, v := range in {
res[k] = stringFloatMapToV1StringFloatMap(v)
}
return res
}

_, err := c.samplingStoreClient.InsertProbabilitiesAndQPS(ctx, &storage_v1.InsertProbabilitiesAndQPSRequest{
Hostname: hostname,
Probabilities: &storage_v1.ServiceOperationProbabilities{
ServiceOperationProbabilities: convertToV1Map(probabilities),
ServiceOperationProbabilities: sSFloatMapToStorageV1SSFloatMap(probabilities),

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / lint

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 301 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: sSFloatMapToStorageV1SSFloatMap
},
Qps: &storage_v1.ServiceOperationQPS{
ServiceOperationQPS: convertToV1Map(qps),
ServiceOperationQPS: sSFloatMapToStorageV1SSFloatMap(qps),

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / lint

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 304 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: sSFloatMapToStorageV1SSFloatMap
},
})
if err != nil {
Expand All @@ -349,23 +321,7 @@ func (c *GRPCClient) GetThroughput(start, end time.Time) ([]*samplingStoreModel.
return nil, fmt.Errorf("plugin error: %w", err)
}

resThroughput := []*samplingStoreModel.Throughput{}

for _, throughput := range resp.Throughput {
probsAsSet := make(map[string]struct{})
for _, prob := range throughput.Probabilities {
probsAsSet[strconv.FormatFloat(prob, 'E', -1, 64)] = struct{}{}
}

resThroughput = append(resThroughput, &samplingStoreModel.Throughput{
Service: throughput.Service,
Operation: throughput.Operation,
Count: throughput.Count,
Probabilities: probsAsSet,
})
}

return resThroughput, nil
return storageV1ThroughputsToSamplingStoreThroughputs(resp.Throughput), nil

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / lint

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 324 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: storageV1ThroughputsToSamplingStoreThroughputs
}

func (c *GRPCClient) GetLatestProbabilities() (samplingStoreModel.ServiceOperationProbabilities, error) {
Expand All @@ -375,17 +331,5 @@ func (c *GRPCClient) GetLatestProbabilities() (samplingStoreModel.ServiceOperati
return nil, fmt.Errorf("plugin error: %w", err)
}

v1StringFloatMapToStringFloatMap := func(in *storage_v1.StringFloatMap) map[string]float64 {
return in.StringFloatMap
}

convertToMap := func(in map[string]*storage_v1.StringFloatMap) map[string]map[string]float64 {
res := make(map[string]map[string]float64)
for k, v := range in {
res[k] = v1StringFloatMapToStringFloatMap(v)
}
return res
}

return convertToMap(resp.ServiceOperationProbabilities.ServiceOperationProbabilities), nil
return storageV1SSFloatMapToSSFloatMap(resp.ServiceOperationProbabilities.ServiceOperationProbabilities), nil

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / lint

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 334 in plugin/storage/grpc/shared/grpc_client.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: storageV1SSFloatMapToSSFloatMap
}
48 changes: 48 additions & 0 deletions plugin/storage/grpc/shared/grpc_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
_ "github.com/jaegertracing/jaeger/pkg/gogocodec" // force gogo codec registration
"github.com/jaegertracing/jaeger/proto-gen/storage_v1"
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/samplingstore"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand All @@ -42,6 +43,8 @@ type GRPCHandlerStorageImpl struct {
ArchiveSpanWriter func() spanstore.Writer

StreamingSpanWriter func() spanstore.Writer

SamplingStore func() samplingstore.Store
}

// NewGRPCHandler creates a handler given individual storage implementations.
Expand Down Expand Up @@ -83,6 +86,7 @@ func (s *GRPCHandler) Register(ss *grpc.Server, hs *health.Server) error {
storage_v1.RegisterPluginCapabilitiesServer(ss, s)
storage_v1.RegisterDependenciesReaderPluginServer(ss, s)
storage_v1.RegisterStreamingSpanWriterPluginServer(ss, s)
storage_v1.RegisterSamplingStorePluginServer(ss, s)

hs.SetServingStatus("jaeger.storage.v1.SpanReaderPlugin", grpc_health_v1.HealthCheckResponse_SERVING)
hs.SetServingStatus("jaeger.storage.v1.SpanWriterPlugin", grpc_health_v1.HealthCheckResponse_SERVING)
Expand All @@ -91,6 +95,7 @@ func (s *GRPCHandler) Register(ss *grpc.Server, hs *health.Server) error {
hs.SetServingStatus("jaeger.storage.v1.PluginCapabilities", grpc_health_v1.HealthCheckResponse_SERVING)
hs.SetServingStatus("jaeger.storage.v1.DependenciesReaderPlugin", grpc_health_v1.HealthCheckResponse_SERVING)
hs.SetServingStatus("jaeger.storage.v1.StreamingSpanWriterPlugin", grpc_health_v1.HealthCheckResponse_SERVING)
hs.SetServingStatus("jaeger.storage.v1.SamplingStorePlugin", grpc_health_v1.HealthCheckResponse_SERVING)
grpc_health_v1.RegisterHealthServer(ss, hs)

return nil
Expand Down Expand Up @@ -303,3 +308,46 @@ func (s *GRPCHandler) WriteArchiveSpan(ctx context.Context, r *storage_v1.WriteS
}
return &storage_v1.WriteSpanResponse{}, nil
}

func (s *GRPCHandler) InsertThroughput(_ context.Context, r *storage_v1.InsertThroughputRequest) (*storage_v1.InsertThroughputResponse, error) {
err := s.impl.SamplingStore().InsertThroughput(storageV1ThroughputsToSamplingStoreThroughputs(r.Throughput))

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / lint

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: storageV1ThroughputsToSamplingStoreThroughputs

Check failure on line 313 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: storageV1ThroughputsToSamplingStoreThroughputs
if err != nil {
return nil, err
}
return &storage_v1.InsertThroughputResponse{}, nil
}

func (s *GRPCHandler) InsertProbabilitiesAndQPS(_ context.Context, r *storage_v1.InsertProbabilitiesAndQPSRequest) (*storage_v1.InsertProbabilitiesAndQPSResponse, error) {
err := s.impl.SamplingStore().InsertProbabilitiesAndQPS(r.Hostname, storageV1SSFloatMapToSSFloatMap(r.Probabilities.ServiceOperationProbabilities), storageV1SSFloatMapToSSFloatMap(r.Qps.ServiceOperationQPS))

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / lint

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: storageV1SSFloatMapToSSFloatMap

Check failure on line 321 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: storageV1SSFloatMapToSSFloatMap
if err != nil {
return nil, err
}
return &storage_v1.InsertProbabilitiesAndQPSResponse{}, nil
}

func (s *GRPCHandler) GetThroughput(_ context.Context, r *storage_v1.GetThroughputRequest) (*storage_v1.GetThroughputResponse, error) {
throughput, err := s.impl.SamplingStore().GetThroughput(r.StartTime, r.EndTime)
if err != nil {
return nil, err
}
storageV1Throughput, err := samplingStoreThroughpusToStorageV1Throughputs(throughput)

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: samplingStoreThroughpusToStorageV1Throughputs

Check failure on line 333 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: samplingStoreThroughpusToStorageV1Throughputs
if err != nil {
return nil, err
}

return &storage_v1.GetThroughputResponse{
Throughput: storageV1Throughput,
}, nil
}

func (s *GRPCHandler) GetLatestProbabilities(context.Context, *storage_v1.GetLatestProbabilitiesRequest) (*storage_v1.GetLatestProbabilitiesResponse, error) {
probabilities, err := s.impl.SamplingStore().GetLatestProbabilities()
if err != nil {
return nil, err
}
return &storage_v1.GetLatestProbabilitiesResponse{
ServiceOperationProbabilities: &storage_v1.ServiceOperationProbabilities{
ServiceOperationProbabilities: sSFloatMapToStorageV1SSFloatMap(probabilities),

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v1, all-in-one)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / badger (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / spm (v2, jaeger)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / Kafka Integration Tests v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / docker-images

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / grpc (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-arm64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-arm64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (docker, v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-ppc64le

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-windows-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / crossdock

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-s390x

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-linux-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v1)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / hotrod (k8s, v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / build-binaries-darwin-amd64

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 6.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 1.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / all-in-one (v2)

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 7.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / elasticsearch 8.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / opensearch 2.x v1

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-5.x v1 schema=manual

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / cassandra-4.x v1 schema=manual

undefined: sSFloatMapToStorageV1SSFloatMap

Check failure on line 350 in plugin/storage/grpc/shared/grpc_handler.go

View workflow job for this annotation

GitHub Actions / unit-tests

undefined: sSFloatMapToStorageV1SSFloatMap
},
}, nil
}
5 changes: 4 additions & 1 deletion plugin/storage/integration/remote_memory_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ func StartNewRemoteMemoryStorage(t *testing.T) *RemoteMemoryStorage {
storageFactory, err := storage.NewFactory(storage.FactoryConfigFromEnvAndCLI(os.Args, os.Stderr))
require.NoError(t, err)

samplingStoreFactory, err := storageFactory.CreateSamplingStoreFactory()
require.NoError(t, err)

v, _ := config.Viperize(storageFactory.AddFlags)
storageFactory.InitFromViper(v, logger)
require.NoError(t, storageFactory.Initialize(metrics.NullFactory, logger))
Expand All @@ -51,7 +54,7 @@ func StartNewRemoteMemoryStorage(t *testing.T) *RemoteMemoryStorage {
telset := telemetry.NoopSettings()
telset.Logger = logger
telset.ReportStatus = telemetry.HCAdapter(healthcheck.New())
server, err := app.NewServer(opts, storageFactory, tm, telset)
server, err := app.NewServer(opts, storageFactory, tm, telset, samplingStoreFactory)
require.NoError(t, err)
require.NoError(t, server.Start())

Expand Down

0 comments on commit 596b5bb

Please sign in to comment.