Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelsByProfiles ¶
LabelsByProfiles returns the labels for a given ProfilingConfig.
Types ¶
type Agent ¶
type Agent struct { agentv1.UnimplementedAgentServiceServer Config *Config services.Service // contains filtered or unexported fields }
func (*Agent) ActiveTargets ¶
func (*Agent) ConnectHandler ¶
func (a *Agent) ConnectHandler() agentv1connect.AgentServiceHandler
func (*Agent) DroppedTargets ¶
func (*Agent) GetTargets ¶
func (a *Agent) GetTargets(ctx context.Context, req *agentv1.GetTargetsRequest) (*agentv1.GetTargetsResponse, error)
type ClientConfig ¶
type ClientConfig struct { URL flagext.URLValue BatchWait time.Duration BatchSize int Client commonconfig.HTTPClientConfig `yaml:",inline"` // The tenant ID to use when pushing profiles to Phlare (default to anonymous). TenantID string `yaml:"tenant_id"` }
func (*ClientConfig) RegisterFlagsWithPrefix ¶
func (c *ClientConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
RegisterFlags with prefix registers flags where every name is prefixed by prefix. If prefix is a non-empty string, prefix should end with a period.
func (*ClientConfig) Validate ¶
func (c *ClientConfig) Validate() error
type Config ¶
type Config struct { ScrapeConfigs []*ScrapeConfig `yaml:"scrape_configs,omitempty"` ClientConfig ClientConfig `yaml:"client,omitempty"` }
func (*Config) RegisterFlags ¶
RegisterFlags registers flags.
type PusherClientProvider ¶
type PusherClientProvider func() pushv1connect.PusherServiceClient
type ScrapeConfig ¶
type ScrapeConfig struct { JobName string `yaml:"job_name"` Params url.Values `yaml:"params,omitempty"` ScrapeInterval model.Duration `yaml:"scrape_interval,omitempty"` ScrapeTimeout model.Duration `yaml:"scrape_timeout,omitempty"` Scheme string `yaml:"scheme,omitempty"` RelabelConfigs []*relabel.Config `yaml:"relabel_configs,omitempty"` ServiceDiscoveryConfig ServiceDiscoveryConfig `yaml:",inline"` ProfilingConfig *parcaconfig.ProfilingConfig `yaml:"profiling_config,omitempty"` HTTPClientConfig commonconfig.HTTPClientConfig `yaml:",inline"` }
func (*ScrapeConfig) Validate ¶
func (c *ScrapeConfig) Validate() error
type ServiceDiscoveryConfig ¶
type ServiceDiscoveryConfig struct { StaticConfigs discovery.StaticConfig `yaml:"static_configs"` KubernetesSDConfigs []*kubernetes.SDConfig `yaml:"kubernetes_sd_configs,omitempty"` HTTPSDConfigs []*http.SDConfig `yaml:"http_sd_configs,omitempty"` }
func (ServiceDiscoveryConfig) Configs ¶
func (cfg ServiceDiscoveryConfig) Configs() (res discovery.Configs)
type Target ¶
func (*Target) LastScrape ¶
LastScrape returns the time of the last scrape.
func (*Target) LastScrapeDuration ¶
LastScrapeDuration returns how long the last scrape of the target took.
type TargetGroup ¶
type TargetGroup struct {
// contains filtered or unexported fields
}
func NewTargetGroup ¶
func NewTargetGroup(ctx context.Context, jobName string, cfg ScrapeConfig, pusherClientProvider PusherClientProvider, tenantID string, logger log.Logger) *TargetGroup
func (*TargetGroup) TargetsFromGroup ¶ added in v0.6.0
func (tg *TargetGroup) TargetsFromGroup(group *targetgroup.Group) ([]*Target, []*Target, error)
TargetsFromGroup builds targets based on the given TargetGroup and config.
type TargetManager ¶
Click to show internal directories.
Click to hide internal directories.