application

package
v0.0.0-...-d0ab517 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 116 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxSpanLength         = 500
	MaxListSpansLimit     = 1000
	MaxTraceTreeLength    = 10000
	MaxOApiListSpansLimit = 200
	QueryLimitDefault     = 100
)

Variables

This section is empty.

Functions

func GetUserID

func GetUserID(ctx context.Context, sessionReq *common.Session) (string, error)

func NewDatasetServiceAdapter

func NewDatasetServiceAdapter(evalSetService evaluationsetservice.Client, datasetService datasetservice.Client) *service.DatasetServiceAdaptor

func NewIngestionCollectorFactory

func NewIngestionCollectorFactory(mqFactory mq.IFactory, traceRepo repo2.ITraceRepo) service.IngestionCollectorFactory

func NewInitTaskProcessor

func NewInitTaskProcessor(datasetServiceProvider *service.DatasetServiceAdaptor, evalService rpc.IEvaluatorRPCAdapter,
	evaluationService rpc.IEvaluationRPCAdapter, taskRepo repo4.ITaskRepo,
) *processor.TaskProcessor

func NewMetricsPlatformConfig

func NewMetricsPlatformConfig() *entity.PlatformMetrics

func NewScheduledTask

func NewScheduledTask(
	locker lock.ILocker, config3 config2.ITraceConfig,

	traceHubService tracehub.ITraceHubService,
	taskService service3.ITaskService,
	taskProcessor processor.TaskProcessor,
	taskRepo repo4.ITaskRepo,
) []scheduledtask.ScheduledTask

func NewTaskLocker

func NewTaskLocker(cmdable redis.Cmdable) lock.ILocker

func NewTraceConfigLoader

func NewTraceConfigLoader(confFactory conf.IConfigLoaderFactory) (conf.IConfigLoader, error)

func NewTraceProcessorBuilder

func NewTraceProcessorBuilder(
	traceConfig config2.ITraceConfig,
	fileProvider rpc.IFileProvider,
	benefitSvc benefit.IBenefitService,
) service.TraceFilterProcessorBuilder

Types

type GetDisplayInfoRequest

type GetDisplayInfoRequest struct {
	WorkspaceID  int64
	UserIDs      []string
	EvaluatorIDs []int64
	TagKeyIDs    []string
}

inner usage

type GetDisplayInfoResponse

type GetDisplayInfoResponse struct {
	UserMap map[string]*commdo.UserInfo
	EvalMap map[int64]*rpc.Evaluator
	TagMap  map[int64]*rpc.TagInfo
}

type IAnnotationQueueConsumer

type IAnnotationQueueConsumer interface {
	Send(context.Context, *entity.AnnotationEvent) error
}

type IMetricApplication

type IMetricApplication interface {
	metric.MetricService
}

func InitMetricApplication

func InitMetricApplication(ckDb ck.Provider, storageProvider storage2.IStorageProvider, configFactory conf.IConfigLoaderFactory, fileClient fileservice.Client, benefit2 benefit.IBenefitService, authClient authservice.Client, idGenerator idgen.IIDGenerator) (IMetricApplication, error)

func NewMetricApplication

func NewMetricApplication(
	metricService service.IMetricsService,
	tenantProvider tenant.ITenantProvider,
	authSvc rpc.IAuthProvider,
) (IMetricApplication, error)

type IObservabilityOpenAPIApplication

type IObservabilityOpenAPIApplication interface {
	openapi.OpenAPIService
	IAnnotationQueueConsumer
}

func InitOpenAPIApplication

func InitOpenAPIApplication(mqFactory mq.IFactory, configFactory conf.IConfigLoaderFactory, fileClient fileservice.Client, ckDb ck.Provider, benefit2 benefit.IBenefitService, limiterFactory limiter.IRateLimiterFactory, authClient authservice.Client, meter metrics.Meter, db2 db.Provider, redis3 redis.Cmdable, idgen2 idgen.IIDGenerator, evalService evaluatorservice.Client, persistentCmdable redis.PersistentCmdable) (IObservabilityOpenAPIApplication, error)

type ITaskApplication

type ITaskApplication interface {
	task.TaskService
	ITaskQueueConsumer
	RunTaskScheduleTask(ctx context.Context) error
}

func InitTaskApplication

func InitTaskApplication(db2 db.Provider, idgen2 idgen.IIDGenerator, configFactory conf.IConfigLoaderFactory, benefit2 benefit.IBenefitService, ckDb ck.Provider, redis3 redis.Cmdable, mqFactory mq.IFactory, userClient userservice.Client, authClient authservice.Client, evalService evaluatorservice.Client, evalSetService evaluationsetservice.Client, exptService experimentservice.Client, datasetService datasetservice.Client, fileClient fileservice.Client, taskProcessor processor.TaskProcessor, aid int32, persistentCmdable redis.PersistentCmdable) (ITaskApplication, error)

func NewTaskApplication

func NewTaskApplication(
	taskService service.ITaskService,
	authService rpc.IAuthProvider,
	evalService rpc.IEvaluatorRPCAdapter,
	evaluationService rpc.IEvaluationRPCAdapter,
	userService rpc.IUserProvider,
	tracehubSvc tracehub.ITraceHubService,
	taskProcessor processor.TaskProcessor,
	taskCallbackService service.ITaskCallbackService,
	scheduledTasks []scheduledtask.ScheduledTask,
	traceRepo tracerepo.ITraceRepo,
) (ITaskApplication, error)

type ITaskQueueConsumer

type ITaskQueueConsumer interface {
	SpanTrigger(ctx context.Context, rawSpan *entity.RawSpan, Span *loop_span.Span) error
	AutoEvalCallback(ctx context.Context, event *entity.AutoEvalEvent) error
	AutoEvalCorrection(ctx context.Context, event *entity.CorrectionEvent) error
	BackFill(ctx context.Context, event *entity.BackFillEvent) error
}

type ITraceApplication

type ITraceApplication interface {
	trace.TraceService
	GetDisplayInfo(context.Context, *GetDisplayInfoRequest) GetDisplayInfoResponse
}

func InitTraceApplication

func InitTraceApplication(db2 db.Provider, ckDb ck.Provider, redis3 redis.Cmdable, persistentCmdable redis.PersistentCmdable, meter metrics.Meter, mqFactory mq.IFactory, configFactory conf.IConfigLoaderFactory, idgen2 idgen.IIDGenerator, fileClient fileservice.Client, benefit2 benefit.IBenefitService, authClient authservice.Client, userClient userservice.Client, evalService evaluatorservice.Client, evalSetService evaluationsetservice.Client, tagService tagservice.Client, datasetService datasetservice.Client) (ITraceApplication, error)

func NewTraceApplication

func NewTraceApplication(
	traceService service.ITraceService,
	traceExportService service.ITraceExportService,
	viewRepo repo.IViewRepo,
	benefitService benefit.IBenefitService,
	tenant tenant.ITenantProvider,
	traceMetrics metrics.ITraceMetrics,
	traceConfig config.ITraceConfig,
	authService rpc.IAuthProvider,
	evalService rpc.IEvaluatorRPCAdapter,
	userService rpc.IUserProvider,
	tagService rpc.ITagRPCAdapter,
) (ITraceApplication, error)

type ITraceIngestionApplication

type ITraceIngestionApplication interface {
	RunSync(context.Context) error
	RunAsync(context.Context)
}

func InitTraceIngestionApplication

func InitTraceIngestionApplication(configFactory conf.IConfigLoaderFactory, storageProvider storage2.IStorageProvider, ckDb ck.Provider, db2 db.Provider, mqFactory mq.IFactory, persistentCmdable redis.PersistentCmdable, idGenerator idgen.IIDGenerator) (ITraceIngestionApplication, error)

type IngestionApplicationImpl

type IngestionApplicationImpl struct {
	// contains filtered or unexported fields
}

func (*IngestionApplicationImpl) RunAsync

func (i *IngestionApplicationImpl) RunAsync(ctx context.Context)

func (*IngestionApplicationImpl) RunSync

type MetricApplication

type MetricApplication struct {
	// contains filtered or unexported fields
}

func (*MetricApplication) GetDrillDownValues

func (*MetricApplication) GetMetrics

func (*MetricApplication) TraverseMetrics

type OpenAPIApplication

type OpenAPIApplication struct {
	// contains filtered or unexported fields
}

func (*OpenAPIApplication) AllowByKey

func (p *OpenAPIApplication) AllowByKey(ctx context.Context, key string) bool

func (*OpenAPIApplication) CreateAnnotation

func (*OpenAPIApplication) DeleteAnnotation

func (*OpenAPIApplication) IngestTraces

func (*OpenAPIApplication) ListPreSpanOApi

func (*OpenAPIApplication) ListSpansOApi

func (*OpenAPIApplication) ListTracesOApi

func (*OpenAPIApplication) OtelIngestTraces

func (*OpenAPIApplication) SearchTraceOApi

func (*OpenAPIApplication) Send

type TaskApplication

type TaskApplication struct {
	// contains filtered or unexported fields
}

func (*TaskApplication) AutoEvalCallback

func (t *TaskApplication) AutoEvalCallback(ctx context.Context, event *entity.AutoEvalEvent) error

func (*TaskApplication) AutoEvalCorrection

func (t *TaskApplication) AutoEvalCorrection(ctx context.Context, event *entity.CorrectionEvent) error

func (*TaskApplication) BackFill

func (t *TaskApplication) BackFill(ctx context.Context, event *entity.BackFillEvent) error

func (*TaskApplication) CheckTaskName

func (*TaskApplication) CreateTask

func (*TaskApplication) GetTask

func (*TaskApplication) ListTasks

func (*TaskApplication) RunTaskScheduleTask

func (t *TaskApplication) RunTaskScheduleTask(ctx context.Context) error

func (*TaskApplication) SpanTrigger

func (t *TaskApplication) SpanTrigger(ctx context.Context, rawSpan *entity.RawSpan, loopSpan *loop_span.Span) error

func (*TaskApplication) UpdateTask

type TraceApplication

type TraceApplication struct {
	// contains filtered or unexported fields
}

func (*TraceApplication) ChangeEvaluatorScore

func (*TraceApplication) CreateView

func (*TraceApplication) DeleteView

func (*TraceApplication) ExportTracesToDataset

func (*TraceApplication) ExtractSpanInfo

func (*TraceApplication) GetDisplayInfo

func (*TraceApplication) GetTrace

func (*TraceApplication) GetTracesMetaInfo

func (*TraceApplication) GetTrajectoryConfig

func (*TraceApplication) IngestTracesInner

func (t *TraceApplication) IngestTracesInner(ctx context.Context, req *trace.IngestTracesRequest) (r *trace.IngestTracesResponse, err error)

func (*TraceApplication) ListAnnotations

func (*TraceApplication) ListPreSpan

func (*TraceApplication) ListSpans

func (*TraceApplication) ListTrajectory

func (*TraceApplication) ListViews

func (*TraceApplication) PreviewExportTracesToDataset

func (*TraceApplication) SearchTraceTree

func (*TraceApplication) UpdateView

func (*TraceApplication) UpsertTrajectoryConfig

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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