Skip to content

Conversation

@richardelms
Copy link
Contributor

This pull request introduces a comprehensive rename and refactor to standardize the terminology from "MetaData" to "Metadata" throughout the codebase. The changes touch on core classes, logback integration, and tests, ensuring consistency in naming and usage. Additionally, related classes and methods have been renamed, and files have been updated to reflect these changes.

Core terminology and class renaming

  • Renamed the class MetaData to Metadata, and updated all usages, including thread-local storage, merging, and access methods in Bugsnag, Report, and Diagnostics. [1] [2] [3] [4] [5]
  • Updated method names to use metadata instead of metaData (e.g., mergeMetadata, getMetadata, addThreadMetadata, clearThreadMetadata) across the codebase. [1] [2] [3] [4] [5] [6]

Logback integration updates

  • Renamed logback-related classes from LogbackMetaData, LogbackMetaDataTab, and LogbackMetaDataKey to LogbackMetadata, LogbackMetadataTab, and LogbackMetadataKey. Updated all references and usages accordingly. [1] [2] [3] [4] [5] [6] [7] [8]
  • Removed the old LogbackMetaData.java file and replaced it with LogbackMetadata.java. [1] [2]

Test and documentation updates

  • Renamed test classes and methods to use Metadata instead of MetaData, including AppenderMetaDataTest to AppenderMetadataTest, and updated method names and assertions. [1] [2] [3]
  • Updated documentation comments and parameter names to use metadata for clarity and consistency. [1] [2]

Consistency improvements

  • Ensured all API, callback, and internal usage of metadata is aligned, including in the servlet integration and Jakarta servlet callback. [1] [2]
  • Updated all places where the metadata is accessed, merged, or manipulated to use the new naming convention. [1] [2] [3]

These changes collectively improve code readability, maintainability, and reduce confusion by unifying the terminology across the entire codebase.

@richardelms richardelms self-assigned this Oct 27, 2025
When I run "MetadataScenario" with the defaults
And I wait to receive an error
And the error is valid for the error reporting API version "4" for the "Bugsnag Java" notifier
And the event "metaData.Custom.foo" equals "Hello World!"
Copy link
Contributor

Choose a reason for hiding this comment

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

In the payload, the casing is still the same ("metaData"), so this shouldn't have changed.

Not sure if the test is case insensitive or if somehow this PR has amended the underlying JSON - it should remain "metaData" to be completely correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed back 👍

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.

3 participants