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 GetProjectCollTags(project 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 UpdateCollectionSizeMetrics(namespace string, namespaceName string, dbName string, collectionName string, ...)
- func UpdateDbSizeMetrics(namespace string, namespaceName string, dbName string, size int64)
- 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 Measurement
- func (m *Measurement) AddProjectCollTags(project 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) 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 SearchQueryMetrics
- type StreamingQueryMetrics
- 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 )
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 )
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 GetProjectCollTags ¶
func GetSearchTags ¶
func GetSessionTags ¶
func GetTenantNameTagValue ¶
func InitializeMetrics ¶
func InitializeMetrics() func()
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 Measurement ¶
type Measurement struct {
// contains filtered or unexported fields
}
func MeasurementFromContext ¶
func MeasurementFromContext(ctx context.Context) (*Measurement, bool)
func NewMeasurement ¶
func (*Measurement) AddProjectCollTags ¶
func (m *Measurement) AddProjectCollTags(project 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) 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 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 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.