Documentation ¶
Index ¶
- Constants
- Variables
- func ClearMeasurementContext(ctx context.Context) context.Context
- func FormDatadogQuery(namespace string, req *api.QueryTimeSeriesMetricsRequest) (string, error)
- func FormDatadogQueryNoMeta(namespace string, noMeta bool, req *api.QueryTimeSeriesMetricsRequest) (string, error)
- func GetAuthBaseTags(ctx context.Context) map[string]string
- func GetFdbBaseTags(reqMethodName string) map[string]string
- func GetFdbErrorTags(reqMethodName string, code string) map[string]string
- func GetFdbOkTags(reqMethodName string) map[string]string
- func GetGlobalTags() map[string]string
- func GetProjectBranchCollTags(project string, branch string, collection string) map[string]string
- func GetSearchTags(reqMethodName string) map[string]string
- func GetSessionTags(sessionMethodName string) map[string]string
- func GetTenantNameTagValue(namespace string, namespaceName string) string
- func InitializeMetrics() func()
- func SchemaReadOutdated(project string, branch string, collection string)
- func SchemaUpdateRepaired(project string, branch string, collection string)
- func UpdateCollectionSizeMetrics(namespace string, namespaceName string, dbName string, branch string, ...)
- func UpdateDbSizeMetrics(namespace string, namespaceName string, dbName string, branch string, ...)
- func UpdateNameSpaceSizeMetrics(namespace string, namespaceName string, size int64)
- func UpdateQuotaCurrentNodeLimit(namespaceName string, value int, isWrite bool)
- func UpdateQuotaCurrentRatesReceivedLimit(namespaceName string, value int, isWrite bool)
- func UpdateQuotaRateThrottled(namespaceName string, value int, isWrite bool)
- func UpdateQuotaStorageThrottled(namespaceName string, value int)
- func UpdateQuotaUsage(namespaceName string, value int, isWrite bool)
- func UpdateSpanTags(ctx context.Context, qm QueryMetrics) context.Context
- type Datadog
- type GlobalStatus
- type Measurement
- func (m *Measurement) AddProjectBranchCollTags(project string, branch string, coll string)
- func (m *Measurement) AddTags(tags map[string]string)
- func (m *Measurement) CountErrorForScope(scope tally.Scope, tags map[string]string)
- func (m *Measurement) CountOkForScope(scope tally.Scope, tags map[string]string)
- func (m *Measurement) CountReceivedBytes(scope tally.Scope, tags map[string]string, size int)
- func (m *Measurement) CountSentBytes(scope tally.Scope, tags map[string]string, size int)
- func (m *Measurement) CountUnits(reqStatus *RequestStatus, tags map[string]string)
- func (m *Measurement) FinishTracing(ctx context.Context) context.Context
- func (m *Measurement) FinishWithError(ctx context.Context, err error) context.Context
- func (m *Measurement) GetAuthErrorTags(err error) map[string]string
- func (m *Measurement) GetAuthOkTags() map[string]string
- func (m *Measurement) GetCollectionSizeTags() map[string]string
- func (m *Measurement) GetDbSizeTags() map[string]string
- func (m *Measurement) GetFdbErrorTags(err error) map[string]string
- func (m *Measurement) GetFdbOkTags() map[string]string
- func (m *Measurement) GetNamespaceSizeTags() map[string]string
- func (m *Measurement) GetNetworkTags() map[string]string
- func (m *Measurement) GetProjectCollTags() map[string]string
- func (m *Measurement) GetRequestErrorTags(err error) map[string]string
- func (m *Measurement) GetRequestOkTags() map[string]string
- func (m *Measurement) GetResourceName() string
- func (m *Measurement) GetSearchErrorTags(err error) map[string]string
- func (m *Measurement) GetSearchOkTags() map[string]string
- func (m *Measurement) GetServiceName() string
- func (m *Measurement) GetSessionErrorTags(err error) map[string]string
- func (m *Measurement) GetSessionOkTags() map[string]string
- func (m *Measurement) GetSpanOptions() []ddtracer.StartSpanOption
- func (m *Measurement) GetTags() map[string]string
- func (m *Measurement) RecordDuration(scope tally.Scope, tags map[string]string)
- func (m *Measurement) RecursiveAddTags(tags map[string]string)
- func (m *Measurement) SaveMeasurementToContext(ctx context.Context) (context.Context, error)
- func (m *Measurement) StartTracing(ctx context.Context, childOnly bool) context.Context
- type MeasurementCtxKey
- type QueryMetrics
- type RequestStatus
- func (r *RequestStatus) AddCollectionSearchUnit()
- func (r *RequestStatus) AddDDLCreateUnit()
- func (r *RequestStatus) AddDDLDropUnit()
- func (r *RequestStatus) AddDDLUpdateUnit()
- func (r *RequestStatus) AddReadBytes(value int64)
- func (r *RequestStatus) AddSearchCreateIndexUnit()
- func (r *RequestStatus) AddSearchDeleteDocumentUnit(count int)
- func (r *RequestStatus) AddSearchDropIndexUnit()
- func (r *RequestStatus) AddSearchUnit()
- func (r *RequestStatus) AddWriteBytes(value int64)
- func (r *RequestStatus) ClearRequestStatusFromContext(ctx context.Context) context.Context
- func (r *RequestStatus) GetApiSearchUnits() int64
- func (r *RequestStatus) GetCollectionSearchUnits() int64
- func (r *RequestStatus) GetDDLCreateUnits() int64
- func (r *RequestStatus) GetDDLDropUnits() int64
- func (r *RequestStatus) GetDDLUpdateUnits() int64
- func (r *RequestStatus) GetReadBytes() int64
- func (r *RequestStatus) GetSearchCreateIndexUnits() int64
- func (r *RequestStatus) GetSearchDeleteDocumentUnits() int64
- func (r *RequestStatus) GetSearchDropIndexUnits() int64
- func (r *RequestStatus) GetWriteBytes() int64
- func (r *RequestStatus) IsApiSearch() bool
- func (r *RequestStatus) IsCollectionSearch() bool
- func (r *RequestStatus) IsKeySecondaryIndex(fdbKey []byte) bool
- func (r *RequestStatus) IsSecondaryIndexFieldIgnored(fdbKey []byte) bool
- func (r *RequestStatus) SaveRequestStatusToContext(ctx context.Context) context.Context
- func (r *RequestStatus) SetApiSearchType()
- func (r *RequestStatus) SetCollectionSearchType()
- func (r *RequestStatus) SetReadBytes(value int64)
- func (r *RequestStatus) SetWriteBytes(value int64)
- type RequestStatusCtxKey
- type SearchQueryMetrics
- type StreamingQueryMetrics
- type TenantStatus
- type TenantStatusTimeChunk
- type WriteQueryMetrics
Constants ¶
View Source
const ( KvTracingServiceName string = "kv" TraceServiceName string = "tigris.grpc.server" SessionManagerServiceName string = "session" GrpcSpanType string = "grpc" FdbSpanType string = "fdb" SearchSpanType string = "search" SessionSpanType string = "session" AuthSpanType string = "auth" )
Variables ¶
View Source
var ( AuthOkCount tally.Scope AuthErrorCount tally.Scope AuthRespTime tally.Scope AuthErrorRespTime tally.Scope )
View Source
var ( FdbOkCount tally.Scope FdbErrorCount tally.Scope FdbRespTime tally.Scope FdbErrorRespTime tally.Scope )
View Source
var ( Reporter promreporter.Reporter Requests tally.Scope FdbMetrics tally.Scope SearchMetrics tally.Scope SessionMetrics tally.Scope SizeMetrics tally.Scope QuotaMetrics tally.Scope NetworkMetrics tally.Scope AuthMetrics tally.Scope SchemaMetrics tally.Scope GlobalSt *GlobalStatus )
View Source
var ( BytesReceived tally.Scope BytesSent tally.Scope )
View Source
var ( QuotaUsage tally.Scope QuotaThrottled tally.Scope QuotaSet tally.Scope QuotaCurRates tally.Scope )
View Source
var ( RequestsOkCount tally.Scope RequestsErrorCount tally.Scope RequestsRespTime tally.Scope RequestsErrorRespTime tally.Scope RequestsReadBytes tally.Scope RequestsReadUnits tally.Scope RequestsWriteBytes tally.Scope RequestsWriteUnits tally.Scope RequestsDDLDropUnits tally.Scope RequestsDDLUpdateUnits tally.Scope RequestsDDLCreateUnits tally.Scope RequestsApiSearchUnits tally.Scope RequestsCollectionSearchUnits tally.Scope )
View Source
var ( SearchOkCount tally.Scope SearchErrorCount tally.Scope SearchRespTime tally.Scope SearchErrorRespTime tally.Scope )
Functions ¶
func FormDatadogQuery ¶
func FormDatadogQuery(namespace string, req *api.QueryTimeSeriesMetricsRequest) (string, error)
func FormDatadogQueryNoMeta ¶
func GetFdbBaseTags ¶
func GetFdbOkTags ¶
func GetGlobalTags ¶
func GetSearchTags ¶
func GetSessionTags ¶
func GetTenantNameTagValue ¶
func InitializeMetrics ¶
func InitializeMetrics() func()
func SchemaReadOutdated ¶
func SchemaUpdateRepaired ¶
func UpdateDbSizeMetrics ¶
func UpdateQuotaUsage ¶
func UpdateSpanTags ¶
func UpdateSpanTags(ctx context.Context, qm QueryMetrics) context.Context
Types ¶
type Datadog ¶
type Datadog struct {
// contains filtered or unexported fields
}
func InitDatadog ¶
func (*Datadog) GetCurrentMetricValue ¶
type GlobalStatus ¶
type GlobalStatus struct {
// contains filtered or unexported fields
}
func NewGlobalStatus ¶
func NewGlobalStatus() *GlobalStatus
func (*GlobalStatus) Flush ¶
func (g *GlobalStatus) Flush() TenantStatusTimeChunk
func (*GlobalStatus) RecordRequestToActiveChunk ¶
func (g *GlobalStatus) RecordRequestToActiveChunk(r *RequestStatus, tenantName string)
type Measurement ¶
type Measurement struct {
// contains filtered or unexported fields
}
func MeasurementFromContext ¶
func MeasurementFromContext(ctx context.Context) (*Measurement, bool)
func NewMeasurement ¶
func (*Measurement) AddProjectBranchCollTags ¶
func (m *Measurement) AddProjectBranchCollTags(project string, branch string, coll string)
func (*Measurement) AddTags ¶
func (m *Measurement) AddTags(tags map[string]string)
func (*Measurement) CountErrorForScope ¶
func (m *Measurement) CountErrorForScope(scope tally.Scope, tags map[string]string)
func (*Measurement) CountOkForScope ¶
func (m *Measurement) CountOkForScope(scope tally.Scope, tags map[string]string)
func (*Measurement) CountReceivedBytes ¶
func (*Measurement) CountSentBytes ¶
func (*Measurement) CountUnits ¶
func (m *Measurement) CountUnits(reqStatus *RequestStatus, tags map[string]string)
func (*Measurement) FinishTracing ¶
func (m *Measurement) FinishTracing(ctx context.Context) context.Context
func (*Measurement) FinishWithError ¶
func (*Measurement) GetAuthErrorTags ¶
func (m *Measurement) GetAuthErrorTags(err error) map[string]string
func (*Measurement) GetAuthOkTags ¶
func (m *Measurement) GetAuthOkTags() map[string]string
func (*Measurement) GetCollectionSizeTags ¶
func (m *Measurement) GetCollectionSizeTags() map[string]string
func (*Measurement) GetDbSizeTags ¶
func (m *Measurement) GetDbSizeTags() map[string]string
func (*Measurement) GetFdbErrorTags ¶
func (m *Measurement) GetFdbErrorTags(err error) map[string]string
func (*Measurement) GetFdbOkTags ¶
func (m *Measurement) GetFdbOkTags() map[string]string
func (*Measurement) GetNamespaceSizeTags ¶
func (m *Measurement) GetNamespaceSizeTags() map[string]string
func (*Measurement) GetNetworkTags ¶
func (m *Measurement) GetNetworkTags() map[string]string
func (*Measurement) GetProjectCollTags ¶
func (m *Measurement) GetProjectCollTags() map[string]string
func (*Measurement) GetRequestErrorTags ¶
func (m *Measurement) GetRequestErrorTags(err error) map[string]string
func (*Measurement) GetRequestOkTags ¶
func (m *Measurement) GetRequestOkTags() map[string]string
func (*Measurement) GetResourceName ¶
func (m *Measurement) GetResourceName() string
func (*Measurement) GetSearchErrorTags ¶
func (m *Measurement) GetSearchErrorTags(err error) map[string]string
func (*Measurement) GetSearchOkTags ¶
func (m *Measurement) GetSearchOkTags() map[string]string
func (*Measurement) GetServiceName ¶
func (m *Measurement) GetServiceName() string
func (*Measurement) GetSessionErrorTags ¶
func (m *Measurement) GetSessionErrorTags(err error) map[string]string
func (*Measurement) GetSessionOkTags ¶
func (m *Measurement) GetSessionOkTags() map[string]string
func (*Measurement) GetSpanOptions ¶
func (m *Measurement) GetSpanOptions() []ddtracer.StartSpanOption
func (*Measurement) GetTags ¶
func (m *Measurement) GetTags() map[string]string
func (*Measurement) RecordDuration ¶
func (m *Measurement) RecordDuration(scope tally.Scope, tags map[string]string)
func (*Measurement) RecursiveAddTags ¶
func (m *Measurement) RecursiveAddTags(tags map[string]string)
func (*Measurement) SaveMeasurementToContext ¶
func (*Measurement) StartTracing ¶
type MeasurementCtxKey ¶
type MeasurementCtxKey struct{}
type QueryMetrics ¶
type RequestStatus ¶
type RequestStatus struct {
// contains filtered or unexported fields
}
func NewRequestStatus ¶
func NewRequestStatus(tenantName string) *RequestStatus
func RequestStatusFromContext ¶
func RequestStatusFromContext(ctx context.Context) (*RequestStatus, bool)
func (*RequestStatus) AddCollectionSearchUnit ¶
func (r *RequestStatus) AddCollectionSearchUnit()
func (*RequestStatus) AddDDLCreateUnit ¶
func (r *RequestStatus) AddDDLCreateUnit()
func (*RequestStatus) AddDDLDropUnit ¶
func (r *RequestStatus) AddDDLDropUnit()
func (*RequestStatus) AddDDLUpdateUnit ¶
func (r *RequestStatus) AddDDLUpdateUnit()
func (*RequestStatus) AddReadBytes ¶
func (r *RequestStatus) AddReadBytes(value int64)
func (*RequestStatus) AddSearchCreateIndexUnit ¶
func (r *RequestStatus) AddSearchCreateIndexUnit()
func (*RequestStatus) AddSearchDeleteDocumentUnit ¶
func (r *RequestStatus) AddSearchDeleteDocumentUnit(count int)
func (*RequestStatus) AddSearchDropIndexUnit ¶
func (r *RequestStatus) AddSearchDropIndexUnit()
func (*RequestStatus) AddSearchUnit ¶
func (r *RequestStatus) AddSearchUnit()
func (*RequestStatus) AddWriteBytes ¶
func (r *RequestStatus) AddWriteBytes(value int64)
func (*RequestStatus) ClearRequestStatusFromContext ¶
func (r *RequestStatus) ClearRequestStatusFromContext(ctx context.Context) context.Context
func (*RequestStatus) GetApiSearchUnits ¶
func (r *RequestStatus) GetApiSearchUnits() int64
func (*RequestStatus) GetCollectionSearchUnits ¶
func (r *RequestStatus) GetCollectionSearchUnits() int64
func (*RequestStatus) GetDDLCreateUnits ¶
func (r *RequestStatus) GetDDLCreateUnits() int64
func (*RequestStatus) GetDDLDropUnits ¶
func (r *RequestStatus) GetDDLDropUnits() int64
func (*RequestStatus) GetDDLUpdateUnits ¶
func (r *RequestStatus) GetDDLUpdateUnits() int64
func (*RequestStatus) GetReadBytes ¶
func (r *RequestStatus) GetReadBytes() int64
func (*RequestStatus) GetSearchCreateIndexUnits ¶
func (r *RequestStatus) GetSearchCreateIndexUnits() int64
func (*RequestStatus) GetSearchDeleteDocumentUnits ¶
func (r *RequestStatus) GetSearchDeleteDocumentUnits() int64
func (*RequestStatus) GetSearchDropIndexUnits ¶
func (r *RequestStatus) GetSearchDropIndexUnits() int64
func (*RequestStatus) GetWriteBytes ¶
func (r *RequestStatus) GetWriteBytes() int64
func (*RequestStatus) IsApiSearch ¶
func (r *RequestStatus) IsApiSearch() bool
func (*RequestStatus) IsCollectionSearch ¶
func (r *RequestStatus) IsCollectionSearch() bool
func (*RequestStatus) IsKeySecondaryIndex ¶
func (r *RequestStatus) IsKeySecondaryIndex(fdbKey []byte) bool
func (*RequestStatus) IsSecondaryIndexFieldIgnored ¶
func (r *RequestStatus) IsSecondaryIndexFieldIgnored(fdbKey []byte) bool
func (*RequestStatus) SaveRequestStatusToContext ¶
func (r *RequestStatus) SaveRequestStatusToContext(ctx context.Context) context.Context
func (*RequestStatus) SetApiSearchType ¶
func (r *RequestStatus) SetApiSearchType()
func (*RequestStatus) SetCollectionSearchType ¶
func (r *RequestStatus) SetCollectionSearchType()
func (*RequestStatus) SetReadBytes ¶
func (r *RequestStatus) SetReadBytes(value int64)
func (*RequestStatus) SetWriteBytes ¶
func (r *RequestStatus) SetWriteBytes(value int64)
type RequestStatusCtxKey ¶
type RequestStatusCtxKey struct{}
type SearchQueryMetrics ¶
type SearchQueryMetrics struct {
// contains filtered or unexported fields
}
func (*SearchQueryMetrics) GetTags ¶
func (s *SearchQueryMetrics) GetTags() map[string]string
func (*SearchQueryMetrics) SetSearchType ¶
func (s *SearchQueryMetrics) SetSearchType(value string)
func (*SearchQueryMetrics) SetSort ¶
func (s *SearchQueryMetrics) SetSort(value bool)
type StreamingQueryMetrics ¶
type StreamingQueryMetrics struct {
// contains filtered or unexported fields
}
func (*StreamingQueryMetrics) GetTags ¶
func (s *StreamingQueryMetrics) GetTags() map[string]string
func (*StreamingQueryMetrics) SetReadType ¶
func (s *StreamingQueryMetrics) SetReadType(value string)
func (*StreamingQueryMetrics) SetSort ¶
func (s *StreamingQueryMetrics) SetSort(value bool)
type TenantStatus ¶
type TenantStatus struct {
// contains filtered or unexported fields
}
func NewTenantStatus ¶
func NewTenantStatus() *TenantStatus
type TenantStatusTimeChunk ¶
type TenantStatusTimeChunk struct {
// contains filtered or unexported fields
}
func NewTenantStatusTimeChunk ¶
func NewTenantStatusTimeChunk(startTime time.Time) *TenantStatusTimeChunk
type WriteQueryMetrics ¶
type WriteQueryMetrics struct {
// contains filtered or unexported fields
}
func (*WriteQueryMetrics) GetTags ¶
func (w *WriteQueryMetrics) GetTags() map[string]string
func (*WriteQueryMetrics) SetWriteType ¶
func (w *WriteQueryMetrics) SetWriteType(value string)
Click to show internal directories.
Click to hide internal directories.