diff --git a/README.md b/README.md index fabb8453e..af1294f97 100644 --- a/README.md +++ b/README.md @@ -136,11 +136,11 @@ spec: value: "none" - name: OTEL_LOGS_EXPORTER value: "none" - - name: OTEL_AWS_APP_SIGNALS_ENABLED + - name: OTEL_AWS_APPLICATION_SIGNALS_ENABLED value: "true" - name: OTEL_EXPORTER_OTLP_PROTOCOL value: "http/protobuf" - - name: OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT + - name: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics" EOF ``` diff --git a/integration-tests/java/default_instrumentation_java_env_variables.json b/integration-tests/java/default_instrumentation_java_env_variables.json index 911cf0d41..feb1a3f55 100644 --- a/integration-tests/java/default_instrumentation_java_env_variables.json +++ b/integration-tests/java/default_instrumentation_java_env_variables.json @@ -1,12 +1,12 @@ { - "OTEL_SMP_ENABLED": "true", "OTEL_AWS_APP_SIGNALS_ENABLED": "true", + "OTEL_AWS_APPLICATION_SIGNALS_ENABLED": "true", "OTEL_TRACES_SAMPLER_ARG": "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000", "OTEL_TRACES_SAMPLER": "xray", "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf", "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces", - "OTEL_AWS_SMP_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics", "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics", + "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics", "OTEL_METRICS_EXPORTER": "none", "OTEL_LOGS_EXPORTER": "none", "JAVA_TOOL_OPTIONS": "-javaagent:/otel-auto-instrumentation-java/javaagent.jar" diff --git a/integration-tests/manifests/cloudwatch-agent-daemonset.yaml b/integration-tests/manifests/cloudwatch-agent-daemonset.yaml index dd5655877..aaa35ebbc 100644 --- a/integration-tests/manifests/cloudwatch-agent-daemonset.yaml +++ b/integration-tests/manifests/cloudwatch-agent-daemonset.yaml @@ -15,12 +15,12 @@ spec: }, "traces": { "traces_collected": { - "app_signals": {} + "application_signals": {} } }, "logs": { "metrics_collected": { - "app_signals": {} + "application_signals": {} } } } diff --git a/integration-tests/python/default_instrumentation_python_env_variables.json b/integration-tests/python/default_instrumentation_python_env_variables.json index d1334ff71..43fc44622 100644 --- a/integration-tests/python/default_instrumentation_python_env_variables.json +++ b/integration-tests/python/default_instrumentation_python_env_variables.json @@ -2,11 +2,13 @@ { "PYTHONPATH": "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python", "OTEL_AWS_APP_SIGNALS_ENABLED": "true", + "OTEL_AWS_APPLICATION_SIGNALS_ENABLED": "true", "OTEL_TRACES_SAMPLER_ARG": "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000", "OTEL_TRACES_SAMPLER": "xray", "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf", "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces", "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics", + "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics", "OTEL_METRICS_EXPORTER": "none", "OTEL_LOGS_EXPORTER": "none", "OTEL_PYTHON_DISTRO": "aws_distro", diff --git a/internal/manifests/collector/configmap_test.go b/internal/manifests/collector/configmap_test.go index 84fa1e94c..a711e0a41 100644 --- a/internal/manifests/collector/configmap_test.go +++ b/internal/manifests/collector/configmap_test.go @@ -23,7 +23,7 @@ func TestDesiredConfigMap(t *testing.T) { expectedLables["app.kubernetes.io/version"] = "0.0.0" expectedData := map[string]string{ - "cwagentconfig.json": `{"logs":{"metrics_collected":{"app_signals":{},"kubernetes":{"enhanced_container_insights":true}}},"traces":{"traces_collected":{"app_signals":{}}}}`, + "cwagentconfig.json": `{"logs":{"metrics_collected":{"application_signals":{},"kubernetes":{"enhanced_container_insights":true}}},"traces":{"traces_collected":{"application_signals":{}}}}`, } param := deploymentParams() diff --git a/internal/manifests/collector/testdata/test.json b/internal/manifests/collector/testdata/test.json index 465b23e99..8f3b4974d 100644 --- a/internal/manifests/collector/testdata/test.json +++ b/internal/manifests/collector/testdata/test.json @@ -4,12 +4,12 @@ "kubernetes": { "enhanced_container_insights": true }, - "app_signals": { } + "application_signals": { } } }, "traces": { "traces_collected": { - "app_signals": { } + "application_signals": { } } } } \ No newline at end of file diff --git a/pkg/instrumentation/defaultinstrumentation.go b/pkg/instrumentation/defaultinstrumentation.go index fbdae8390..ccd73ff6b 100644 --- a/pkg/instrumentation/defaultinstrumentation.go +++ b/pkg/instrumentation/defaultinstrumentation.go @@ -63,14 +63,14 @@ func getDefaultInstrumentation(agentConfig *adapters.CwaConfig) (*v1alpha1.Instr Java: v1alpha1.Java{ Image: javaInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_SMP_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_SMP_EXPORTER_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_LOGS_EXPORTER", Value: "none"}, }, @@ -78,12 +78,14 @@ func getDefaultInstrumentation(agentConfig *adapters.CwaConfig) (*v1alpha1.Instr Python: v1alpha1.Python{ Image: pythonInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: exporterPrefix + "cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_PYTHON_DISTRO", Value: "aws_distro"}, {Name: "OTEL_PYTHON_CONFIGURATOR", Value: "aws_configurator"}, diff --git a/pkg/instrumentation/defaultinstrumentation_test.go b/pkg/instrumentation/defaultinstrumentation_test.go index b91affa9f..a3fe0b807 100644 --- a/pkg/instrumentation/defaultinstrumentation_test.go +++ b/pkg/instrumentation/defaultinstrumentation_test.go @@ -39,14 +39,14 @@ func Test_getDefaultInstrumentation(t *testing.T) { Java: v1alpha1.Java{ Image: defaultJavaInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_SMP_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_SMP_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_LOGS_EXPORTER", Value: "none"}, }, @@ -54,12 +54,14 @@ func Test_getDefaultInstrumentation(t *testing.T) { Python: v1alpha1.Python{ Image: defaultPythonInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_PYTHON_DISTRO", Value: "aws_distro"}, {Name: "OTEL_PYTHON_CONFIGURATOR", Value: "aws_configurator"}, @@ -88,14 +90,14 @@ func Test_getDefaultInstrumentation(t *testing.T) { Java: v1alpha1.Java{ Image: defaultJavaInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_SMP_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_SMP_EXPORTER_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_LOGS_EXPORTER", Value: "none"}, }, @@ -103,12 +105,14 @@ func Test_getDefaultInstrumentation(t *testing.T) { Python: v1alpha1.Python{ Image: defaultPythonInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: "https://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_PYTHON_DISTRO", Value: "aws_distro"}, {Name: "OTEL_PYTHON_CONFIGURATOR", Value: "aws_configurator"}, diff --git a/pkg/instrumentation/podmutator_test.go b/pkg/instrumentation/podmutator_test.go index 617482461..d2070f62c 100644 --- a/pkg/instrumentation/podmutator_test.go +++ b/pkg/instrumentation/podmutator_test.go @@ -51,14 +51,14 @@ func TestGetInstrumentationInstanceFromNameSpaceDefault(t *testing.T) { Java: v1alpha1.Java{ Image: defaultJavaInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_SMP_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_SMP_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_LOGS_EXPORTER", Value: "none"}, }, @@ -66,12 +66,14 @@ func TestGetInstrumentationInstanceFromNameSpaceDefault(t *testing.T) { Python: v1alpha1.Python{ Image: defaultPythonInstrumentationImage, Env: []corev1.EnvVar{ - {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, + {Name: "OTEL_AWS_APP_SIGNALS_ENABLED", Value: "true"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_ENABLED", Value: "true"}, {Name: "OTEL_TRACES_SAMPLER_ARG", Value: "endpoint=http://cloudwatch-agent.amazon-cloudwatch:2000"}, {Name: "OTEL_TRACES_SAMPLER", Value: "xray"}, {Name: "OTEL_EXPORTER_OTLP_PROTOCOL", Value: "http/protobuf"}, {Name: "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"}, - {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, + {Name: "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, //TODO: remove in favor of new name once safe + {Name: "OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT", Value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"}, {Name: "OTEL_METRICS_EXPORTER", Value: "none"}, {Name: "OTEL_PYTHON_DISTRO", Value: "aws_distro"}, {Name: "OTEL_PYTHON_CONFIGURATOR", Value: "aws_configurator"},