feat(go): Implement metrics and tracing for http and grpc servers#5925
Merged
shuchu merged 7 commits intofeast-dev:masterfrom Feb 19, 2026
Merged
Conversation
82aca5b to
b876dba
Compare
b876dba to
8b5cd4b
Compare
8b5cd4b to
847393e
Compare
PepeluDev
reviewed
Feb 5, 2026
PepeluDev
reviewed
Feb 5, 2026
PepeluDev
reviewed
Feb 5, 2026
Contributor
There was a problem hiding this comment.
I would remove this file. Such a test does not actually test that metrics actually record values.
PepeluDev
reviewed
Feb 5, 2026
PepeluDev
reviewed
Feb 5, 2026
655cd02 to
34de413
Compare
PepeluDev
reviewed
Feb 9, 2026
e7a22fc to
2e4c1b3
Compare
a5345c2 to
f5449af
Compare
PepeluDev
reviewed
Feb 11, 2026
db00427 to
b9f99a6
Compare
Signed-off-by: Luis Azofra Begara <[email protected]>
b9f99a6 to
7b552a9
Compare
Signed-off-by: Luis Azofra Begara <[email protected]>
Signed-off-by: Luis Azofra Begara <[email protected]>
7b552a9 to
1bf7277
Compare
Signed-off-by: Luis Azofra Begara <[email protected]>
5d6cc58 to
816423b
Compare
Signed-off-by: Luis Azofra Begara <[email protected]>
Contributor
|
@shuchu It seems like this PR removed some packages from the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR significantly improves the observability and reliability of the Feast Go Feature Server by implementing comprehensive Prometheus metrics, and robust configuration options for both HTTP and gRPC modes. It addresses issues with hardcoded ports, inconsistent metric exposure, and potential race conditions during shutdown.
Changes
1. Prometheus Metrics Instrumentation
:9090) for serving metrics in both HTTP and gRPC modes. This unifies the observability strategy.metricsMiddlewareininternal/feast/server/http_server.goto track:http_request_duration_seconds)http_requests_total)/healthendpoint for readiness probe visibility.go-grpc-prometheusto fully expose standard gRPC server metrics.2. Tracing Enhancements
OTEL_SERVICE_NAMEenvironment variable (defaults toFeastGoFeatureServer). This allows proper service identification in distributed tracing systems without code changes.3. Server Configuration & Reliability
-metrics-portflag tomain.go.sync.WaitGroupinStartHttpServerto ensure clean shutdown of the metrics server and logging services, matching the robust behavior ofStartGrpcServer.ServerStarterinterfaces and removed unused legacy code.How Has This Been Tested?
Verification
/metricsendpoint accessibility on custom ports./healthand request metrics counters.200recording fix.OTEL_SERVICE_NAMEenv var reflects in traces.Checklist
go.mod/go.sum).Why gotoprom
It reduces boilerplate code for histograms and ensures type-safety for labels, preventing runtime panics due to mismatched label cardinality. It wraps the official prometheus client, so it's fully compatible