DE-4747 instrumentation

This commit is contained in:
Nitin
2022-03-31 16:24:32 +05:30
parent cb62efbc02
commit 2cb99735f9
11 changed files with 435 additions and 56 deletions

View File

@@ -68,7 +68,6 @@ func eventsHandler(w http.ResponseWriter, r *http.Request) {
func eventsHandlerJson(w http.ResponseWriter, r *http.Request) {
var reader io.Reader
// check if body is gzip compressed
if r.Header.Get("Content-Encoding") == "gzip" {
var err error

View File

@@ -7,6 +7,7 @@ import (
"github.com/pkg/errors"
"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
type Server struct {
@@ -37,6 +38,7 @@ func NewServer(port string) (*Server, error) {
router.HandleFunc("/schema/get", getSchemaHandler).Methods("GET")
router.HandleFunc("/schema/refresh", refreshSchemaHandler).Methods("POST")
router.HandleFunc("/schema/add", addSchemaHandler).Methods("POST")
router.Path("/metrics").Handler(promhttp.Handler())
// router.HandleFunc("/test", testHandler).Methods("GET")
// router.HandleFunc("/stop", stopHandler).Methods("POST")