-
-
Notifications
You must be signed in to change notification settings - Fork 392
Expose runtime metrics via EKG #2267
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
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
088db2a
Collect metrics and expose an EKG server
pepeiborra ad1fb0d
register gc metrics locally
pepeiborra 816043c
getDatabaseKeys
pepeiborra ab13cfe
fixups
pepeiborra c6319d3
Abstract monitoring and put EKG behind a Cabal flag
pepeiborra 55fc507
Add CI for the new flag
pepeiborra 7f69d7b
fix double ifdef
pepeiborra 7431cea
link to GHC docs for eventlogs
pepeiborra a5bc210
log when stopping the EKG server
pepeiborra 629452c
Allow CPP in modules
pepeiborra c687f4e
Add doc comments
pepeiborra 5319cb1
Apply suggestions from code review
pepeiborra ab347be
Compat. with ghc 9.2
pepeiborra 700d73f
use an ekg-json snapshot that preserves compat. with ghc 8.x
pepeiborra e7f3df4
confine CPP to the EKG module
pepeiborra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,11 @@ flag ghc-patched-unboxed-bytecode | |
default: False | ||
manual: True | ||
|
||
flag ekg | ||
description: Enable EKG monitoring of the build graph and other metrics on port 8999 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The port is configurable, right? Just seems like an odd detail to have here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Putting it here makes it easy to find :) |
||
default: False | ||
manual: True | ||
|
||
library | ||
default-language: Haskell2010 | ||
build-depends: | ||
|
@@ -182,6 +187,7 @@ library | |
Development.IDE.GHC.Util | ||
Development.IDE.Import.DependencyInformation | ||
Development.IDE.Import.FindImports | ||
Development.IDE.Monitoring.EKG | ||
Development.IDE.LSP.HoverDefinition | ||
Development.IDE.LSP.LanguageServer | ||
Development.IDE.LSP.Outline | ||
|
@@ -198,6 +204,8 @@ library | |
Development.IDE.Types.KnownTargets | ||
Development.IDE.Types.Location | ||
Development.IDE.Types.Logger | ||
Development.IDE.Types.Monitoring | ||
Development.IDE.Monitoring.OpenTelemetry | ||
Development.IDE.Types.Options | ||
Development.IDE.Types.Shake | ||
Development.IDE.Plugin | ||
|
@@ -236,6 +244,12 @@ library | |
exposed-modules: | ||
Development.IDE.GHC.Compat.CPP | ||
|
||
if flag(ekg) | ||
build-depends: | ||
ekg-wai, | ||
ekg-core, | ||
cpp-options: -DMONITORING_EKG | ||
|
||
flag test-exe | ||
description: Build the ghcide-test-preprocessor executable | ||
default: True | ||
|
@@ -356,6 +370,11 @@ executable ghcide | |
|
||
if !flag(executable) | ||
buildable: False | ||
if flag(ekg) | ||
build-depends: | ||
ekg-wai, | ||
ekg-core, | ||
cpp-options: -DMONITORING_EKG | ||
|
||
test-suite ghcide-tests | ||
type: exitcode-stdio-1.0 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.