mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-12 11:11:47 +08:00

* feat: add ttl for clickhouse setup in signoz * feat: added ttl for metrics table Signed-off-by: Yash Sharma <yashrsharma44@gmail.com> * feat: changed the api to use type and duration as params Signed-off-by: Yash Sharma <yashrsharma44@gmail.com> * added a getter for ttl endpoint Signed-off-by: Yash Sharma <yashrsharma44@gmail.com> * added a feature to retunr ttl for both metrics and traces Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
38 lines
2.4 KiB
Go
38 lines
2.4 KiB
Go
package app
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prometheus/prometheus/promql"
|
|
"github.com/prometheus/prometheus/util/stats"
|
|
"go.signoz.io/query-service/model"
|
|
)
|
|
|
|
type Reader interface {
|
|
// Getter Interfaces
|
|
GetInstantQueryMetricsResult(ctx context.Context, query *model.InstantQueryMetricsParams) (*promql.Result, *stats.QueryStats, *model.ApiError)
|
|
GetQueryRangeResult(ctx context.Context, query *model.QueryRangeParams) (*promql.Result, *stats.QueryStats, *model.ApiError)
|
|
GetServiceOverview(ctx context.Context, query *model.GetServiceOverviewParams) (*[]model.ServiceOverviewItem, error)
|
|
GetServices(ctx context.Context, query *model.GetServicesParams) (*[]model.ServiceItem, error)
|
|
// GetApplicationPercentiles(ctx context.Context, query *model.ApplicationPercentileParams) ([]godruid.Timeseries, error)
|
|
GetServiceDBOverview(ctx context.Context, query *model.GetServiceOverviewParams) (*[]model.ServiceDBOverviewItem, error)
|
|
GetServiceExternalAvgDuration(ctx context.Context, query *model.GetServiceOverviewParams) (*[]model.ServiceExternalItem, error)
|
|
GetServiceExternalErrors(ctx context.Context, query *model.GetServiceOverviewParams) (*[]model.ServiceExternalItem, error)
|
|
GetServiceExternal(ctx context.Context, query *model.GetServiceOverviewParams) (*[]model.ServiceExternalItem, error)
|
|
GetTopEndpoints(ctx context.Context, query *model.GetTopEndpointsParams) (*[]model.TopEndpointsItem, error)
|
|
GetUsage(ctx context.Context, query *model.GetUsageParams) (*[]model.UsageItem, error)
|
|
GetOperations(ctx context.Context, serviceName string) (*[]string, error)
|
|
GetTags(ctx context.Context, serviceName string) (*[]model.TagItem, error)
|
|
GetServicesList(ctx context.Context) (*[]string, error)
|
|
GetServiceMapDependencies(ctx context.Context, query *model.GetServicesParams) (*[]model.ServiceMapDependencyResponseItem, error)
|
|
GetTTL(ctx context.Context, ttlParams *model.GetTTLParams) (*model.GetTTLResponseItem, *model.ApiError)
|
|
|
|
// Search Interfaces
|
|
SearchSpansAggregate(ctx context.Context, queryParams *model.SpanSearchAggregatesParams) ([]model.SpanSearchAggregatesResponseItem, error)
|
|
SearchSpans(ctx context.Context, query *model.SpanSearchParams) (*[]model.SearchSpansResult, error)
|
|
SearchTraces(ctx context.Context, traceID string) (*[]model.SearchSpansResult, error)
|
|
|
|
// Setter Interfaces
|
|
SetTTL(ctx context.Context, ttlParams *model.TTLParams) (*model.SetTTLResponseItem, *model.ApiError)
|
|
}
|