@@ -53,12 +53,6 @@ var DefaultConfig = Config{
5353 ContextPropagationEnabled : false ,
5454 ContextPropagation : config .ContextPropagationDisabled ,
5555 },
56- Grafana : otel.GrafanaConfig {
57- OTLP : otel.GrafanaOTLP {
58- // by default we will only submit traces, assuming span2metrics will do the metrics conversion
59- Submit : []string {"traces" },
60- },
61- },
6256 NameResolver : & transform.NameResolverConfig {
6357 Sources : []string {"k8s" },
6458 CacheLen : 1024 ,
@@ -142,10 +136,6 @@ type Config struct {
142136 // NetworkFlows configuration for Network Observability feature
143137 NetworkFlows NetworkConfig `yaml:"network"`
144138
145- // Grafana overrides some values of the otel.MetricsConfig and otel.TracesConfig below
146- // for a simpler submission of OTEL metrics to Grafana Cloud
147- Grafana otel.GrafanaConfig `yaml:"grafana"`
148-
149139 Filters filter.AttributesConfig `yaml:"filter"`
150140
151141 Attributes Attributes `yaml:"attributes"`
@@ -270,10 +260,10 @@ func (c *Config) Validate() error {
270260 return ConfigError ("OTEL_EBPF_KUBE_INFORMERS_SYNC_TIMEOUT duration must be greater than 0s" )
271261 }
272262
273- if c .Enabled (FeatureNetO11y ) && ! c .Grafana . OTLP . MetricsEnabled () && ! c . Metrics .Enabled () &&
263+ if c .Enabled (FeatureNetO11y ) && ! c .Metrics .Enabled () &&
274264 ! c .Prometheus .Enabled () && ! c .NetworkFlows .Print {
275265 return ConfigError ("enabling network metrics requires to enable at least the OpenTelemetry" +
276- " metrics exporter: grafana, otel_metrics_export or prometheus_export sections in the YAML configuration file; or the" +
266+ " metrics exporter: otel_metrics_export or prometheus_export sections in the YAML configuration file; or the" +
277267 " OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_METRICS_ENDPOINT or OTEL_EBPF_PROMETHEUS_PORT environment variables. For debugging" +
278268 " purposes, you can also set OTEL_EBPF_NETWORK_PRINT_FLOWS=true" )
279269 }
@@ -283,11 +273,10 @@ func (c *Config) Validate() error {
283273 }
284274
285275 if c .Enabled (FeatureAppO11y ) && ! c .TracePrinter .Enabled () &&
286- ! c .Grafana .OTLP .MetricsEnabled () && ! c .Grafana .OTLP .TracesEnabled () &&
287276 ! c .Metrics .Enabled () && ! c .Traces .Enabled () &&
288277 ! c .Prometheus .Enabled () && ! c .TracePrinter .Enabled () {
289278 return ConfigError ("you need to define at least one exporter: trace_printer," +
290- " grafana, otel_metrics_export, otel_traces_export or prometheus_export" )
279+ " otel_metrics_export, otel_traces_export or prometheus_export" )
291280 }
292281
293282 if len (c .Routes .WildcardChar ) > 1 {
@@ -297,7 +286,7 @@ func (c *Config) Validate() error {
297286 if c .InternalMetrics .Exporter == imetrics .InternalMetricsExporterOTEL && c .InternalMetrics .Prometheus .Port != 0 {
298287 return ConfigError ("you can't enable both OTEL and Prometheus internal metrics" )
299288 }
300- if c .InternalMetrics .Exporter == imetrics .InternalMetricsExporterOTEL && ! c .Metrics .Enabled () && ! c . Grafana . OTLP . MetricsEnabled () {
289+ if c .InternalMetrics .Exporter == imetrics .InternalMetricsExporterOTEL && ! c .Metrics .Enabled () {
301290 return ConfigError ("you can't enable OTEL internal metrics without enabling OTEL metrics" )
302291 }
303292
@@ -309,7 +298,7 @@ func (c *Config) promNetO11yEnabled() bool {
309298}
310299
311300func (c * Config ) otelNetO11yEnabled () bool {
312- return ( c .Metrics .Enabled () || c . Grafana . OTLP . MetricsEnabled () ) && c .Metrics .NetworkMetricsEnabled ()
301+ return c .Metrics .Enabled () && c .Metrics .NetworkMetricsEnabled ()
313302}
314303
315304func (c * Config ) willUseTC () bool {
0 commit comments