René's URL Explorer Experiment


Title: feat(go): Implement metrics and tracing for http and grpc servers by luisazofracabify · Pull Request #5925 · feast-dev/feast · GitHub

Open Graph Title: feat(go): Implement metrics and tracing for http and grpc servers by luisazofracabify · Pull Request #5925 · feast-dev/feast

X Title: feat(go): Implement metrics and tracing for http and grpc servers by luisazofracabify · Pull Request #5925 · feast-dev/feast

Description: 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 Unified Metrics Server: Implemented a dedicated, configurable HTTP server (default port :9090) for serving metrics in both HTTP and gRPC modes. This unifies the observability strategy. HTTP Server Instrumentation: Added metricsMiddleware in internal/feast/server/http_server.go to track: Request duration (http_request_duration_seconds) Request counts by method, path, and status (http_requests_total) Instrumented the /health endpoint for readiness probe visibility. gRPC Metrics: Integrated go-grpc-prometheus to fully expose standard gRPC server metrics. 2. Tracing Enhancements Dynamic Service Name: Improved the existing OpenTelemetry integration by adding support for the OTEL_SERVICE_NAME environment variable (defaults to FeastGoFeatureServer). This allows proper service identification in distributed tracing systems without code changes. 3. Server Configuration & Reliability Configurable Metrics Port: Added -metrics-port flag to main.go. Graceful Shutdown: Implemented sync.WaitGroup in StartHttpServer to ensure clean shutdown of the metrics server and logging services, matching the robust behavior of StartGrpcServer. Code Cleanup: Refactored ServerStarter interfaces and removed unused legacy code. How Has This Been Tested? Verification Confirmed /metrics endpoint accessibility on custom ports. Verified /health and request metrics counters. Validated status 200 recording fix. Tested OTEL_SERVICE_NAME env var reflects in traces. Verified clean shutdown logs (SIGINT/SIGTERM). Checklist My code follows the code style of this project. I have added tests that prove my fix is effective or that my feature works. I have updated the dependencies (go.mod / go.sum). All new and existing tests passed. 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

Open Graph Description: 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 bo...

X Description: 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 bo...

Opengraph URL: https://github.com/feast-dev/feast/pull/5925

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0ef180ae-0a30-323a-8f2a-7d09762aeed6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB40C:BDC69:13BDFE3:1ACAACE:6A4D7298
html-safe-nonce5b420b81a615cb550f6bbb654cb554783d08dcbb4a29786e338a68137021c8c8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDBDOkJEQzY5OjEzQkRGRTM6MUFDQUFDRTo2QTRENzI5OCIsInZpc2l0b3JfaWQiOiIzNTQ1NDk4NTcxMjM4MTA5ODQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac35f071d93c3c6eea1606957ba43cf28be060a1eeb05acc5d51e29fe0ac2fbd4b
hovercard-subject-tagpull_request:3227547243
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/5925/files
twitter:imagehttps://avatars.githubusercontent.com/u/220917905?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/220917905?s=400&v=4
og:image:altDescription This PR significantly improves the observability and reliability of the Feast Go Feature Server by implementing comprehensive Prometheus metrics, and robust configuration options for bo...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec78260c7b3f4ac4b0356c8208537f05406a3a2d46a9ec3f735b372dcc519c39e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/feast-dev/feast git https://github.com/feast-dev/feast.git
octolytics-dimension-user_id57027613
octolytics-dimension-user_loginfeast-dev
octolytics-dimension-repository_id161133770
octolytics-dimension-repository_nwofeast-dev/feast
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id161133770
octolytics-dimension-repository_network_root_nwofeast-dev/feast
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release399fff412f48461d435721c009efc17ea44be72f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/feast-dev/feast/pull/5925/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F5925%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ffeast-dev%2Ffeast%2Fpull%2F5925%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=feast-dev%2Ffeast
Reloadhttps://github.com/feast-dev/feast/pull/5925/files
Reloadhttps://github.com/feast-dev/feast/pull/5925/files
Reloadhttps://github.com/feast-dev/feast/pull/5925/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5925/files
feast-dev https://github.com/feast-dev
feasthttps://github.com/feast-dev/feast
Notifications https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Fork 1.4k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Star 7.1k https://github.com/login?return_to=%2Ffeast-dev%2Ffeast
Code https://github.com/feast-dev/feast
Issues 213 https://github.com/feast-dev/feast/issues
Pull requests 172 https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security and quality 1 https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
Code https://github.com/feast-dev/feast
Issues https://github.com/feast-dev/feast/issues
Pull requests https://github.com/feast-dev/feast/pulls
Discussions https://github.com/feast-dev/feast/discussions
Actions https://github.com/feast-dev/feast/actions
Security and quality https://github.com/feast-dev/feast/security
Insights https://github.com/feast-dev/feast/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ffeast-dev%2Ffeast%2Fissues%2Fnew%2Fchoose
shuchuhttps://github.com/shuchu
feast-dev:masterhttps://github.com/feast-dev/feast/tree/master
luisazofracabify:feat/go-server-observabilityhttps://github.com/luisazofracabify/feast/tree/feat/go-server-observability
Conversation 27 https://github.com/feast-dev/feast/pull/5925
Commits 7 https://github.com/feast-dev/feast/pull/5925/commits
Checks 21 https://github.com/feast-dev/feast/pull/5925/checks
Files changed https://github.com/feast-dev/feast/pull/5925/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5925/files
feat(go): Implement metrics and tracing for http and grpc servers https://github.com/feast-dev/feast/pull/5925/files#top
Show all changes 7 commits https://github.com/feast-dev/feast/pull/5925/files
22a253b feat(go): implement metrics and tracing for http and grpc servers luisazofracabify Jan 30, 2026 https://github.com/feast-dev/feast/pull/5925/commits/22a253bd0ea1b4ebf5b14fc01e459a109deba362
1664ae5 fix(server): improve metrics, config, and shutdown logic luisazofracabify Feb 11, 2026 https://github.com/feast-dev/feast/pull/5925/commits/1664ae5888658b283c5cfb56fc9d133db2e68470
1bf7277 chore: update go.sum after rebase luisazofracabify Feb 11, 2026 https://github.com/feast-dev/feast/pull/5925/commits/1bf7277fb730eca31558c93fa53dc2fde7baaf5c
816423b docs: improve README instructions for metrics and tracing luisazofracabify Feb 11, 2026 https://github.com/feast-dev/feast/pull/5925/commits/816423b7b16286df5f6cd981bc3e667950732557
41d58e2 fix(server): resolve potential deadlock during shutdown luisazofracabify Feb 11, 2026 https://github.com/feast-dev/feast/pull/5925/commits/41d58e282866d175cc3482cf5ea135be6c29835f
f3b7021 Merge branch 'master' into feat/go-server-observability luisazofracabify Feb 18, 2026 https://github.com/feast-dev/feast/pull/5925/commits/f3b702164ba137e00f01927821bb49e755fa9e12
0bb51fc Merge branch 'master' into feat/go-server-observability luisazofracabify Feb 19, 2026 https://github.com/feast-dev/feast/pull/5925/commits/0bb51fccb2fbfcfb7a3af1453b8c9e62459abed4
Clear filters https://github.com/feast-dev/feast/pull/5925/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5925/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5925/files
go.mod https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
go.sum https://github.com/feast-dev/feast/pull/5925/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
README.md https://github.com/feast-dev/feast/pull/5925/files#diff-c6fc62c6b8d55a99557d915c8271e03b88d701c19291fcd74021640031504292
metrics.go https://github.com/feast-dev/feast/pull/5925/files#diff-89a55db87155b5d1b1c0e147ed936aad2ae74629e08863f8f9e3f39040bbb547
http_server.go https://github.com/feast-dev/feast/pull/5925/files#diff-a010f2bbfdfd1513207cb88999f5f2aec582fa6c9ef69858113104210e5251b5
main.go https://github.com/feast-dev/feast/pull/5925/files#diff-a240b23c8c4a5b71406f4393240035163be74a3840d5fdaa4b2a993872e8cf65
main_test.go https://github.com/feast-dev/feast/pull/5925/files#diff-2b0bb2bae7f81dfd60d76011518dcd23a17ee27e9021a7faa1358effcaafdbf1
go.modhttps://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
View file https://github.com/luisazofracabify/feast/blob/0bb51fccb2fbfcfb7a3af1453b8c9e62459abed4/go.mod
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/5925/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
https://github.com/feast-dev/feast/pull/5925/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6
go.sumhttps://github.com/feast-dev/feast/pull/5925/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63
View file https://github.com/luisazofracabify/feast/blob/0bb51fccb2fbfcfb7a3af1453b8c9e62459abed4/go.sum
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/feast-dev/feast/pull/5925/files
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L6
go/README.mdhttps://github.com/feast-dev/feast/pull/5925/files#diff-c6fc62c6b8d55a99557d915c8271e03b88d701c19291fcd74021640031504292
View file https://github.com/luisazofracabify/feast/blob/0bb51fccb2fbfcfb7a3af1453b8c9e62459abed4/go/README.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/5925/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/5925/files#diff-c6fc62c6b8d55a99557d915c8271e03b88d701c19291fcd74021640031504292
https://github.com/feast-dev/feast/pull/5925/files#diff-c6fc62c6b8d55a99557d915c8271e03b88d701c19291fcd74021640031504292
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L6
go/internal/feast/metrics/metrics.gohttps://github.com/feast-dev/feast/pull/5925/files#diff-89a55db87155b5d1b1c0e147ed936aad2ae74629e08863f8f9e3f39040bbb547
View file https://github.com/luisazofracabify/feast/blob/0bb51fccb2fbfcfb7a3af1453b8c9e62459abed4/go/internal/feast/metrics/metrics.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/5925/{{ revealButtonHref }}
https://github.com/feast-dev/feast/blob/master/CODEOWNERS#L6
go/internal/feast/server/http_server.gohttps://github.com/feast-dev/feast/pull/5925/files#diff-a010f2bbfdfd1513207cb88999f5f2aec582fa6c9ef69858113104210e5251b5
View file https://github.com/luisazofracabify/feast/blob/0bb51fccb2fbfcfb7a3af1453b8c9e62459abed4/go/internal/feast/server/http_server.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/feast-dev/feast/pull/5925/{{ revealButtonHref }}
https://github.com/feast-dev/feast/pull/5925/files#diff-a010f2bbfdfd1513207cb88999f5f2aec582fa6c9ef69858113104210e5251b5
https://github.com/feast-dev/feast/pull/5925/files#diff-a010f2bbfdfd1513207cb88999f5f2aec582fa6c9ef69858113104210e5251b5
https://github.com/feast-dev/feast/pull/5925/files#diff-a010f2bbfdfd1513207cb88999f5f2aec582fa6c9ef69858113104210e5251b5
https://github.com/feast-dev/feast/pull/5925/files#diff-a010f2bbfdfd1513207cb88999f5f2aec582fa6c9ef69858113104210e5251b5
Please reload this pagehttps://github.com/feast-dev/feast/pull/5925/files
Please reload this pagehttps://github.com/feast-dev/feast/pull/5925/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.