Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Update] Refactor and enhance with ID generation, trace linking, formatting, and export improvements #6

Merged
merged 19 commits into from
Dec 28, 2024

Conversation

patrick204nqh
Copy link
Owner

Description

This PR introduces a series of improvements, refactors, and new features to enhance the functionality, maintainability, and usability.

Major Features

  • ID Generation:

    • Introduced IDGenerator for centralized and reusable unique ID creation.
    • Enhanced trace linking with the new TraceLinker module, which adds robust logging for invalid links and better trace correlation.
  • Formatting Enhancements:

    • Added helper modules for:
      • Colorization.
      • Depth formatting.
      • Method name formatting.
      • Parameter formatting.
    • Introduced KeyValueFormatter for structured trace formatting.
    • Added ValueTruncator to handle large trace data efficiently.
  • Export Improvements:

    • Added support for YAML and TXT export formats.
    • Enhanced color formatting options for better readability.

Refactors

  • Improved logging and exporting mechanisms by introducing:
    • LoggingManager for centralized logging.
    • ExportManager for modular export handling.
  • Refactored the BaseFormatter to extend the new TraceDataFormatter.
  • Updated ValueTruncator and other components for stricter length validation and RBS type definitions.

Dependency Updates

  • Added the Steep gem for type checking, ensuring better static analysis.

Miscellaneous Enhancements

  • Improved trace output formatting with depth and result enhancements.
  • Initial setup for TraceViz module, including adapters, collectors, and tracers, with RBS signatures.

Bug Fixes

  • Fixed validation logic for truncate_length to ensure it is always an integer, resolving potential type-related issues.

Type of Change

Check all that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Refactor (improves code structure without changing functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Documentation update
  • Other (dependency updates and type checking)

How Has This Been Tested?

The following tests and validations have been performed to ensure stability and correctness:

  • Added or updated unit tests for all new features and changes.
  • Verified export functionality for YAML and TXT formats.
  • Checked color formatting across different terminal environments.
  • Ran bundle exec rspec to confirm all tests pass.
  • Tested changes across multiple Ruby versions for compatibility.
  • Verified type-checking with the Steep gem.

Checklist

  • I have followed the Ruby Style Guide.
  • I have performed a self-review of my code.
  • I have added or updated tests as needed.
  • All existing and new tests pass.
  • I have updated the documentation (if needed), including README.md and CHANGELOG.md.
  • I have considered the impact on users and documented any required changes or upgrades.

Deployment Notes

  • No

Related Issues

  • No

Screenshots (if applicable)

N/A

…nd ExportManager for improved trace data handling
…od name formatting, and parameter formatting; refactor BaseFormatter to extend TraceDataFormatter
…eration and enhance TraceLinker with logging for invalid links
@patrick204nqh patrick204nqh added the enhancement A new feature or an improvement to existing functionality. label Dec 28, 2024
@patrick204nqh patrick204nqh self-assigned this Dec 28, 2024
@patrick204nqh patrick204nqh added the in review Pull requests currently under review. label Dec 28, 2024
@patrick204nqh patrick204nqh added approved PRs that are approved and ready to merge. and removed in review Pull requests currently under review. labels Dec 28, 2024
@patrick204nqh patrick204nqh merged commit 6757b4b into main Dec 28, 2024
6 checks passed
@patrick204nqh patrick204nqh deleted the develop branch December 28, 2024 10:50
@patrick204nqh patrick204nqh added this to the Version 1.0.0 Release milestone Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PRs that are approved and ready to merge. enhancement A new feature or an improvement to existing functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant