Closed psFried closed 1 year ago
It looks like we're now logging all gRPC calls made by the gateway, as well as incoming requests? Could that get noisy/is there a way to turn the logging down to just requests like it is now? Or would we even want to do that?
It logs the calls at the debug
level. The default log level should only show the REST requests, as it does today (though I admit I haven't actually tested that).
Does this mean that we'll have to create self-signed certs and trust them in order to get dpg working locally?
It means that we have to create self-signed certs, which is handled in estuary/flow#800. But we don't actually need to have anything trust them. When running locally, the gateway_url
should point to the plain HTTP port, which now serves all the REST handlers. The DPG itself will need to skip verification of its own certificate when it proxies to the gRPC handler, but it already does that.
Add basic instrumentation
This adds a few things that have been missing:
logrus
package and adds some logging statements throughout./metrics
endpoint so that prometheus metrics can start to be scraped./debug/pprof/*
endpoints.Metrics and debug endpoints are served on a separate port, since both of the existing ports must be exposed in production.
I went back to printing a hard error if no TLS arguments are found. It turns out that TLS is always required, even for local development. The REST endpoints, even when running locally, forward their calls to the gRPC server that's running on the TLS port.