Documentation ¶
Overview ¶
Package report contains reporters for collecting specific information about the collector-
Index ¶
- type AgentClient
- type Client
- type Manager
- type Reporter
- type SnapshotReporter
- func (s *SnapshotReporter) Kind() string
- func (s *SnapshotReporter) Report(cfg any) error
- func (s *SnapshotReporter) Reset()
- func (s *SnapshotReporter) SaveLogs(componentID string, ld plog.Logs)
- func (s *SnapshotReporter) SaveMetrics(componentID string, md pmetric.Metrics)
- func (s *SnapshotReporter) SaveTraces(componentID string, td ptrace.Traces)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentClient ¶
type AgentClient struct {
// contains filtered or unexported fields
}
AgentClient is a basic client that injects agent specific information in request headers
func NewAgentClient ¶
func NewAgentClient(agentID string, secretKey *string, tlsConfig *tls.Config) *AgentClient
NewAgentClient creates a new AgentClient
type Client ¶
type Client interface { // Do makes the specified request and return the body contents. Do(req *http.Request) (*http.Response, error) }
Client represents a client that can report information to a platform
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager represents a structure that manages all of the different reporters
func (*Manager) ResetConfig ¶
ResetConfig resets the current config
type Reporter ¶
type Reporter interface { // Kind returns the kind of this reporter Kind() string // Report starts reporting with the passed in configuration. Report(config any) error }
Reporter represents a a structure to collector and report specific structures
type SnapshotReporter ¶
type SnapshotReporter struct {
// contains filtered or unexported fields
}
SnapshotReporter tracks and reports snapshots
func GetSnapshotReporter ¶
func GetSnapshotReporter() *SnapshotReporter
GetSnapshotReporter returns the global SnapshotReporter
func NewSnapshotReporter ¶
func NewSnapshotReporter(client Client) *SnapshotReporter
NewSnapshotReporter creates a new SnapshotReporter with the associated client
func (*SnapshotReporter) Kind ¶
func (s *SnapshotReporter) Kind() string
Kind returns kind of the reporter
func (*SnapshotReporter) Report ¶
func (s *SnapshotReporter) Report(cfg any) error
Report applies the new configuration and reports snapshots specified in it
func (*SnapshotReporter) SaveLogs ¶
func (s *SnapshotReporter) SaveLogs(componentID string, ld plog.Logs)
SaveLogs saves off logs in a snapshot to be reported later
func (*SnapshotReporter) SaveMetrics ¶
func (s *SnapshotReporter) SaveMetrics(componentID string, md pmetric.Metrics)
SaveMetrics saves off metrics in a snapshot to be reported later
func (*SnapshotReporter) SaveTraces ¶
func (s *SnapshotReporter) SaveTraces(componentID string, td ptrace.Traces)
SaveTraces saves off traces in a snapshot to be reported later
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package snapshot defines contract for collecting snapshots as well as helper structures
|
Package snapshot defines contract for collecting snapshots as well as helper structures |
mocks
Package mocks contains mocks for snapshot interfaces
|
Package mocks contains mocks for snapshot interfaces |