Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: EmfMetricLoggingPublisher #5792

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

Fred1155
Copy link
Contributor

@Fred1155 Fred1155 commented Jan 14, 2025

Motivation and Context

. The CloudWatch Embedded Metric Format (EMF) offers a more suitable approach for Lambda environments as well as other execution environment that has built-in integration with cloudwatch logs. EmfMetricLoggingPublisher uses Jackson-Core and convert SDK metric collections into EMF-formatted log entries.

Modifications

  1. Added a new module: EmfMetricLoggingPublisher
  2. change the MetricNormalizer from internal package of CloudWatchMEtricPublisher to utils package
  3. Added three new benchmark tests

Testing

  1. Two uni test classes to test the converter and the publisher
  2. Three benchmark tests to test the performance

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

Fred1155 and others added 5 commits January 3, 2025 15:41
* EmfMetricPublisher class with basic unit test added

* Edge cases handled

* javadoc for class added

* Java doc for methods added

* minor unit test changes

* Change from using jacksonCore directly to using jsonWriter

* EmfMetricConfiguration class added

* MetricEmfConverter class added

* new module checklist done

* checkStyle fixed

* minor build problem fixed

* internal package added

* fixed the issue passing raw objects

* added java clock to unit test

* added unit test for publish method

* minor changes

* config class to builder pattern

* config class to builder pattern

* minor change

* End to end test passed

* added valid case in WARN_LOG allowlist

* unit tests adjusted

* Change logGroupName to required field

* move MetricValueNormalizer class to utils package

* converter implementation changed

* schemaConformTest added

* SchemaConformTest adjusted

* minor change
* Benchmark test for emfMetricPublisher added

* input name changed

* add emfBenchmarkTest to BenchmarkRunner

* enabled METRIC_BENCHMARKS

* checkStyle fixed
* change class name and artifactId

* test-coverage pom changed

* javadoc fixed
…nfig (#5790)

* more benchmark test added/changed logGroupName config

* teardown method overrided

* logGroupName access method changed

* Snapshot version changed

* LogGroupName in lambda unit test added

* suppression added for system
@Fred1155 Fred1155 requested a review from a team as a code owner January 14, 2025 19:12
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>metric-publishers</artifactId>
<version>2.30.2-SNAPSHOT</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will get updated again after todays and tomorrows release (latest one)
Please make sure we update this before the actual release day

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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