Skip to content

Google checkstyle breaking changes only#865

Merged
elefeint merged 3 commits intomainfrom
google-checkstyle-breaking-changes-only
Jan 11, 2022
Merged

Google checkstyle breaking changes only#865
elefeint merged 3 commits intomainfrom
google-checkstyle-breaking-changes-only

Conversation

@elefeint
Copy link
Copy Markdown
Contributor

In preparation for switching from Spring to Google checkstyle, several breaking changes are needed. These will not be backported to 2.x.

Breaking changes:

  • Renamed XCloudTraceIdExtractor to CloudTraceIdExtractor
  • Renamed methods in StackdriverJsonLayout (users will have to update traceIdMDCField and spanIdMDCField in custom layouts to traceIdMdcField and spanIdMdcField respectively.)
    • getTraceIdMDCField -> getTraceIdMdcField
    • setTraceIdMDCField -> setTraceIdMdcField
    • getSpanIdMDCField -> getSpanIdMdcField
    • setSpanIdMDCField -> setSpanIdMdcField.

Copy link
Copy Markdown
Member

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

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

I see some reformatting in addition to the rename, but I guess it's OK if it's compatible with the Spring Code Sytle.

map.put(JsonLayout.FORMATTED_MESSAGE_ATTR_NAME, formatMessage(event));
}
add(JsonLayout.MESSAGE_ATTR_NAME, this.includeMessage, event.getMessage(), map);
add(JsonLayout.CONTEXT_ATTR_NAME, this.includeContextName, event.getLoggerContextVO().getName(), map);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like a reformat, but OK.

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

90.5% 90.5% Coverage
0.0% 0.0% Duplication

@elefeint elefeint merged commit 6ec6e83 into main Jan 11, 2022
@elefeint elefeint deleted the google-checkstyle-breaking-changes-only branch January 11, 2022 18:22
kateryna216 added a commit to kateryna216/spring-cloud-gcp that referenced this pull request Oct 20, 2022
Breaking API changes:
* rename XCloudTraceIdExtractor to CloudTraceIdExtractor
* rename MDC to Mdc
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