![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/carousell/fasthttp-prometheus-middleware
Prometheus middleware for fasthttp
Exports metrics for request duration request_duration_seconds
with http status code as code
and http request method + endpoint/route as path
f.e code="200",path="GET_/health"
, code="201",path="POST_/foo"
using fasthttp/router
package main
import (
"log"
fasthttpprom "github.com/carousell/fasthttp-prometheus-middleware"
"github.com/fasthttp/router"
"github.com/valyala/fasthttp"
)
func main() {
r := router.New()
p := fasthttpprom.NewPrometheus("")
p.Use(r)
r.GET("/health", func(ctx *fasthttp.RequestCtx) {
ctx.SetStatusCode(200)
ctx.SetBody([]byte(`{"status": "pass"}`))
log.Println(string(ctx.Request.URI().Path()))
})
log.Println("main is listening on ", "8080")
log.Fatal(fasthttp.ListenAndServe(":"+"8080", p.Handler))
}
Example metrics for above code in /metrics endpoint
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.01"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.02"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.04"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.06"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.08"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.1"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.15"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.25"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.4"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.6"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="0.8"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="1"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="1.5"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="2"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="3"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="5"} 25063
request_duration_seconds_bucket{code="200",path="GET_/health",le="+Inf"} 25063
request_duration_seconds_sum{code="200",path="GET_/health"} 0.14781658099999923
request_duration_seconds_count{code="200",path="GET_/health"} 25063
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.