-
-
Notifications
You must be signed in to change notification settings - Fork 464
feat(metrics): [Trace Metrics 23] Add E2E tests for Metrics #5011
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
base: 01-08-close_and_flush_metricsbatchprocessor_from_sentryclient
Are you sure you want to change the base?
feat(metrics): [Trace Metrics 23] Add E2E tests for Metrics #5011
Conversation
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
### Features
- [Trace Metrics 23] Add E2E tests for Metrics ([#5011](https://github.com/getsentry/sentry-java/pull/5011))If none of the above apply, you can opt out of this check by adding |
Performance metrics 🚀
|
6fb15b6 to
9988b7e
Compare
c29aa38 to
8330a3e
Compare
markushi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| assertEquals("count metric increased", restClient.getCountMetric()) | ||
| assertEquals(200, restClient.lastKnownStatusCode) | ||
|
|
||
| Thread.sleep(10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we move this inside TestHelper.ensureMetricsReceived()? At least I see quite some sleep calls in there and if we ever decide to refactor this it would make it easier to have all sleep calls in one place.
| @GetMapping("gauge/{count}") | ||
| String gauge(@PathVariable Long count) { | ||
| Sentry.metrics().gauge("memory.free", count.doubleValue(), "byte"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, since it's just sample code 🙈
| @GetMapping("gauge/{count}") | |
| String gauge(@PathVariable Long count) { | |
| Sentry.metrics().gauge("memory.free", count.doubleValue(), "byte"); | |
| @GetMapping("gauge/{value}") | |
| String gauge(@PathVariable Long value) { | |
| Sentry.metrics().gauge("memory.free", value.doubleValue(), "byte"); |

📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps