Documentation ¶
Index ¶
- func HasDWARFData(f *pfelf.File) bool
- type Config
- type DatadogReporter
- func (r *DatadogReporter) ExecutableKnown(fileID libpf.FileID) bool
- func (r *DatadogReporter) ExecutableMetadata(args *reporter.ExecutableMetadataArgs)
- func (r *DatadogReporter) FrameKnown(frameID libpf.FrameID) bool
- func (r *DatadogReporter) FrameMetadata(args *reporter.FrameMetadataArgs)
- func (r *DatadogReporter) GetMetrics() reporter.Metrics
- func (r *DatadogReporter) ReportCountForTrace(_ libpf.TraceHash, _ uint16, _ *reporter.TraceEventMeta)
- func (r *DatadogReporter) ReportFramesForTrace(_ *libpf.Trace)
- func (r *DatadogReporter) ReportHostMetadata(_ map[string]string)
- func (r *DatadogReporter) ReportHostMetadataBlocking(_ context.Context, _ map[string]string, _ int, _ time.Duration) error
- func (r *DatadogReporter) ReportMetrics(_ uint32, _ []uint32, _ []int64)
- func (r *DatadogReporter) ReportTraceEvent(trace *libpf.Trace, meta *reporter.TraceEventMeta)
- func (r *DatadogReporter) Start(mainCtx context.Context) error
- func (r *DatadogReporter) Stop()
- func (r *DatadogReporter) SupportsReportTraceEvent() bool
- type DatadogSymbolQuerier
- type DatadogSymbolUploader
- func (d *DatadogSymbolUploader) GetExistingSymbolsOnBackend(ctx context.Context, e *executableMetadata) (SymbolSource, error)
- func (d *DatadogSymbolUploader) Run(ctx context.Context)
- func (d *DatadogSymbolUploader) UploadSymbols(fileID libpf.FileID, filePath, buildID string, opener process.FileOpener)
- type SymbolFile
- type SymbolSource
- type SymbolUploaderConfig
- type SymbolsQueryRequest
- type Tag
- type Tags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasDWARFData ¶
HasDWARFData is a copy of pfelf.HasDWARFData, but for the libpf.File interface.
Types ¶
type Config ¶
type Config struct { // Version defines the version of the agent. Version string // IntakeURL defines the URL of profiling intake. IntakeURL string // ExecutablesCacheElements defines item capacity of the executables cache. ExecutablesCacheElements uint32 // FramesCacheElements defines the item capacity of the frames cache. FramesCacheElements uint32 // ProcessesCacheElements defines the item capacity of the processes cache. ProcessesCacheElements uint32 // samplesPerSecond defines the number of samples per second. SamplesPerSecond int // ReportInterval defines the interval at which the agent reports data to the collection agent. ReportInterval time.Duration // PprofPrefix defines a file where the agent should dump pprof CPU profile. PprofPrefix string // Tags is a list of tags to be sent to the collection agent. Tags Tags // Whether to include timestamps on samples for the timeline feature Timeline bool // API key for agentless mode APIKey string // SymbolUploaderConfig defines the configuration for the symbol uploader. SymbolUploaderConfig SymbolUploaderConfig }
type DatadogReporter ¶
type DatadogReporter struct {
// contains filtered or unexported fields
}
DatadogReporter receives and transforms information to be OTLP/profiles compliant.
func NewDatadog ¶ added in v0.2.1
func NewDatadog(cfg *Config, p containermetadata.Provider) (*DatadogReporter, error)
func (*DatadogReporter) ExecutableKnown ¶ added in v0.2.1
func (r *DatadogReporter) ExecutableKnown(fileID libpf.FileID) bool
ExecutableKnown returns true if the metadata of the Executable specified by fileID is cached in the reporter.
func (*DatadogReporter) ExecutableMetadata ¶
func (r *DatadogReporter) ExecutableMetadata(args *reporter.ExecutableMetadataArgs)
ExecutableMetadata accepts a fileID with the corresponding filename and caches this information.
func (*DatadogReporter) FrameKnown ¶ added in v0.2.1
func (r *DatadogReporter) FrameKnown(frameID libpf.FrameID) bool
FrameKnown returns true if the metadata of the Frame specified by frameID is cached in the reporter.
func (*DatadogReporter) FrameMetadata ¶
func (r *DatadogReporter) FrameMetadata(args *reporter.FrameMetadataArgs)
FrameMetadata accepts metadata associated with a frame and caches this information.
func (*DatadogReporter) GetMetrics ¶
func (r *DatadogReporter) GetMetrics() reporter.Metrics
GetMetrics returns internal metrics of DatadogReporter.
func (*DatadogReporter) ReportCountForTrace ¶
func (r *DatadogReporter) ReportCountForTrace(_ libpf.TraceHash, _ uint16, _ *reporter.TraceEventMeta)
ReportCountForTrace is a NOP for DatadogReporter.
func (*DatadogReporter) ReportFramesForTrace ¶
func (r *DatadogReporter) ReportFramesForTrace(_ *libpf.Trace)
ReportFramesForTrace is a NOP for DatadogReporter.
func (*DatadogReporter) ReportHostMetadata ¶
func (r *DatadogReporter) ReportHostMetadata(_ map[string]string)
ReportHostMetadata is a NOP for DatadogReporter.
func (*DatadogReporter) ReportHostMetadataBlocking ¶
func (r *DatadogReporter) ReportHostMetadataBlocking(_ context.Context, _ map[string]string, _ int, _ time.Duration) error
ReportHostMetadataBlocking is a NOP for DatadogReporter.
func (*DatadogReporter) ReportMetrics ¶
func (r *DatadogReporter) ReportMetrics(_ uint32, _ []uint32, _ []int64)
ReportMetrics is a NOP for DatadogReporter.
func (*DatadogReporter) ReportTraceEvent ¶
func (r *DatadogReporter) ReportTraceEvent(trace *libpf.Trace, meta *reporter.TraceEventMeta)
ReportTraceEvent enqueues reported trace events for the Datadog reporter.
func (*DatadogReporter) Start ¶ added in v0.2.1
func (r *DatadogReporter) Start(mainCtx context.Context) error
Start sets up and manages the reporting connection to the Datadog Backend.
func (*DatadogReporter) Stop ¶
func (r *DatadogReporter) Stop()
Stop triggers a graceful shutdown of DatadogReporter.
func (*DatadogReporter) SupportsReportTraceEvent ¶
func (r *DatadogReporter) SupportsReportTraceEvent() bool
SupportsReportTraceEvent returns true if the reporter supports reporting trace events via ReportTraceEvent().
type DatadogSymbolQuerier ¶
type DatadogSymbolQuerier struct {
// contains filtered or unexported fields
}
func NewDatadogSymbolQuerier ¶
func NewDatadogSymbolQuerier(ddSite, ddAPIKey, ddAPPKey string) (*DatadogSymbolQuerier, error)
func (*DatadogSymbolQuerier) QuerySymbols ¶
func (d *DatadogSymbolQuerier) QuerySymbols(ctx context.Context, buildIDs []string, arch string) ([]SymbolFile, error)
type DatadogSymbolUploader ¶
type DatadogSymbolUploader struct {
// contains filtered or unexported fields
}
func NewDatadogSymbolUploader ¶
func NewDatadogSymbolUploader(cfg SymbolUploaderConfig) (*DatadogSymbolUploader, error)
func (*DatadogSymbolUploader) GetExistingSymbolsOnBackend ¶
func (d *DatadogSymbolUploader) GetExistingSymbolsOnBackend(ctx context.Context, e *executableMetadata) (SymbolSource, error)
func (*DatadogSymbolUploader) Run ¶
func (d *DatadogSymbolUploader) Run(ctx context.Context)
func (*DatadogSymbolUploader) UploadSymbols ¶
func (d *DatadogSymbolUploader) UploadSymbols(fileID libpf.FileID, filePath, buildID string, opener process.FileOpener)
type SymbolFile ¶
type SymbolSource ¶
type SymbolSource int64
const ( None SymbolSource = iota DynamicSymbolTable SymbolTable DebugInfo )
func NewSymbolSource ¶
func NewSymbolSource(s string) (SymbolSource, error)
func (SymbolSource) String ¶
func (s SymbolSource) String() string
type SymbolUploaderConfig ¶
type SymbolUploaderConfig struct { // Enabled defines whether the agent should upload debug symbols to the backend. Enabled bool // UploadDynamicSymbols defines whether the agent should upload dynamic symbols to the backend. UploadDynamicSymbols bool // DryRun defines whether the agent should upload debug symbols to the backend in dry-run mode. DryRun bool // DataDog API key APIKey string // DataDog APP key APPKey string // Site is the site to upload symbols to. Site string // Version is the version of the profiler. Version string }