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

[WIP] Add Adaptive Sampling Support for gRPC Remote Storage #6308

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
28 changes: 28 additions & 0 deletions plugin/storage/grpc/proto/storage.proto
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,21 @@ message FindTraceIDsResponse {
];
}

message Throughput {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema should be documented. Wherever you are copying this from, we have comments explaining all types.

string Service = 1;
string Operation = 2;
int64 Count = 3;
string Probabilities = 4;
akstron marked this conversation as resolved.
Show resolved Hide resolved
}

message InsertThroughputRequest {
repeated Throughput throughput = 1;
}

message InsertThroughputResponse {
string status = 1;
}

service SpanWriterPlugin {
// spanstore/Writer
rpc WriteSpan(WriteSpanRequest) returns (WriteSpanResponse);
Expand Down Expand Up @@ -182,6 +197,19 @@ service DependenciesReaderPlugin {
rpc GetDependencies(GetDependenciesRequest) returns (GetDependenciesResponse);
}

service SamplingStorePlugin{
rpc InsertThroughput(InsertThroughputRequest) returns (InsertThroughputResponse);

// InsertProbabilitiesAndQPS inserts calculated sampling probabilities and measured qps into storage.
// rpc InsertProbabilitiesAndQPS(hostname string, probabilities model.ServiceOperationProbabilities, qps model.ServiceOperationQPS) error

// // GetThroughput retrieves aggregated throughput for operations within a time range.
// GetThroughput(start, end time.Time) ([]*model.Throughput, error)

// // GetLatestProbabilities retrieves the latest sampling probabilities.
// GetLatestProbabilities() (model.ServiceOperationProbabilities, error)
}

// empty; extensible in the future
message CapabilitiesRequest {

Expand Down
6 changes: 6 additions & 0 deletions plugin/storage/grpc/shared/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package shared

import (
"github.com/jaegertracing/jaeger/storage/dependencystore"
"github.com/jaegertracing/jaeger/storage/samplingstore"
"github.com/jaegertracing/jaeger/storage/spanstore"
)

Expand All @@ -26,6 +27,10 @@ type StreamingSpanWriterPlugin interface {
StreamingSpanWriter() spanstore.Writer
}

type SamplingStorePlugin interface {
SamplingStoreRW() samplingstore.Store
}

// PluginCapabilities allow expose plugin its capabilities.
type PluginCapabilities interface {
Capabilities() (*Capabilities, error)
Expand All @@ -43,4 +48,5 @@ type PluginServices struct {
Store StoragePlugin
ArchiveStore ArchiveStoragePlugin
StreamingSpanWriter StreamingSpanWriterPlugin
SamplingStore SamplingStorePlugin
}
Loading
Loading