Documentation
¶
Index ¶
- Variables
- func CheckObjcopyZstdSupport() bool
- func CopySymbols(ctx context.Context, inputPath, outputPath string, ...) error
- type Config
- type DatadogReporter
- func (r *DatadogReporter) ExecutableKnown(fileID libpf.FileID) bool
- func (r *DatadogReporter) ExecutableMetadata(args *reporter.ExecutableMetadataArgs)
- func (r *DatadogReporter) ReportHostMetadata(_ map[string]string)
- func (r *DatadogReporter) ReportHostMetadataBlocking(_ context.Context, _ map[string]string, _ int, _ time.Duration) error
- func (r *DatadogReporter) ReportTraceEvent(trace *libpf.Trace, meta *samples.TraceEventMeta) error
- func (r *DatadogReporter) Start(mainCtx context.Context) error
- func (r *DatadogReporter) Stop()
- type DatadogSymbolUploader
- type ElfWithBackendSources
- type SymbolEndpoint
- type SymbolFile
- type SymbolQuerier
- type SymbolQueryBatch
- type SymbolQueryResult
- type SymbolUploaderConfig
- type SymbolsQueryRequest
- type Tag
- type Tags
Constants ¶
This section is empty.
Variables ¶
View Source
var ServiceNameEnvVars = []string{"DD_SERVICE", "OTEL_SERVICE_NAME"}
Functions ¶
func CheckObjcopyZstdSupport ¶ added in v0.2.3
func CheckObjcopyZstdSupport() bool
func CopySymbols ¶ added in v0.2.2
func CopySymbols(ctx context.Context, inputPath, outputPath string, goPCLnTabInfo *pclntab.GoPCLnTabInfo, sectionsToKeep []symbol.SectionInfo, compressDebugSections bool) error
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
// 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
// EnableSplitByService defines whether the agent should split profiles by service.
EnableSplitByService bool
// SplitServiceSuffix defines the suffix to add to service name in profiles when split-by-service is enabled.
SplitServiceSuffix string
// HostServiceName defines the service name to use in profiles (in non-split-by-service mode).
HostServiceName 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) 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) ReportTraceEvent ¶
func (r *DatadogReporter) ReportTraceEvent(trace *libpf.Trace, meta *samples.TraceEventMeta) error
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.
type DatadogSymbolUploader ¶
type DatadogSymbolUploader struct {
// contains filtered or unexported fields
}
func NewDatadogSymbolUploader ¶
func NewDatadogSymbolUploader(cfg *SymbolUploaderConfig) (*DatadogSymbolUploader, error)
func (*DatadogSymbolUploader) Start ¶ added in v0.2.2
func (d *DatadogSymbolUploader) Start(ctx context.Context)
func (*DatadogSymbolUploader) Stop ¶ added in v0.2.2
func (d *DatadogSymbolUploader) Stop()
func (*DatadogSymbolUploader) UploadSymbols ¶
func (d *DatadogSymbolUploader) UploadSymbols(fileID libpf.FileID, filePath, buildID string, opener process.FileOpener)
type ElfWithBackendSources ¶ added in v0.2.2
type ElfWithBackendSources struct {
*symbol.Elf
BackendSymbolSources []SymbolQueryResult
}
func ExecuteSymbolQueryBatch ¶ added in v0.2.2
func ExecuteSymbolQueryBatch(ctx context.Context, batch SymbolQueryBatch, queriers []SymbolQuerier) []ElfWithBackendSources
type SymbolEndpoint ¶ added in v0.2.2
type SymbolFile ¶
type SymbolQuerier ¶ added in v0.2.2
type SymbolQuerier interface {
QuerySymbols(ctx context.Context, buildIDs []string, arch string) ([]SymbolFile, error)
}
func NewDatadogSymbolQuerier ¶
func NewDatadogSymbolQuerier(ddSite, ddAPIKey, ddAPPKey string) (SymbolQuerier, error)
type SymbolQueryBatch ¶ added in v0.2.2
type SymbolQueryResult ¶ added in v0.2.2
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
// UploadGoPCLnTab defines whether the agent should upload GoPCLnTab section for Go binaries to the backend.
UploadGoPCLnTab bool
// UseHTTP2 defines whether the agent should use HTTP/2 when uploading symbols.
UseHTTP2 bool
// SymbolQueryInterval defines the interval at which the agent should query the backend for symbols. A value of 0 disables batching.
SymbolQueryInterval time.Duration
// DisableDebugSectionCompression defines whether the uploader should disable debug section compression whatever objcopy supports.
DisableDebugSectionCompression bool
// DryRun defines whether the agent should upload debug symbols to the backend in dry-run mode.
DryRun bool
// Sites to upload symbols to.
SymbolEndpoints []SymbolEndpoint
// Version is the version of the profiler.
Version string
}
type SymbolsQueryRequest ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.