Documentation
¶
Index ¶
- Constants
- func ProcMetricsExporterProvider(ctxInfo *global.ContextInfo, cfg *ProcMetricsConfig, ...) swarm.InstanceFunc
- func ResolveOTLPEndpoint(endpoint, common string, grafana *GrafanaOTLP) (string, bool)
- func SurveyInfoMetrics(ctxInfo *global.ContextInfo, cfg *otel.MetricsConfig, ...) swarm.InstanceFunc
- type GrafanaConfig
- type GrafanaOTLP
- type ProcMetricsConfig
- type SurveyMetricsReporter
Constants ¶
const ( SurveyInfo = "survey_info" FeatureProcess = "application_process" ReporterName = "github.com/grafana/beyla" )
Variables ¶
This section is empty.
Functions ¶
func ProcMetricsExporterProvider ¶
func ProcMetricsExporterProvider( ctxInfo *global.ContextInfo, cfg *ProcMetricsConfig, input *msg.Queue[[]*process.Status], ) swarm.InstanceFunc
func ResolveOTLPEndpoint ¶ added in v2.1.0
func ResolveOTLPEndpoint(endpoint, common string, grafana *GrafanaOTLP) (string, bool)
ResolveOTLPEndpoint returns the OTLP endpoint, defined from one of the following sources, from highest to lowest priority - OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, if defined - OTEL_EXPORTER_OTLP_ENDPOINT, if defined - https://otlp-gateway-${GRAFANA_CLOUD_ZONE}.grafana.net/otlp, if GRAFANA_CLOUD_ZONE is defined If, by some reason, Grafana changes its OTLP Gateway URL in a distant future, you can still point to the correct URL with the OTLP_EXPORTER_... variables. Returns true if the endpoint is common for both traces and metrics.
func SurveyInfoMetrics ¶ added in v2.5.1
func SurveyInfoMetrics( ctxInfo *global.ContextInfo, cfg *otel.MetricsConfig, processEventCh *msg.Queue[exec.ProcessEvent], ) swarm.InstanceFunc
Types ¶
type GrafanaConfig ¶
type GrafanaConfig struct { // OTLP endpoint from Grafana Cloud. OTLP GrafanaOTLP `yaml:"otlp"` }
GrafanaConfig simplifies the submission of information to Grafana Cloud, but it can be actually used for any OTEL endpoint, as it uses the standard OTEL authentication under the hood
type GrafanaOTLP ¶
type GrafanaOTLP struct { // Submit accepts a comma-separated list of the kind of data that will be submitted to the // OTLP endpoint. It accepts `metrics` and/or `traces` as values. Submit []string `yaml:"cloud_submit" env:"GRAFANA_CLOUD_SUBMIT"` // CloudZone of your Grafana Endpoint. For example: prod-eu-west-0. CloudZone string `yaml:"cloud_zone" env:"GRAFANA_CLOUD_ZONE"` // InstanceID is your Grafana user name. It is usually a number but it must be set as a // string inside the YAML file. InstanceID string `yaml:"cloud_instance_id" env:"GRAFANA_CLOUD_INSTANCE_ID"` // APIKey of your Grafana Cloud account. APIKey string `yaml:"cloud_api_key" env:"GRAFANA_CLOUD_API_KEY"` }
func (*GrafanaOTLP) Endpoint ¶
func (cfg *GrafanaOTLP) Endpoint() string
func (*GrafanaOTLP) MetricsEnabled ¶
func (cfg *GrafanaOTLP) MetricsEnabled() bool
func (*GrafanaOTLP) OverrideHeaders ¶ added in v2.5.1
func (cfg *GrafanaOTLP) OverrideHeaders(dst map[string]string)
func (*GrafanaOTLP) TracesEnabled ¶
func (cfg *GrafanaOTLP) TracesEnabled() bool
type ProcMetricsConfig ¶
type ProcMetricsConfig struct { Metrics *obiotel.MetricsConfig SelectorCfg *attributes.SelectorConfig }
ProcMetricsConfig extends MetricsConfig for process metrics
func (*ProcMetricsConfig) Enabled ¶
func (mc *ProcMetricsConfig) Enabled() bool
type SurveyMetricsReporter ¶ added in v2.5.1
type SurveyMetricsReporter struct {
// contains filtered or unexported fields
}