phlare

package
v0.0.0-cloud Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPhlareDatasource

func NewPhlareDatasource(httpClientProvider httpclient.Provider, settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)

NewPhlareDatasource creates a new datasource instance.

Types

type CustomMeta

type CustomMeta struct {
	ProfileTypeID string
}

type EnumField

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

func NewEnumField

func NewEnumField(name string, labels data.Labels) *EnumField

func (*EnumField) Append

func (e *EnumField) Append(value string)

func (*EnumField) GetField

func (e *EnumField) GetField() *data.Field

type Function

type Function struct {
	FunctionName string
	FileName     string // optional
	Line         int64  // optional
}

func (Function) String

func (f Function) String() string

type PhlareDatasource

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

PhlareDatasource is a datasource for querying application performance profiles.

func (*PhlareDatasource) CallResource

func (*PhlareDatasource) CheckHealth

CheckHealth handles health checks sent from Grafana to the plugin. The main use case for these health checks is the test button on the datasource configuration page which allows users to verify that a datasource is working as expected.

func (*PhlareDatasource) PublishStream

PublishStream is called when a client sends a message to the stream.

func (*PhlareDatasource) QueryData

QueryData handles multiple queries and returns multiple responses. req contains the queries []DataQuery (where each query contains RefID as a unique identifier). The QueryDataResponse contains a map of RefID to the response for each query, and each response contains Frames ([]*Frame).

func (*PhlareDatasource) RunStream

RunStream is called once for any open channel. Results are shared with everyone subscribed to the same channel.

func (*PhlareDatasource) SubscribeStream

SubscribeStream is called when a client wants to connect to a stream. This callback allows sending the first message.

type ProfileTree

type ProfileTree struct {
	Level    int
	Value    int64
	Self     int64
	Function *Function
	Inlined  []*Function

	Nodes  []*ProfileTree
	Parent *ProfileTree
	// contains filtered or unexported fields
}

func (*ProfileTree) String

func (pt *ProfileTree) String() string

type SeriesRequestJson

type SeriesRequestJson struct {
	Matchers []string `json:"matchers"`
}

type Service

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

func ProvideService

func ProvideService(httpClientProvider httpclient.Provider) *Service

func (*Service) CallResource

func (*Service) CheckHealth

func (*Service) PublishStream

PublishStream is called when a client sends a message to the stream.

func (*Service) QueryData

func (*Service) RunStream

func (s *Service) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*Service) SubscribeStream

Directories

Path Synopsis
kinds

Jump to

Keyboard shortcuts

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