Skip to content

feat(dbprovider): metrics-sdk support#6724

Draft
mlhiter wants to merge 1 commit intolabring:mainfrom
mlhiter:feat/database-monitor-metrics-adjust
Draft

feat(dbprovider): metrics-sdk support#6724
mlhiter wants to merge 1 commit intolabring:mainfrom
mlhiter:feat/database-monitor-metrics-adjust

Conversation

@mlhiter
Copy link
Copy Markdown
Member

@mlhiter mlhiter commented Feb 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 03:29
@mlhiter mlhiter requested a review from a team as a code owner February 27, 2026 03:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the dbprovider's monitoring infrastructure by migrating from direct fetch calls to legacy monitor services to the new sealos-metrics-sdk. The implementation replaces the deprecated MONITOR_URL-based approach with a type-safe SDK that directly queries Victoria Metrics with built-in Kubernetes authentication.

Changes:

  • Replaced direct HTTP fetch in handleStream.ts with MetricsClient from sealos-metrics-sdk
  • Updated environment variables from MONITOR_URL to METRICS_URL with sensible defaults
  • Added WHITELIST_KUBERNETES_HOSTS configuration for development flexibility

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
frontend/providers/dbprovider/src/services/handleStream.ts Refactored to use MetricsClient SDK with helper functions for parameter normalization and type-safe database queries
frontend/providers/dbprovider/package.json Added sealos-metrics-sdk workspace dependency
frontend/providers/dbprovider/deploy/manifests/deploy.yaml.tmpl Updated environment variables to use METRICS_URL and WHITELIST_KUBERNETES_HOSTS with proper defaults
frontend/providers/dbprovider/deploy/Kubefile Updated ENV declarations for metrics configuration with Victoria Metrics default URL
frontend/providers/dbprovider/.env.template Documented new METRICS_URL and WHITELIST_KUBERNETES_HOSTS environment variables with usage examples
frontend/pnpm-lock.yaml Added sealos-metrics-sdk dependency link and cleaned up unused transitive dependencies
Files not reviewed (1)
  • frontend/pnpm-lock.yaml: Language not supported

@mlhiter mlhiter marked this pull request as draft February 28, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants