Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Conversation

@maciejwalkowiak
Copy link
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Refactoring for #528

Make SentryOptions inherit from SentryCommonOptions and use reflection to copy values.

💡 Motivation and Context

Thanks to using reflection and inheritance we limit even more number of places that have to be modified when new properties are added.

💚 How did you test it?

Existing unit & integration tests cover reflection usage.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing
  • No breaking changes

🔮 Next steps

The question is if it's the way to go or @bruno-garcia you had something different in mind?

* background queue and this queue is given a certain amount to drain pending events Default is
* 2000 = 2s
*/
private long shutdownTimeout = 2000; // 2s
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't rename any of the options not to bring any breaking changes here.

Also, I'd suggest we're always explicit on the unit. Since this is long, this timeout is in Seconds? MIlliseconds?

Joshua Bloch talks about that in this video which I highly recommend: https://www.youtube.com/watch?v=heh4OeB9A-c

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree. It got renamed because there was a mismatch between setters/getters and the field name, thus it didn't comply to Java Beans convention making it impossible to use with Spring @ConfigurationProperties. Either we rename the field (as it's done in this PR) and do not introduce breaking changes (as the setters & getters do not change), or follow Joshua Bloch suggestion and rename setters and getters.

@maciejwalkowiak maciejwalkowiak mentioned this pull request Aug 28, 2020
8 tasks
@maciejwalkowiak
Copy link
Contributor Author

Superseded by #530

@bruno-garcia bruno-garcia deleted the refactor-sentry-properties-inheritance branch August 31, 2020 22:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants