Skip to content

Conversation

@itssimon
Copy link
Member

@itssimon itssimon commented Jan 24, 2026

Summary by CodeRabbit

  • New Features

    • RequestLogger now includes additional fields (logs, spans, trace_id) in JSON output when available.
  • Bug Fixes

    • Enhanced error handling during logging callback initialization to prevent silent failures.
  • Refactor

    • Applied code formatting standardization across the project using Palantir Java Format, consolidating multi-line expressions to improve readability.

✏️ Tip: You can customize this high-level summary in your review settings.

@itssimon itssimon self-assigned this Jan 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request reformats Java code across 40+ files using Palantir Java Format instead of Google Java Format, while introducing several minor behavioral changes including additional JSON fields in request logging and error handling adjustments in Spring configuration.

Changes

Cohort / File(s) Summary
Build Configuration
pom.xml
Replaced Google Java Format with Palantir Java Format in Spotless Maven plugin; removed AOSP style setting
Core Client & Request Handling
src/main/java/io/apitally/common/ApitallyClient.java
Consolidated multi-line expressions to single lines; refactored nested retry logic to flatter structure with outer try-catch for error handling
Request/Response Processing
src/main/java/io/apitally/common/RequestLogger.java
Added JSON serialization of logs, spans, and trace_id fields when present; consolidated multi-line method expressions
Data Transfer Objects
src/main/java/io/apitally/common/dto/ServerError.java, StartupData.java, ValidationError.java, ValidationErrors.java
Reformatted constructor parameter lists from multi-line to single-line format; no semantic changes
Common Utilities
src/main/java/io/apitally/common/ConsumerRegistry.java, InstanceLock.java, RequestCounter.java, ResourceMonitor.java, SpanCollector.java, TempGzipFile.java, ValidationErrorCounter.java, ServerErrorCounter.java
Consolidated field initializations and method calls to single-line expressions; no functional logic changes
Spring Framework Integration
src/main/java/io/apitally/spring/ApitallyAutoConfiguration.java, ApitallyFilter.java, ApitallyProperties.java, ApitallySpanCollector.java, ApitallyUtils.java
Consolidated parameter lists and boolean expressions to single lines; ApitallyProperties now calls setCallbacks(null) on logging callback instantiation failure; ApitallyUtils refactored getPaths control flow to flatten nested structure
Test Code
src/test/java/io/apitally/common/ApitallyClientTest.java, InstanceLockTest.java, RequestLoggerTest.java, SpanCollectorTest.java, src/test/java/io/apitally/spring/ApitallyFilterTest.java, TestController.java, TestItem.java
Reformatted constructor calls, assertion expressions, and stream operations to single-line or compact multi-line format; TestController.handleConstraintViolationException inlined return with .build() appended

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch palantir-java-format

Comment @coderabbitai help to get the list of available commands and usage tips.

@itssimon itssimon merged commit 06d2801 into main Jan 24, 2026
15 of 16 checks passed
@itssimon itssimon deleted the palantir-java-format branch January 24, 2026 07:58
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