Skip to content

Commit

Permalink
remove app metrics endpoint (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig O'Donnell authored Oct 18, 2023
1 parent 172b9c2 commit f138052
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
10 changes: 0 additions & 10 deletions .github/actions/validate-endpoints/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,3 @@ runs:
exit 1
fi
fi
- name: Validate /app/metrics endpoint
shell: bash
run: |
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')
if [ "$appStatusMetric" != "ready" ]; then
echo "Expected app status metric 'X-Replicated-AppStatus' to be 'ready', but is set to '$appStatusMetric'."
exit 1
fi
1 change: 0 additions & 1 deletion pkg/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func Start(params APIServerParams) {
r.HandleFunc("/api/v1/app/info", handlers.GetCurrentAppInfo).Methods("GET")
r.HandleFunc("/api/v1/app/updates", handlers.GetAppUpdates).Methods("GET")
r.HandleFunc("/api/v1/app/history", handlers.GetAppHistory).Methods("GET")
authRouter.HandleFunc("/api/v1/app/metrics", handlers.GetAppMetrics).Methods("GET")
r.HandleFunc("/api/v1/app/custom-metrics", handlers.SendCustomAppMetrics).Methods("POST")

// integration
Expand Down
8 changes: 0 additions & 8 deletions pkg/handlers/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/pkg/errors"
appstatetypes "github.com/replicatedhq/replicated-sdk/pkg/appstate/types"
"github.com/replicatedhq/replicated-sdk/pkg/config"
"github.com/replicatedhq/replicated-sdk/pkg/heartbeat"
"github.com/replicatedhq/replicated-sdk/pkg/helm"
"github.com/replicatedhq/replicated-sdk/pkg/integration"
integrationtypes "github.com/replicatedhq/replicated-sdk/pkg/integration/types"
Expand Down Expand Up @@ -326,13 +325,6 @@ func mockReleaseToAppRelease(mockRelease integrationtypes.MockRelease) AppReleas
return appRelease
}

func GetAppMetrics(w http.ResponseWriter, r *http.Request) {
heartbeatInfo := heartbeat.GetHeartbeatInfo(store.GetStore())
headers := heartbeat.GetHeartbeatInfoHeaders(heartbeatInfo)

JSON(w, http.StatusOK, headers)
}

func SendCustomAppMetrics(w http.ResponseWriter, r *http.Request) {
license := store.GetStore().GetLicense()

Expand Down

0 comments on commit f138052

Please sign in to comment.