Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsSinkSpanExporter ¶
type AnalyticsSinkSpanExporter struct {
// contains filtered or unexported fields
}
AnalyticsSinkSpanExporter implements SpanExporter.
func NewAnalyticsSinkSpanExporter ¶
func NewAnalyticsSinkSpanExporter(logger *zap.Logger, analyticsStoreMutator AnalyticsStoreMutator) *AnalyticsSinkSpanExporter
NewAnalyticsSinkSpanExporter is the constructor function for an AnalyticsSpanExporter.
func (*AnalyticsSinkSpanExporter) ExportSpans ¶
func (a *AnalyticsSinkSpanExporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) error
ExportSpans transforms the spans into []*EvaluationResponse which the mutator takes to store into an analytics store.
type AnalyticsStoreMutator ¶
type AnalyticsStoreMutator interface { IncrementFlagEvaluationCounts(ctx context.Context, responses []*EvaluationResponse) error Close() error }
type Client ¶
type Client interface { GetFlagEvaluationsCount(ctx context.Context, req *FlagEvaluationsCountRequest) ([]string, []float32, error) fmt.Stringer }
Client is a contract that each analytics store needs to conform to for getting analytics from the implemented store.
type EvaluationResponse ¶
type EvaluationResponse struct { FlagKey string `json:"flagKey,omitempty"` FlagType string `json:"flagType,omitempty"` NamespaceKey string `json:"namespaceKey,omitempty"` Reason string `json:"reason,omitempty"` Match *bool `json:"match,omitempty"` EvaluationValue *string `json:"evaluationValue,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` EntityId string `json:"entityId,omitempty"` }
type FlagEvaluationsCountRequest ¶ added in v1.52.0
type Server ¶
type Server struct { analytics.UnimplementedAnalyticsServiceServer // contains filtered or unexported fields }
Server is a grpc server for Flipt analytics.
func (*Server) GetFlagEvaluationsCount ¶
func (s *Server) GetFlagEvaluationsCount(ctx context.Context, req *analytics.GetFlagEvaluationsCountRequest) (*analytics.GetFlagEvaluationsCountResponse, error)
GetFlagEvaluationsCount is the implemented RPC method that will return aggregated flag evaluation counts.
func (*Server) RegisterGRPC ¶
Click to show internal directories.
Click to hide internal directories.