Skip to content

Conversation

@houseme
Copy link
Contributor

@houseme houseme commented Oct 23, 2025

Type of Change

  • New Feature
  • Bug Fix
  • Documentation
  • Performance Improvement
  • Test/CI
  • Refactor
  • Other:

Related Issues

Summary of Changes

This PR enhances the observability module and improves code quality:

  1. Improve comments: Updated comments in crates/obs/src/global.rs and crates/obs/src/telemetry.rs for better clarity and detail.
  2. Remove unused parameters: Cleaned up unused parameters in config.rs within the opt struct to simplify the configuration structure.
  3. Add observability enable flag: Introduced a global flag IS_OBSERVABILITY_ENABLED in crates/obs/src/global.rs to check if observability is enabled, set in init_telemetry.
  4. Enhance run function error logging: Improved error logging in the run function of rustfs/src/main.rs to provide more detailed error information for debugging.

These changes increase code maintainability and the reliability of the observability system.

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit
  • Added/updated necessary tests
  • Documentation updated (if needed)
  • CI/CD passed (if applicable)

Impact

  • Breaking change (compatibility)
  • Requires doc/config/deployment update
  • Other impact:

Additional Notes


Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.

…servability enable flag, and enhance error logging in run function execution.
@houseme houseme requested a review from Copilot October 23, 2025 05:33
Copy link
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 refactors the codebase to improve observability, configuration management, and code maintainability by removing unused parameters, enhancing comments, and improving error handling.

Key changes:

  • Added observability enable flag and global meter functions in crates/obs/src/global.rs
  • Removed unused configuration parameters (external_address, console_rate_limit_enable, console_rate_limit_rpm, console_auth_timeout)
  • Enhanced error logging in the run function and re-enabled DNS resolver initialization
  • Improved documentation with detailed function comments across multiple modules

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/run.sh Removed unused RUSTFS_EXTERNAL_ADDRESS environment variable
rustfs/src/server/http.rs Refactored protocol detection logic and updated logging targets
rustfs/src/main.rs Enhanced error handling for observability guard and run function; re-enabled DNS resolver
rustfs/src/config/mod.rs Removed unused config parameters (external_address, console rate limiting, auth timeout)
rustfs/src/config/config_test.rs Removed tests for deleted external_address configuration
rustfs/src/admin/console_test.rs Removed tests for deleted external_address and updated test assertions
rustfs/src/admin/console.rs Added documentation for static_handler, simplified function paths, increased body limit, updated 404 message
crates/utils/src/net.rs Re-enabled custom DNS resolver usage in get_host_ip function
crates/obs/src/telemetry.rs Set observability flags in init_telemetry function
crates/obs/src/global.rs Added observability enable flag, meter name, and utility functions
crates/ecstore/src/global.rs Renamed function, added comprehensive documentation, removed external port references
crates/config/src/constants/app.rs Removed unused constants for sink file log and external address

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@loverustfs loverustfs merged commit 416d3ad into main Oct 23, 2025
14 checks passed
@loverustfs loverustfs deleted the feature/add-audit-logger-1022 branch October 23, 2025 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants