Skip to content

Commit

Permalink
use trace_url for traces endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
asreehari-splunk committed Dec 3, 2024
1 parent 42b6377 commit e4286c3
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 65 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/scripts/win-test-services.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ $expected_svc_env_vars = @{
"SPLUNK_REALM" = "$realm";
"SPLUNK_API_URL" = "$api_url";
"SPLUNK_INGEST_URL" = "$ingest_url";
# We no longer test for this as we have moved to OTLP and it breaks upgrade tests.
#"SPLUNK_TRACE_URL" = "${ingest_url}/v2/trace/otlp";
"SPLUNK_HEC_URL" = "${ingest_url}/v1/log";
"SPLUNK_HEC_TOKEN" = "$access_token";
"SPLUNK_BUNDLE_DIR" = "${env:PROGRAMFILES}\Splunk\OpenTelemetry Collector\agent-bundle";
Expand Down
12 changes: 4 additions & 8 deletions cmd/otelcol/config/collector/agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ processors:

exporters:
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v2/trace"
otlphttp:
traces_endpoint: "${SPLUNK_TRACE_URL}"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
Expand Down Expand Up @@ -157,11 +158,6 @@ exporters:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false
otlphttp:
metrics_endpoint: "${SPLUNK_INGEST_URL}/v2/datapoint/otlp"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Send to gateway
otlp/gateway:
endpoint: "${SPLUNK_GATEWAY_URL}:4317"
Expand Down
13 changes: 4 additions & 9 deletions cmd/otelcol/config/collector/ecs_ec2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ processors:

exporters:
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace"
otlphttp:
traces_endpoint: "${SPLUNK_TRACE_URL}"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
Expand All @@ -129,12 +130,6 @@ exporters:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false
otlphttp:
metrics_endpoint: "${SPLUNK_INGEST_URL}/v2/datapoint/otlp"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"

service:
extensions: [health_check, http_forwarder, zpages]
pipelines:
Expand Down
12 changes: 4 additions & 8 deletions cmd/otelcol/config/collector/fargate_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ processors:

exporters:
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace"
otlphttp:
traces_endpoint: "${SPLUNK_TRACE_URL}"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
Expand All @@ -112,11 +113,6 @@ exporters:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false
otlphttp:
metrics_endpoint: "${SPLUNK_INGEST_URL}/v2/datapoint/otlp"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"

service:
extensions: [health_check, http_forwarder, zpages]
Expand Down
14 changes: 4 additions & 10 deletions cmd/otelcol/config/collector/gateway_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,10 @@ processors:

exporters:
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace"
sending_queue:
num_consumers: 32
otlphttp:
traces_endpoint: "${SPLUNK_TRACE_URL}"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
Expand Down Expand Up @@ -125,11 +124,6 @@ exporters:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v1/log"
log_data_enabled: false
otlphttp:
metrics_endpoint: "${SPLUNK_INGEST_URL}/v2/datapoint/otlp"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"

service:
telemetry:
Expand Down
12 changes: 4 additions & 8 deletions cmd/otelcol/config/collector/upstream_agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ processors:

exporters:
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_TRACE_URL}"
otlphttp:
traces_endpoint: "${SPLUNK_TRACE_URL}"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
Expand All @@ -143,11 +144,6 @@ exporters:
token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v1/log"
log_data_enabled: false
otlphttp:
metrics_endpoint: "${SPLUNK_INGEST_URL}/v2/datapoint/otlp"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Send to gateway
otlp/gateway:
endpoint: "${SPLUNK_GATEWAY_URL}:4317"
Expand Down
10 changes: 6 additions & 4 deletions cmd/otelcol/fips/config/agent_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ processors:

exporters:
# Traces
sapm:
access_token: "${SPLUNK_ACCESS_TOKEN}"
endpoint: "${SPLUNK_INGEST_URL}/v2/trace"
otlphttp:
metrics_endpoint: "${SPLUNK_INGEST_URL}/v2/datapoint/otlp"
traces_endpoint: "${SPLUNK_INGEST_URL}/v2/trace/otlp"
headers:
"X-SF-Token": "${SPLUNK_ACCESS_TOKEN}"
# Metrics + Events
signalfx:
access_token: "${SPLUNK_ACCESS_TOKEN}"
Expand Down Expand Up @@ -169,7 +171,7 @@ service:
- batch
- resourcedetection
#- resource/add_environment
exporters: [sapm, signalfx]
exporters: [otlphttp, signalfx]
# Use instead when sending to gateway
#exporters: [otlp, signalfx]
metrics:
Expand Down
2 changes: 1 addition & 1 deletion deployments/ansible/molecule/default/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN zypper -n clean && zypper -n refresh
RUN zypper -n install -l ansible dbus-1 rpm-python sudo systemd-sysvinit
{% else %}
FROM opensuse/leap:15
#RUN sed -i 's|download.opensuse.org|provo-mirror.opensuse.org|' /etc/zypp/repos.d/*.repo
RUN sed -i 's|download.opensuse.org|provo-mirror.opensuse.org|' /etc/zypp/repos.d/*.repo
RUN zypper -n install -l ansible dbus-1 python3-rpm sudo systemd-sysvinit
{% endif %}

Expand Down
17 changes: 2 additions & 15 deletions tests/general/default_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,11 @@ func TestDefaultGatewayConfig(t *testing.T) {
config := collector.EffectiveConfig(t, 55554)
require.Equal(t, map[string]any{
"exporters": map[string]any{
"sapm": map[string]any{
"access_token": "<redacted>",
"endpoint": "https://ingest.not.real.signalfx.com/v2/trace",
"sending_queue": map[string]any{
"num_consumers": 32,
},
},
"otlphttp": map[string]any{
"headers": map[string]any{
"X-SF-Token": "<redacted>",
},
"metrics_endpoint": "https://ingest.not.real.signalfx.com/v2/datapoint/otlp",
"traces_endpoint": "https://ingest.not.real.signalfx.com/v2/trace/otlp",
"traces_endpoint": "https://ingest.not.real.signalfx.com/v2/trace/otlp",
},
"signalfx": map[string]any{
"access_token": "<redacted>",
Expand Down Expand Up @@ -265,12 +257,7 @@ func TestDefaultAgentConfig(t *testing.T) {
"headers": map[string]any{
"X-SF-Token": "<redacted>",
},
"metrics_endpoint": "https://ingest.not.real.signalfx.com/v2/datapoint/otlp",
"traces_endpoint": "https://ingest.not.real.signalfx.com/v2/trace/otlp",
},
"sapm": map[string]any{
"access_token": "<redacted>",
"endpoint": "https://ingest.not.real.signalfx.com/v2/trace",
"traces_endpoint": "https://ingest.not.real.signalfx.com/v2/trace/otlp",
},
"signalfx": map[string]any{
"access_token": "<redacted>",
Expand Down

0 comments on commit e4286c3

Please sign in to comment.