Documentation
¶
Overview ¶
This service provides debug stream APIs for components.
Index ¶
Constants ¶
View Source
const ServiceName = "livedebugging"
ServiceName defines the name used for the livedebugging service.
Variables ¶
This section is empty.
Functions ¶
func NewLiveDebugging ¶
func NewLiveDebugging() *liveDebugging
NewLiveDebugging creates a new instance of liveDebugging.
Types ¶
type CallbackID ¶
type CallbackID string
type CallbackManager ¶
type CallbackManager interface {
// AddCallback sets a callback for a given componentID.
// The callback is used to send debugging data to live debugging consumers.
AddCallback(host service.Host, callbackID CallbackID, componentID ComponentID, callback func(Data)) error
// DeleteCallback deletes a callback for a given componentID.
DeleteCallback(callbackID CallbackID, componentID ComponentID)
// AddCallbackMulti sets a callback to all components.
// The callbacks are used to send debugging data to live debugging consumers.
AddCallbackMulti(host service.Host, callbackID CallbackID, moduleID ModuleID, callback func(Data)) error
// DeleteCallbackMulti deletes callbacks for all components.
DeleteCallbackMulti(host service.Host, callbackID CallbackID, moduleID ModuleID)
}
CallbackManager is used to manage live debugging callbacks.
type ComponentID ¶
type ComponentID string
type Data ¶ added in v1.8.0
type Data struct {
// ID of the component that created the data.
ComponentID ComponentID
// Ids of the components which will consume the data.
// This is needed for components that can export different types of data (most Otel components) to know
// where the data should go. When left empty, the data is expected to be sent to all components consuming data
// from the component that created it.
TargetComponentIDs []string
Type DataType
// Count is the number of spans, metrics, logs that the data represent.
Count uint64
// The data string is passed as a function to only compute the string if needed.
DataFunc func() string
}
func NewData ¶ added in v1.8.0
func NewData(componentID ComponentID, dataType DataType, count uint64, dataFunc func() string, opts ...DataOption) Data
type DataOption ¶ added in v1.8.0
func WithTargetComponentIDs ¶ added in v1.8.0
func WithTargetComponentIDs(ids []string) DataOption
type DebugDataPublisher ¶
type DebugDataPublisher interface {
// Publish sends debugging data for a given componentID if a least one consumer is listening for debugging data for the given componentID.
PublishIfActive(data Data)
}
DebugDataPublisher is used by components to push information to live debugging consumers.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Data ¶
Data implements service.Service. It returns the liveDebugging for the components to stream.
func (*Service) Definition ¶
func (*Service) Definition() service.Definition
Definition implements service.Service.
Click to show internal directories.
Click to hide internal directories.