Skip to content

Commit 74b183d

Browse files
committed
add debug exporter
1 parent e16963e commit 74b183d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

translator/translate/otel/pipeline/host/translator.go

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package host
55

66
import (
77
"fmt"
8+
"github.com/aws/amazon-cloudwatch-agent/translator/translate/otel/exporter/debug"
89
"log"
910
"slices"
1011
"strings"
@@ -109,6 +110,9 @@ func (t translator) Translate(conf *confmap.Conf) (*common.ComponentTranslators,
109110
if currentContext.KubernetesMode() != "" {
110111
translators.Processors.Set(k8sattributesprocessor.NewTranslatorWithName(t.name))
111112
entityProcessor = awsentity.NewTranslatorWithEntityType(awsentity.Service, common.OtlpKey, false)
113+
if enabled, _ := common.GetBool(conf, common.AgentDebugConfigKey); enabled {
114+
translators.Exporters.Set(debug.NewTranslator(common.WithName(t.name)))
115+
}
112116
}
113117
case common.PipelineNameHostCustomMetrics:
114118
if !currentContext.RunInContainer() {

0 commit comments

Comments
 (0)