Skip to content

Commit f138052

Browse files
authored
remove app metrics endpoint (#107)
1 parent 172b9c2 commit f138052

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

.github/actions/validate-endpoints/action.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,3 @@ runs:
142142
exit 1
143143
fi
144144
fi
145-
146-
- name: Validate /app/metrics endpoint
147-
shell: bash
148-
run: |
149-
appStatusMetric=$(curl -H 'Authorization: ${{ inputs.license-id }}' -s --fail --show-error localhost:8888/api/v1/app/metrics | jq -r '."X-Replicated-AppStatus"' | tr -d '\n')
150-
151-
if [ "$appStatusMetric" != "ready" ]; then
152-
echo "Expected app status metric 'X-Replicated-AppStatus' to be 'ready', but is set to '$appStatusMetric'."
153-
exit 1
154-
fi

pkg/apiserver/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ func Start(params APIServerParams) {
6666
r.HandleFunc("/api/v1/app/info", handlers.GetCurrentAppInfo).Methods("GET")
6767
r.HandleFunc("/api/v1/app/updates", handlers.GetAppUpdates).Methods("GET")
6868
r.HandleFunc("/api/v1/app/history", handlers.GetAppHistory).Methods("GET")
69-
authRouter.HandleFunc("/api/v1/app/metrics", handlers.GetAppMetrics).Methods("GET")
7069
r.HandleFunc("/api/v1/app/custom-metrics", handlers.SendCustomAppMetrics).Methods("POST")
7170

7271
// integration

pkg/handlers/app.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/pkg/errors"
1212
appstatetypes "github.com/replicatedhq/replicated-sdk/pkg/appstate/types"
1313
"github.com/replicatedhq/replicated-sdk/pkg/config"
14-
"github.com/replicatedhq/replicated-sdk/pkg/heartbeat"
1514
"github.com/replicatedhq/replicated-sdk/pkg/helm"
1615
"github.com/replicatedhq/replicated-sdk/pkg/integration"
1716
integrationtypes "github.com/replicatedhq/replicated-sdk/pkg/integration/types"
@@ -326,13 +325,6 @@ func mockReleaseToAppRelease(mockRelease integrationtypes.MockRelease) AppReleas
326325
return appRelease
327326
}
328327

329-
func GetAppMetrics(w http.ResponseWriter, r *http.Request) {
330-
heartbeatInfo := heartbeat.GetHeartbeatInfo(store.GetStore())
331-
headers := heartbeat.GetHeartbeatInfoHeaders(heartbeatInfo)
332-
333-
JSON(w, http.StatusOK, headers)
334-
}
335-
336328
func SendCustomAppMetrics(w http.ResponseWriter, r *http.Request) {
337329
license := store.GetStore().GetLicense()
338330

0 commit comments

Comments
 (0)