Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 25, 2025

This PR updates the prometheus-client-bridge module to follow the recommendations in the style guide while making minimal changes to the codebase.

Changes Made

Static Imports

Added static imports for commonly used utility methods as recommended by the style guide:

  • PrometheusCollector.java: Static import for Collections.unmodifiableList
  • MetricAdapter.java: Static imports for TimeUnit.MILLISECONDS and TimeUnit.NANOSECONDS
  • Serializer.java: Static import for Collections.emptyList

Class Organization

  • MetricAdapter.java: Moved the sanitizer static field to be grouped with other static fields at the top of the class, following the preferred order: static fields, instance fields, constructors, methods, nested classes.

Style Guide Compliance Verified

Code Formatting: All files pass Spotless formatting checks
Final Keyword Usage: Public non-internal classes are correctly declared final, package-private classes are not
Test Class Visibility: Test classes are package-protected (no explicit visibility modifier)
Static Imports: Added for commonly used utilities per style guide recommendations
Class Organization: Follows the preferred field/method ordering

All changes maintain backward compatibility and existing functionality. Tests continue to pass without modification.

Fixes #407.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Update prometheus-client-bridge module to follow style guide Update prometheus-client-bridge module to follow style guide Aug 25, 2025
@Copilot Copilot AI requested a review from trask August 25, 2025 01:57
Copilot finished work on behalf of trask August 25, 2025 01:57
trask added a commit that referenced this pull request Aug 25, 2025
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.

Update prometheus-client-bridge module to follow style guide
2 participants