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

Fix startup profiling #2092

Merged
merged 2 commits into from
Feb 7, 2022
Merged

Fix startup profiling #2092

merged 2 commits into from
Feb 7, 2022

Conversation

trask
Copy link
Member

@trask trask commented Feb 7, 2022

Startup profiling isn't writing out anything to the file because the PrintWriter is constructed in a try-with-resources block and so getting closed before it can be written to.

Also added a max 10 minute limit for startup profiling, so the file doesn't get enormous if someone forgets about it.

@lgtm-com
Copy link

lgtm-com bot commented Feb 7, 2022

This pull request introduces 1 alert when merging 95b86e7 into 836e268 - view on LGTM.com

new alerts:

  • 1 for Potential output resource leak

@heyams heyams merged commit bf48695 into main Feb 7, 2022
@heyams heyams deleted the fix-startup-profiling branch February 7, 2022 23:30
heyams added a commit that referenced this pull request Feb 9, 2022
* Support Statsbeat in EU regions (#2082)

* Use a diff statsbeat ikey in eu regions

* Use lowercase

* Fix spotless

* Reserve statsbeat config when applicable

* Make test easier to understand

* Remove unused constants

* Decouple TelemetryClient

* Add comments

* Refactor

* Fix spotless

* Remove assignment

* Fix tests

* Convert url to string

* Use regex

* Strict protocol

* No need to escape dash

* Remove escape

* Add a startup profiler for debugging (#2085)

* Add StartupProfiler

* Fix errorprone

* Fix spotless

* Invoke before premain

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* Create dump in applicationinsights folder

* Show the full path of the dump

* Fix lgtm

* Allow sout

* Fix lgtm

* Supress systemout at the method level

* Fix style complain

* Address comments

* Fix spotless

* Address comments

* Return when exception occurs

* Remove comment

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* Use getBoolean for system property

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* Fix startup profiling (#2092)

* Fix startup profiling

* errorprone

* Shorten host property in network statsbeat (#2087)

* Shorten host

* Use regex

* Fix spotless

* Strict protocol

* Remove sout debugging

* Remove escape .

* Send endpointUrl when region is not found

* Turn off oshi logging (#2086)

* Turn off oshi logging

* Update oshi logger level

* Don't mark throttle as error (#2079)

* Update azure-core dependency (#2095)

Co-authored-by: Helen Y <56097766+heyams@users.noreply.github.com>
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