fix(core): auto add ops metrcis #3013
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the logic for generating metrics exporter URIs in
AutoMQConfig.java, focusing on improving clarity and correctness in handling legacy and new configuration options. The main changes include renaming methods and code identifiers for consistency, updating how OPS exporter URIs are constructed, and removing unnecessary imports.Refactoring and logic improvements:
genMetricsExporterURImethod to check for a null URI and fall back to legacy config construction, and ensured OPS exporter URIs are always included if missing.S3ExportertoOpsExporterfor clarity and consistency. [1] [2] [3]Legacy exporter logic cleanup:
TELEMETRY_EXPORTER_TYPE_OPSin legacy config processing, ensuring OPS exporter URIs are only added via the updated logic.String.join.Codebase maintenance:
java.util.stream.Collectorsfrom the top of the file.More detailed description of your change,if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)