Merge pull request #1270 from snyk/fea/telemetry-endpoint

chore: change telemetry endpoints
main
Elie 2021-12-13 16:01:40 +01:00 committed by GitHub
commit aab355217e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ func (te Telemetry) SendTelemetry(store memstore.Bucket) {
}
client := &http.Client{}
req, _ := http.NewRequest("POST", "https://2lvzgmrf2e.execute-api.eu-west-3.amazonaws.com/telemetry", bytes.NewReader(body))
req, _ := http.NewRequest("POST", "https://telemetry.driftctl.com/telemetry", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
_, err = client.Do(req)

View File

@ -104,7 +104,7 @@ func TestSendTelemetry(t *testing.T) {
if tt.expectedBody != nil {
httpmock.RegisterResponder(
"POST",
"https://2lvzgmrf2e.execute-api.eu-west-3.amazonaws.com/telemetry",
"https://telemetry.driftctl.com/telemetry",
func(req *http.Request) (*http.Response, error) {
requestTelemetry := &telemetry{}
@ -140,7 +140,7 @@ func TestTelemetryNotSend(t *testing.T) {
httpmock.RegisterResponder(
"POST",
"https://2lvzgmrf2e.execute-api.eu-west-3.amazonaws.com/telemetry",
"https://telemetry.driftctl.com/telemetry",
httpmock.NewErrorResponder(nil),
)
tl := NewTelemetry(mocks.MockBuild{UsageReporting: false})

View File

@ -34,7 +34,7 @@ func CheckLatest() string {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://2lvzgmrf2e.execute-api.eu-west-3.amazonaws.com/version", nil)
req, _ := http.NewRequest("GET", "https://telemetry.driftctl.com/version", nil)
req.Header.Set("driftctl-version", Current())
req.Header.Set("driftctl-os", runtime.GOOS)
req.Header.Set("driftctl-arch", runtime.GOARCH)