metrics

package
v1.0.0-alpha.25 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminServiceName            = "tigrisdata.admin.v1.Admin"
	SystemTigrisTenantName      = "system"
	DefaultReportedTigrisTenant = "unknown"
)
View Source
const (
	GrpcTracingServiceName      = "tigris.grpc"
	KvTracingServiceName        = "tigris.fdb.kv"
	TxManagerTracingServiceName = "tigris.tx.manager"
)

Variables

View Source
var (
	FdbRequests         tally.Scope
	FdbErrorRequests    tally.Scope
	MeasuredFdbRequests = []string{
		"Delete",
		"DeleteRange",
		"CreateTable",
		"DropTable",
		"SetVersionstampedValue",
		"SetVersionstampedKey",
		"Get",
		"Insert",
		"Replace",
		"Read",
		"ReadRange",
		"Update",
		"UpdateRange",
		"BeginTx",
	}
)
View Source
var (
	Reporter promreporter.Reporter

	// GRPC and HTTP related metric scopes
	Requests         tally.Scope
	ErrorRequests    tally.Scope
	RequestsRespTime tally.Scope
	// Fdb related metric scopes
	FdbMetrics tally.Scope
	// Search related metrics scopes
	SearchMetrics tally.Scope
)
View Source
var (
	SearchRequests      tally.Scope
	SearchErrorRequests tally.Scope
)

Functions

func GetFdbSpecificErrorTags

func GetFdbSpecificErrorTags(ctx context.Context, reqMethodName string, code string) map[string]string

func GetFdbTags

func GetFdbTags(ctx context.Context, reqMethodName string) map[string]string

func GetGlobalTags

func GetGlobalTags() map[string]string

func GetSearchTags

func GetSearchTags(ctx context.Context, reqMethodName string) map[string]string

func InitializeFdbScopes

func InitializeFdbScopes()

func InitializeMetrics

func InitializeMetrics() io.Closer

func InitializeRequestScopes

func InitializeRequestScopes()

func InitializeSearchScopes

func InitializeSearchScopes()

Types

type RequestEndpointMetadata

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

func GetGrpcEndPointMetadataFromFullMethod

func GetGrpcEndPointMetadataFromFullMethod(ctx context.Context, fullMethod string, methodType string) RequestEndpointMetadata

func (*RequestEndpointMetadata) GetMethodName

func (r *RequestEndpointMetadata) GetMethodName() string

func (*RequestEndpointMetadata) GetServiceType

func (r *RequestEndpointMetadata) GetServiceType() string

func (*RequestEndpointMetadata) GetSpecificErrorTags

func (r *RequestEndpointMetadata) GetSpecificErrorTags(source string, code string) map[string]string

func (*RequestEndpointMetadata) GetTags

func (r *RequestEndpointMetadata) GetTags() map[string]string

type SpanMeta

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

func NewSpanMeta

func NewSpanMeta(serviceName string, resourceName string, spanType string, tags map[string]string) *SpanMeta

func (*SpanMeta) GetSpanOptions

func (s *SpanMeta) GetSpanOptions() []tracer.StartSpanOption

func (*SpanMeta) StartTracing

func (s *SpanMeta) StartTracing(ctx context.Context, childOnly bool) (context.Context, func())

Jump to

Keyboard shortcuts

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