spring-cloud-aws icon indicating copy to clipboard operation
spring-cloud-aws copied to clipboard

Draft: Cloudwatch publisher opt in

Open krimsz opened this issue 2 years ago • 4 comments

:loudspeaker: Type of change

  • [ ] Bugfix
  • [ ] New feature
  • [X ] Enhancement
  • [ ] Refactoring

:scroll: Description

Enable CloudWatch metrics if dependency is in the path

:bulb: Motivation and Context

Enhancement #345

:green_heart: How did you test it?

In progress...

:pencil: Checklist

In progress...

  • [ ] I reviewed submitted code
  • [ ] I added tests to verify changes
  • [ ] I updated reference documentation to reflect the change
  • [ ] All tests passing
  • [ ] No breaking changes

:crystal_ball: Next steps

Still a draft, wip

krimsz avatar Jul 04 '22 07:07 krimsz

Hey @maciejwalkowiak its just me although it shows 2 people (changed laptops and forgot to change my git user to push a couple commits, will amend that before removing the draft status)

Still working on it, tests are failing here because no region provider (worked on my machine because I have a default REGION set locally). Will work on that, fix the things you mentioned and add the parameterstore and secretmanager because they are not following the normal autoconfiguration pattern.

The PR is a draft as I'm still workign on it, will notify when ready to review, just wanted to open it to show that it's actively worked on

krimsz avatar Jul 05 '22 07:07 krimsz

Thanks @krimsz! Keep it going, great work and ping me in case you have any questions.

maciejwalkowiak avatar Jul 05 '22 08:07 maciejwalkowiak

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 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Jul 11 '22 20:07 sonarqubecloud[bot]

@maciejwalkowiak if you can please take a look at around how I'm creating (probably in a very wrong way) at AbstractAwsConfigDataLocationResolver . ParameterStore and SecretsManager are being created differently but I seem to be unable to find the propper place and way to create my MetricsPublisher. Code looks very ugly and I would like to get some direction before I keep going this direction.

My main issue with the approach here (besides the ugliness since I don't have access to the full context with full bean creation) is how to test it properly. The way the clients hide the builder makes it impossible to access the metricsPublisher at all

krimsz avatar Jul 11 '22 20:07 krimsz