Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
grpc-prometheus
Advanced tools
Interceptor for the server to collect statistics of calls through Prometheus
Interceptor for the server to collect statistics of calls through Prometheus
npm i grpc-prometheus
const { serverInterceptorsFactory } = require("grpc-prometheus");
/*...*/
const server = await new GrpcHostBuilder()
/*...*/
.addInterceptor(
serverInterceptorsFactory({
timeBuckets: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 10],
})
)
/*...*/
.bind(grpcBind)
.buildAsync();
# HELP grpc_server_handled_total Total number of RPCs completed on the server, regardless of success or failure.
# TYPE grpc_server_handled_total counter
grpc_server_handled_total{grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
# HELP grpc_server_handling_seconds Histogram of response latency (seconds) of gRPC that had been application-level handled by the server.
# TYPE grpc_server_handling_seconds histogram
grpc_server_handling_seconds_bucket{le="0.005",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="0.01",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="0.025",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="0.05",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="0.1",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="0.25",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="0.5",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="1",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="2.5",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="10",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_bucket{le="+Inf",grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
grpc_server_handling_seconds_sum{grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 0.001358001
grpc_server_handling_seconds_count{grpc_code="OK",grpc_method="SayHello",grpc_service="v1.Greeter",grpc_type="unary"} 1
FAQs
Interceptor for the server to collect statistics of calls through Prometheus
The npm package grpc-prometheus receives a total of 123 weekly downloads. As such, grpc-prometheus popularity was classified as not popular.
We found that grpc-prometheus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.