This is an alternative implementation of the MR#103
Enable the exposing metrics using Prometheus on the endpoint
/internal/metrics. The used mechanism is based on the SnowflakeEventDispatcher, only its data is available to the collector and nothing else is leaked.
I added the following CLI flags:
Hint: The new CLI flags shouldn't change the behaviour of the original proxy. So, the new feature doesn't disable the original stats mechanism.
snowflake-proxy --metrics --metrics-port 8081 --disable-stats-logger
On the new endpoint: http://localhost:8081/internal/metrics
The core part of this is from Issue#40121