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

* build: integrate sql migrations for clickhouse * feat: support error/exception attributes for trace * chore: fixing dependencies for docker go client libs * feat: get trace filter api checkpoint * chore: fixing dependencies for go-migrate * feat: add new columns * feat: move mirgate run from docker to code * fix: migration file 404 issue * feat: getSpanFilter API * fix: migrate version naming bug * chore: change url param format to array * feat: add getTagFilter API * feat: add getFilteredSpans API * fix: using OFFSET in sqlx driver * feat: aggregates API on getFilteredSpan, use IN and NOT IN for tag filtering * feat: add more function support to span aggregate API * fix: null component edge case * feat: groupBy support for filteredSpanAggregate * feat: add function param to span aggregate API * feat: add support to return totalSpans in getFilteredSpans API * fix: don't return null string as keys in span filters * chore: remove SQL migrations(moved to otel collector) * fix: null string issue in aggregate API * Merge main * fix: trace API db query param * fix: signoz sql db path * fix: case when both error and ok status are selected Co-authored-by: Ankit Nayan <ankit@signoz.io>
56 lines
3.7 KiB
Go
56 lines
3.7 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 {
|
|
GetChannel(id string) (*model.ChannelItem, *model.ApiError)
|
|
GetChannels() (*[]model.ChannelItem, *model.ApiError)
|
|
DeleteChannel(id string) *model.ApiError
|
|
CreateChannel(receiver *model.Receiver) (*model.Receiver, *model.ApiError)
|
|
EditChannel(receiver *model.Receiver, id string) (*model.Receiver, *model.ApiError)
|
|
|
|
GetRule(id string) (*model.RuleResponseItem, *model.ApiError)
|
|
ListRulesFromProm() (*model.AlertDiscovery, *model.ApiError)
|
|
CreateRule(alert string) *model.ApiError
|
|
EditRule(alert string, id string) *model.ApiError
|
|
DeleteRule(id string) *model.ApiError
|
|
|
|
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)
|
|
GetSpanFilters(ctx context.Context, query *model.SpanFilterParams) (*model.SpanFiltersResponse, *model.ApiError)
|
|
GetTagFilters(ctx context.Context, query *model.TagFilterParams) (*[]model.TagFilters, *model.ApiError)
|
|
GetFilteredSpans(ctx context.Context, query *model.GetFilteredSpansParams) (*model.GetFilterSpansResponse, *model.ApiError)
|
|
GetFilteredSpansAggregates(ctx context.Context, query *model.GetFilteredSpanAggregatesParams) (*model.GetFilteredSpansAggregatesResponse, *model.ApiError)
|
|
|
|
GetErrors(ctx context.Context, params *model.GetErrorsParams) (*[]model.Error, *model.ApiError)
|
|
GetErrorForId(ctx context.Context, params *model.GetErrorParams) (*model.ErrorWithSpan, *model.ApiError)
|
|
GetErrorForType(ctx context.Context, params *model.GetErrorParams) (*model.ErrorWithSpan, *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)
|
|
}
|