roryqi opened a new pull request, #13938:
URL: https://github.com/apache/gravitino/pull/13938

   ### What changes were proposed in this pull request?
   
   Make metrics servlet registration opt-in. Register `/metrics` and 
`/prometheus/metrics` on the main server only; auxiliary Jetty services no 
longer expose these endpoints. Metrics from Iceberg and Lance remain registered 
with the shared `MetricsSystem` and can still be scraped through the main 
server.
   
   ### Why are the changes needed?
   
   The Iceberg REST and Lance REST listeners may be reachable by external query 
engines. Serving unauthenticated metrics endpoints on those ports can expose 
operational metrics and metric names. Keeping the endpoints on the main server 
preserves the in-cluster scraping path while removing them from auxiliary 
listeners.
   
   Fixes: #13936
   
   ### Does this PR introduce any user-facing change?
   
   The Iceberg and Lance REST services no longer serve `/metrics` or 
`/prometheus/metrics`; the main server continues to serve them.
   
   ### How was this patch tested?
   
   - `./gradlew :server-common:test --tests 
org.apache.gravitino.server.web.TestJettyServer`
   - `./gradlew :server:test --tests 
org.apache.gravitino.server.TestGravitinoServer 
:iceberg:iceberg-rest-server:compileJava :lance:lance-rest-server:compileJava`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to