Code for HTTP to GRPC blog
Run docker-compose up
Open your web browser to localhost:9090
to view the prometheus metrics. There will be a background app that will be sending traffic to the server and Prometheus will begin to populate the following metrics:
wasmflow_requests_total
wasmflow_requests_time_total
wasmflow_requests_errors_total
server
container is running aWasmflow
application.Wasmflow
exposes aStats
method via GRPC.client
container is continually calling thewasmflow
application throughenvoy
reverse proxy.envoy
container is acting as a reverse proxy for thewasmflow
application. It passes through theclient
calls directly without any modification. It. It is dynamically transforming the GRPCStats
response toapplication/json
using GRPC to JSON transcoding. It is then converting fromJSON
totext/plain
using Lua.prometheus
container is scraping the/metrics
endpoint that is sent to thewasmflow
container's GRPC interface throughenvoy
.