@@ -729,9 +729,9 @@ func TestFromAgentConfigDebug(t *testing.T) {
729729 err string
730730 }{
731731 {
732- // A debug section with no verbosity does not enable the debug exporter:
733- // only an explicit non-"none" verbosity attaches it .
734- path : "debug/empty_but_set_debug .yaml" ,
732+ // A fully absent debug section leaves the exporter detached: verbosity is
733+ // never populated, so no per-batch debug logs are emitted by default .
734+ path : "debug/absent_debug .yaml" ,
735735 shouldSet : false ,
736736 cfg : PipelineConfig {
737737 OTLPReceiverConfig : map [string ]interface {}{},
@@ -752,6 +752,31 @@ func TestFromAgentConfigDebug(t *testing.T) {
752752 MetricsBatch : map [string ]interface {}{},
753753 },
754754 },
755+ {
756+ // Explicitly declaring the debug section without a verbosity attaches the
757+ // debug exporter using the default verbosity ("basic"). Only a fully absent
758+ // debug section or an explicit "none" leaves the exporter detached.
759+ path : "debug/empty_but_set_debug.yaml" ,
760+ shouldSet : true ,
761+ cfg : PipelineConfig {
762+ OTLPReceiverConfig : map [string ]interface {}{},
763+ TracePort : 5003 ,
764+ MetricsEnabled : true ,
765+ TracesEnabled : true ,
766+ LogsEnabled : false ,
767+ TracesInfraAttributesEnabled : true ,
768+ TracesContainerTagPromotion : "off" ,
769+ Logs : map [string ]interface {}{},
770+ Debug : map [string ]interface {}{"verbosity" : "basic" },
771+ Metrics : map [string ]interface {}{
772+ "enabled" : true ,
773+ "tag_cardinality" : "low" ,
774+ "apm_stats_receiver_addr" : "http://localhost:8126/v0.6/stats" ,
775+ "instrumentation_scope_metadata_as_tags" : true ,
776+ },
777+ MetricsBatch : map [string ]interface {}{},
778+ },
779+ },
755780 {
756781 path : "debug/verbosity_detailed.yaml" ,
757782 shouldSet : true ,
0 commit comments