Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AppSignals configuration: 1) disable Logs exporter; 2) use http endpoint #94

Merged
merged 5 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ metadata:
namespace: default # use a namespace with pods you'd like to inject
spec:
exporter:
endpoint: http://cloudwatch-agent.amazon-cloudwatch:4315
endpoint: http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics
propagators:
- tracecontext
- baggage
Expand All @@ -134,10 +134,14 @@ spec:
env:
- name: OTEL_METRICS_EXPORTER
value: "none"
- name: OTEL_LOGS_EXPORTER
value: "none"
- name: OTEL_AWS_APP_SIGNALS_ENABLED
value: "true"
- name: OTEL_EXPORTER_OTLP_PROTOCOL
value: "http/protobuf"
- name: OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT
value: "http://cloudwatch-agent.amazon-cloudwatch:4315"
value: "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"
EOF
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"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:4315",
"OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4315",
"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_METRICS_EXPORTER": "none",
"OTEL_LOGS_EXPORTER": "none",
"JAVA_TOOL_OPTIONS": "-javaagent:/otel-auto-instrumentation-java/javaagent.jar"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
"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:4315",
"OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT": "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics",
"OTEL_METRICS_EXPORTER": "none",
"OTEL_LOGS_EXPORTER": "none",
"OTEL_PYTHON_DISTRO": "aws_distro",
"OTEL_PYTHON_CONFIGURATOR": "aws_configurator"

Expand Down
10 changes: 7 additions & 3 deletions pkg/instrumentation/defaultinstrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ const (
otelExporterOtlpProtocolValue = "http/protobuf"
otelExporterTracesEndpointKey = "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT"
otelExporterTracesEndpointDefaultValue = "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/traces"
otelExporterSmpEndpointKey = "OTEL_AWS_SMP_EXPORTER_ENDPOINT" //TODO: remove in favor of new name once safe
otelExporterSmpEndpointDefaultValue = "http://cloudwatch-agent.amazon-cloudwatch:4315" //TODO: remove in favor of new name once safe
otelExporterSmpEndpointKey = "OTEL_AWS_SMP_EXPORTER_ENDPOINT" //TODO: remove in favor of new name once safe
otelExporterSmpEndpointDefaultValue = "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics" //TODO: remove in favor of new name once safe
otelExporterAppSignalsEndpointKey = "OTEL_AWS_APP_SIGNALS_EXPORTER_ENDPOINT"
otelExporterAppSignalsEndpointDefaultValue = "http://cloudwatch-agent.amazon-cloudwatch:4315"
otelExporterAppSignalsEndpointDefaultValue = "http://cloudwatch-agent.amazon-cloudwatch:4316/v1/metrics"
otelExporterMetricKey = "OTEL_METRICS_EXPORTER"
otelExporterMetricDefaultValue = "none"
otelExporterLogsKey = "OTEL_LOGS_EXPORTER"
otelExporterLogsDefaultValue = "none"

otelPythonDistro = "OTEL_PYTHON_DISTRO"
otelPythonDistroDefaultValue = "aws_distro"
Expand Down Expand Up @@ -83,6 +85,7 @@ func getDefaultInstrumentation() (*v1alpha1.Instrumentation, error) {
{Name: otelExporterSmpEndpointKey, Value: otelExporterSmpEndpointDefaultValue}, //TODO: remove in favor of new name once safe
{Name: otelExporterAppSignalsEndpointKey, Value: otelExporterAppSignalsEndpointDefaultValue},
{Name: otelExporterMetricKey, Value: otelExporterMetricDefaultValue},
{Name: otelExporterLogsKey, Value: otelExporterLogsDefaultValue},
},
},
Python: v1alpha1.Python{
Expand All @@ -97,6 +100,7 @@ func getDefaultInstrumentation() (*v1alpha1.Instrumentation, error) {
{Name: otelExporterMetricKey, Value: otelExporterMetricDefaultValue},
{Name: otelPythonDistro, Value: otelPythonDistroDefaultValue},
{Name: otelPythonConfigurator, Value: otelPythonConfiguratorDefaultValue},
{Name: otelExporterLogsKey, Value: otelExporterLogsDefaultValue},
},
},
},
Expand Down
2 changes: 2 additions & 0 deletions pkg/instrumentation/podmutator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func TestGetInstrumentationInstanceFromNameSpaceDefault(t *testing.T) {
{Name: otelExporterSmpEndpointKey, Value: otelExporterSmpEndpointDefaultValue}, //TODO: remove in favor of new name once safe
{Name: otelExporterAppSignalsEndpointKey, Value: otelExporterAppSignalsEndpointDefaultValue},
{Name: otelExporterMetricKey, Value: otelExporterMetricDefaultValue},
{Name: otelExporterLogsKey, Value: otelExporterLogsDefaultValue},
},
},
Python: v1alpha1.Python{
Expand All @@ -74,6 +75,7 @@ func TestGetInstrumentationInstanceFromNameSpaceDefault(t *testing.T) {
{Name: otelExporterMetricKey, Value: otelExporterMetricDefaultValue},
{Name: otelPythonDistro, Value: otelPythonDistroDefaultValue},
{Name: otelPythonConfigurator, Value: otelPythonConfiguratorDefaultValue},
{Name: otelExporterLogsKey, Value: otelExporterLogsDefaultValue},
},
},
},
Expand Down
Loading