Skip to content

Commit 20199f8

Browse files
mitali-salviokankoAMZ
authored andcommitted
Supporting JMX annotations (aws#240)
1 parent 03aabdc commit 20199f8

File tree

10 files changed

+527
-73
lines changed

10 files changed

+527
-73
lines changed

internal/manifests/collector/adapters/config_from.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type Traces struct {
5858
type MetricsCollected struct {
5959
StatsD *statsD `json:"statsd,omitempty"`
6060
CollectD *collectD `json:"collectd,omitempty"`
61+
JMX *jmx `json:"jmx,omitempty"`
6162
}
6263

6364
type LogMetricsCollected struct {
@@ -86,9 +87,13 @@ type AppSignals struct {
8687

8788
type emf struct {
8889
}
90+
91+
type jmx struct{}
92+
8993
type kubernetes struct {
9094
EnhancedContainerInsights bool `json:"enhanced_container_insights,omitempty"`
9195
AcceleratedComputeMetrics bool `json:"accelerated_compute_metrics,omitempty"`
96+
JMXContainerInsights bool `json:"jmx_container_insights,omitempty"`
9297
}
9398

9499
type xray struct {

internal/manifests/collector/ports.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ const (
3636
EMFTcp = "emf-tcp"
3737
EMFUdp = "emf-udp"
3838
CWA = "cwa-"
39+
JmxHttp = "jmx-http"
3940
)
4041

4142
var receiverDefaultPortsMap = map[string]int32{
4243
StatsD: 8125,
4344
CollectD: 25826,
4445
XrayTraces: 2000,
46+
JmxHttp: 4314,
4547
OtlpGrpc: 4317,
4648
OtlpHttp: 4318,
4749
EMF: 25888,
@@ -142,6 +144,9 @@ func getMetricsReceiversServicePorts(logger logr.Logger, config *adapters.CwaCon
142144
if config.Metrics.MetricsCollected.CollectD != nil {
143145
getReceiverServicePort(logger, config.Metrics.MetricsCollected.CollectD.ServiceAddress, CollectD, corev1.ProtocolUDP, servicePortsMap)
144146
}
147+
if config.Metrics.MetricsCollected.JMX != nil {
148+
getReceiverServicePort(logger, "", JmxHttp, corev1.ProtocolTCP, servicePortsMap)
149+
}
145150
}
146151

147152
func getReceiverServicePort(logger logr.Logger, serviceAddress string, receiverName string, protocol corev1.Protocol, servicePortsMap map[int32][]corev1.ServicePort) {
@@ -194,6 +199,20 @@ func getLogsReceiversServicePorts(logger logr.Logger, config *adapters.CwaConfig
194199
servicePortsMap[receiverDefaultPortsMap[EMF]] = []corev1.ServicePort{tcp, udp}
195200
}
196201
}
202+
203+
//JMX Container Insights
204+
if config.Logs != nil && config.Logs.LogMetricsCollected != nil && config.Logs.LogMetricsCollected.Kubernetes != nil && config.Logs.LogMetricsCollected.Kubernetes.JMXContainerInsights {
205+
if _, ok := servicePortsMap[receiverDefaultPortsMap[JmxHttp]]; ok {
206+
logger.Info("Duplicate port has been configured in Agent Config for port", zap.Int32("port", receiverDefaultPortsMap[JmxHttp]))
207+
} else {
208+
tcp := corev1.ServicePort{
209+
Name: JmxHttp,
210+
Port: receiverDefaultPortsMap[JmxHttp],
211+
Protocol: corev1.ProtocolTCP,
212+
}
213+
servicePortsMap[receiverDefaultPortsMap[JmxHttp]] = []corev1.ServicePort{tcp}
214+
}
215+
}
197216
}
198217

199218
func getTracesReceiversServicePorts(logger logr.Logger, config *adapters.CwaConfig, servicePortsMap map[int32][]corev1.ServicePort) []corev1.ServicePort {

internal/manifests/collector/ports_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,24 @@ func TestInvalidConfigGetContainerPorts(t *testing.T) {
203203

204204
}
205205

206+
func TestJMXGetContainerPorts(t *testing.T) {
207+
cfg := getJSONStringFromFile("./test-resources/jmxAgentConfig.json")
208+
containerPorts := getContainerPorts(logger, cfg, []corev1.ServicePort{})
209+
assert.Equal(t, 1, len(containerPorts))
210+
assert.Equal(t, int32(4314), containerPorts[JmxHttp].ContainerPort)
211+
assert.Equal(t, JmxHttp, containerPorts[JmxHttp].Name)
212+
assert.Equal(t, corev1.ProtocolTCP, containerPorts[JmxHttp].Protocol)
213+
}
214+
215+
func TestJMXContainerInsightsGetContainerPorts(t *testing.T) {
216+
cfg := getJSONStringFromFile("./test-resources/jmxContainerInsightsConfig.json")
217+
containerPorts := getContainerPorts(logger, cfg, []corev1.ServicePort{})
218+
assert.Equal(t, 1, len(containerPorts))
219+
assert.Equal(t, int32(4314), containerPorts[JmxHttp].ContainerPort)
220+
assert.Equal(t, JmxHttp, containerPorts[JmxHttp].Name)
221+
assert.Equal(t, corev1.ProtocolTCP, containerPorts[JmxHttp].Protocol)
222+
}
223+
206224
func getJSONStringFromFile(path string) string {
207225
buf, err := os.ReadFile(path)
208226
if err != nil {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"metrics": {
3+
"metrics_collected": {
4+
"jmx": {
5+
}
6+
}
7+
}
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"logs": {
3+
"metrics_collected": {
4+
"kubernetes": {
5+
"cluster_name": "TestCluster",
6+
"jmx_container_insights": true
7+
}
8+
}
9+
}
10+
}

pkg/instrumentation/defaultinstrumentation.go

Lines changed: 106 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
"github.com/aws/amazon-cloudwatch-agent-operator/apis/v1alpha1"
1616
"github.com/aws/amazon-cloudwatch-agent-operator/internal/manifests/collector/adapters"
17+
"github.com/aws/amazon-cloudwatch-agent-operator/pkg/instrumentation/jmx"
1718
)
1819

1920
const (
@@ -49,7 +50,7 @@ func getInstrumentationConfigForResource(langStr string, resourceStr string) cor
4950
return instrumentationConfigForResource
5051
}
5152

52-
func getDefaultInstrumentation(agentConfig *adapters.CwaConfig, isWindowsPod bool) (*v1alpha1.Instrumentation, error) {
53+
func getDefaultInstrumentation(agentConfig *adapters.CwaConfig, additionalEnvs map[Type]map[string]string, isWindowsPod bool) (*v1alpha1.Instrumentation, error) {
5354
javaInstrumentationImage, ok := os.LookupEnv("AUTO_INSTRUMENTATION_JAVA")
5455
if !ok {
5556
return nil, errors.New("unable to determine java instrumentation image")
@@ -76,9 +77,10 @@ func getDefaultInstrumentation(agentConfig *adapters.CwaConfig, isWindowsPod boo
7677

7778
// set protocol by checking cloudwatch agent config for tls setting
7879
exporterPrefix := http
79-
if agentConfig != nil {
80-
appSignalsConfig := agentConfig.GetApplicationSignalsConfig()
81-
if appSignalsConfig != nil && appSignalsConfig.TLS != nil {
80+
isApplicationSignalsEnabled := agentConfig != nil && agentConfig.GetApplicationSignalsConfig() != nil
81+
82+
if isApplicationSignalsEnabled {
83+
if agentConfig.GetApplicationSignalsConfig().TLS != nil {
8284
exporterPrefix = https
8385
}
8486
}
@@ -102,77 +104,31 @@ func getDefaultInstrumentation(agentConfig *adapters.CwaConfig, isWindowsPod boo
102104
},
103105
Java: v1alpha1.Java{
104106
Image: javaInstrumentationImage,
105-
Env: []corev1.EnvVar{
106-
{Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe
107-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
108-
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", http, cloudwatchAgentServiceEndpoint)},
109-
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
110-
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
111-
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
112-
{Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)}, //TODO: remove in favor of new name once safe
113-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
114-
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
115-
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
116-
},
107+
Env: getJavaEnvs(isApplicationSignalsEnabled, cloudwatchAgentServiceEndpoint, exporterPrefix, additionalEnvs[TypeJava]),
117108
Resources: corev1.ResourceRequirements{
118109
Limits: getInstrumentationConfigForResource(java, limit),
119110
Requests: getInstrumentationConfigForResource(java, request),
120111
},
121112
},
122113
Python: v1alpha1.Python{
123114
Image: pythonInstrumentationImage,
124-
Env: []corev1.EnvVar{
125-
{Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe
126-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
127-
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", http, cloudwatchAgentServiceEndpoint)},
128-
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
129-
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
130-
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
131-
{Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)}, //TODO: remove in favor of new name once safe
132-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
133-
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
134-
{Name: "OTEL_PYTHON_DISTRO", Value: "aws_distro"},
135-
{Name: "OTEL_PYTHON_CONFIGURATOR", Value: "aws_configurator"},
136-
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
137-
},
115+
Env: getPythonEnvs(isApplicationSignalsEnabled, cloudwatchAgentServiceEndpoint, exporterPrefix, additionalEnvs[TypePython]),
138116
Resources: corev1.ResourceRequirements{
139117
Limits: getInstrumentationConfigForResource(python, limit),
140118
Requests: getInstrumentationConfigForResource(python, request),
141119
},
142120
},
143121
DotNet: v1alpha1.DotNet{
144122
Image: dotNetInstrumentationImage,
145-
Env: []corev1.EnvVar{
146-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
147-
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", http, cloudwatchAgentServiceEndpoint)},
148-
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
149-
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
150-
{Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316", exporterPrefix, cloudwatchAgentServiceEndpoint)},
151-
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
152-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
153-
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
154-
{Name: "OTEL_DOTNET_DISTRO", Value: "aws_distro"},
155-
{Name: "OTEL_DOTNET_CONFIGURATOR", Value: "aws_configurator"},
156-
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
157-
{Name: "OTEL_DOTNET_AUTO_PLUGINS", Value: "AWS.Distro.OpenTelemetry.AutoInstrumentation.Plugin, AWS.Distro.OpenTelemetry.AutoInstrumentation"},
158-
},
123+
Env: getDotNetEnvs(isApplicationSignalsEnabled, cloudwatchAgentServiceEndpoint, exporterPrefix, additionalEnvs[TypeDotNet]),
159124
Resources: corev1.ResourceRequirements{
160125
Limits: getInstrumentationConfigForResource(dotNet, limit),
161126
Requests: getInstrumentationConfigForResource(dotNet, request),
162127
},
163128
},
164129
NodeJS: v1alpha1.NodeJS{
165130
Image: nodeJSInstrumentationImage,
166-
Env: []corev1.EnvVar{
167-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
168-
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", exporterPrefix, cloudwatchAgentServiceEndpoint)},
169-
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
170-
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
171-
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
172-
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
173-
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
174-
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
175-
},
131+
Env: getNodeJSEnvs(isApplicationSignalsEnabled, cloudwatchAgentServiceEndpoint, exporterPrefix, additionalEnvs[TypeDotNet]),
176132
Resources: corev1.ResourceRequirements{
177133
Limits: getInstrumentationConfigForResource(nodeJS, limit),
178134
Requests: getInstrumentationConfigForResource(nodeJS, request),
@@ -181,3 +137,99 @@ func getDefaultInstrumentation(agentConfig *adapters.CwaConfig, isWindowsPod boo
181137
},
182138
}, nil
183139
}
140+
141+
func getJavaEnvs(isAppSignalsEnabled bool, cloudwatchAgentServiceEndpoint, exporterPrefix string, additionalEnvs map[string]string) []corev1.EnvVar {
142+
envs := []corev1.EnvVar{
143+
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
144+
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
145+
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
146+
}
147+
148+
if isAppSignalsEnabled {
149+
appSignalsEnvs := []corev1.EnvVar{
150+
{Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe
151+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
152+
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", http, cloudwatchAgentServiceEndpoint)},
153+
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
154+
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
155+
{Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)}, //TODO: remove in favor of new name once safe
156+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
157+
}
158+
envs = append(envs, appSignalsEnvs...)
159+
} else {
160+
envs = append(envs, corev1.EnvVar{
161+
Name: "OTEL_TRACES_EXPORTER", Value: "none",
162+
})
163+
}
164+
165+
var jmxEnvs []corev1.EnvVar
166+
if targetSystems, ok := additionalEnvs[jmx.EnvTargetSystem]; ok {
167+
jmxEnvs = []corev1.EnvVar{
168+
{Name: "OTEL_AWS_JMX_EXPORTER_METRICS_ENDPOINT", Value: fmt.Sprintf("%s://%s:4314/v1/metrics", http, cloudwatchAgentServiceEndpoint)},
169+
{Name: "OTEL_JMX_TARGET_SYSTEM", Value: targetSystems},
170+
}
171+
}
172+
if len(jmxEnvs) != 0 {
173+
envs = append(envs, jmxEnvs...)
174+
}
175+
return envs
176+
}
177+
178+
func getPythonEnvs(isAppSignalsEnabled bool, cloudwatchAgentServiceEndpoint, exporterPrefix string, additionalEnvs map[string]string) []corev1.EnvVar {
179+
var envs []corev1.EnvVar
180+
if isAppSignalsEnabled {
181+
envs = []corev1.EnvVar{
182+
{Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe
183+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
184+
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", http, cloudwatchAgentServiceEndpoint)},
185+
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
186+
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
187+
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
188+
{Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)}, //TODO: remove in favor of new name once safe
189+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
190+
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
191+
{Name: "OTEL_PYTHON_DISTRO", Value: "aws_distro"},
192+
{Name: "OTEL_PYTHON_CONFIGURATOR", Value: "aws_configurator"},
193+
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
194+
}
195+
}
196+
return envs
197+
}
198+
199+
func getDotNetEnvs(isAppSignalsEnabled bool, cloudwatchAgentServiceEndpoint, exporterPrefix string, additionalEnvs map[string]string) []corev1.EnvVar {
200+
var envs []corev1.EnvVar
201+
if isAppSignalsEnabled {
202+
envs = []corev1.EnvVar{
203+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
204+
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", http, cloudwatchAgentServiceEndpoint)},
205+
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
206+
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
207+
{Name: "OTEL_EXPORTER_OTLP_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316", exporterPrefix, cloudwatchAgentServiceEndpoint)},
208+
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
209+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
210+
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
211+
{Name: "OTEL_DOTNET_DISTRO", Value: "aws_distro"},
212+
{Name: "OTEL_DOTNET_CONFIGURATOR", Value: "aws_configurator"},
213+
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
214+
{Name: "OTEL_DOTNET_AUTO_PLUGINS", Value: "AWS.Distro.OpenTelemetry.AutoInstrumentation.Plugin, AWS.Distro.OpenTelemetry.AutoInstrumentation"},
215+
}
216+
}
217+
return envs
218+
}
219+
220+
func getNodeJSEnvs(isAppSignalsEnabled bool, cloudwatchAgentServiceEndpoint, exporterPrefix string, additionalEnvs map[string]string) []corev1.EnvVar {
221+
var envs []corev1.EnvVar
222+
if isAppSignalsEnabled {
223+
envs = []corev1.EnvVar{
224+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"},
225+
{Name: "OTEL_TRACES_SAMPLER_ARG", Value: fmt.Sprintf("endpoint=%s://%s:2000", exporterPrefix, cloudwatchAgentServiceEndpoint)},
226+
{Name: "OTEL_TRACES_SAMPLER", Value: "xray"},
227+
{Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"},
228+
{Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/traces", exporterPrefix, cloudwatchAgentServiceEndpoint)},
229+
{Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: fmt.Sprintf("%s://%s:4316/v1/metrics", exporterPrefix, cloudwatchAgentServiceEndpoint)},
230+
{Name: "OTEL_METRICS_EXPORTER", Value: "none"},
231+
{Name: "OTEL_LOGS_EXPORTER", Value: "none"},
232+
}
233+
}
234+
return envs
235+
}

0 commit comments

Comments
 (0)