summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | Improved last_relative_application_frame timingsYorick Peterse2015-12-171-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous setup wasn't exactly fast, resulting in instrumented method calls taking about 600 times longer than non instrumented calls (including any ActiveSupport code involved). With this commit this slowdown has been reduced to around 185 times.
| * | | | | Storing of application metrics in InfluxDBYorick Peterse2015-12-1713-0/+594
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to write application metrics (e.g. SQL timings) to InfluxDB. These metrics can in turn be visualized using Grafana, or really anything else that can read from InfluxDB. These metrics can be used to track application performance over time, between different Ruby versions, different GitLab versions, etc. == Transaction Metrics Currently the following is tracked on a per transaction basis (a transaction is a Rails request or a single Sidekiq job): * Timings per query along with the raw (obfuscated) SQL and information about what file the query originated from. * Timings per view along with the path of the view and information about what file triggered the rendering process. * The duration of a request itself along with the controller/worker class and method name. * The duration of any instrumented method calls (more below). == Sampled Metrics Certain metrics can't be directly associated with a transaction. For example, a process' total memory usage is unrelated to any running transactions. While a transaction can result in the memory usage going up there's no accurate way to determine what transaction is to blame, this becomes especially problematic in multi-threaded environments. To solve this problem there's a separate thread that takes samples at a fixed interval. This thread (using the class Gitlab::Metrics::Sampler) currently tracks the following: * The process' total memory usage. * The number of file descriptors opened by the process. * The amount of Ruby objects (using ObjectSpace.count_objects). * GC statistics such as timings, heap slots, etc. The default/current interval is 15 seconds, any smaller interval might put too much pressure on InfluxDB (especially when running dozens of processes). == Method Instrumentation While currently not yet used methods can be instrumented to track how long they take to run. Unlike the likes of New Relic this doesn't require modifying the source code (e.g. including modules), it all happens from the outside. For example, to track `User.by_login` we'd add the following code somewhere in an initializer: Gitlab::Metrics::Instrumentation. instrument_method(User, :by_login) to instead instrument an instance method: Gitlab::Metrics::Instrumentation. instrument_instance_method(User, :save) Instrumentation for either all public model methods or a few crucial ones will be added in the near future, I simply haven't gotten to doing so just yet. == Configuration By default metrics are disabled. This means users don't have to bother setting anything up if they don't want to. Metrics can be enabled by editing one's gitlab.yml configuration file (see config/gitlab.yml.example for example settings). == Writing Data To InfluxDB Because InfluxDB is still a fairly young product I expect the worse. Data loss, unexpected reboots, the database not responding, you name it. Because of this data is _not_ written to InfluxDB directly, instead it's queued and processed by Sidekiq. This ensures that users won't notice anything when InfluxDB is giving trouble. The metrics worker can be started in a standalone manner as following: bundle exec sidekiq -q metrics The corresponding class is called MetricsWorker.
* | | | | | Merge branch 'mention-all' into 'master' Robert Speicher2015-12-275-13/+40
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only allow group/project members to mention `@all` Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473 See merge request !2205
| * | | | | Merge branch 'master' into mention-allDouwe Maan2015-12-242-4/+4
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| * | | | | Only allow group/project members to mention `@all`Douwe Maan2015-12-245-13/+40
| | | | | |
* | | | | | Merge branch 'support-api-lookup-by-username' into 'master' Dmitriy Zaporozhets2015-12-251-4/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add API support for looking up a user by username Needed to support Huboard See merge request !2089
| * | | | | | Add API support for looking up a user by usernameStan Hu2015-12-241-4/+10
| |/ / / / / | | | | | | | | | | | | | | | | | | Needed to support Huboard
* | | | | | Escape all the things.Douwe Maan2015-12-245-17/+20
| |/ / / / |/| | | |
* | | | | Merge branch 'ldap-special-chars-fix' into 'master' Douwe Maan2015-12-242-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix identity and user retrieval when special characters are used Fixes #4023 I also added tests to make sure the user with special characters in his name is returned correctly. @rspeicher this probably should be added to 8.3 as a patch. See merge request !2176
| * | | | No mb_chars needed anymoreldap-special-chars-fixDouwe Maan2015-12-241-2/+2
| | | | |
| * | | | Fix identity and user retrieval when special characters are usedPatricio Cano2015-12-222-3/+3
| | | | |
* | | | | Merge branch 'edit-on-fork' into 'master' Dmitriy Zaporozhets2015-12-241-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically fork a project when not allowed to edit a file. Fixes #3215. To do: - [ ] Add tests ----- ## "Edit" button on file in a project the user does NOT have write access to ![edit_file](/uploads/7602157420768aef483a6586bba2d164/edit_file.png) ## Clicking will automatically create a fork ![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png) ## When the fork has been created, the user is returned to the edit page on the original project with a notice ![edit_notice](/uploads/94ed1319404370ff1e9c0d672fb41e03/edit_notice.png) ## The user cannot change the target branch and is informed that editing will start an MR ![edit_footer](/uploads/4da68d4795c7177e575b7c434d16eeae/edit_footer.png) ## Hitting "Commit changes" will commit and start an MR from my fork to the origin project ![Screen_Shot_2015-12-17_at_23.38.08](/uploads/d777a4db6f38a5a1be84031694465bc1/Screen_Shot_2015-12-17_at_23.38.08.png) ----- ## "Create file, "Upload file" and "New directory" buttons in a project the user does NOT have write access to ![new_directory](/uploads/72f556248f30d6652523bbb4be01b3e0/new_directory.png) ## Clicking any of these options will automatically create a fork ![during_fork](/uploads/32f4f5dff9f24ea99522000b0bf881c5/during_fork.png) ## When the fork has been created, the user is returned to the tree page on the original project with a notice ![new_directory_notice](/uploads/a1a3e11308ae0e8f0913fae6813a37ed/new_directory_notice.png) ## Clicking "New directory" again will show the modal. The user cannot change the target branch and is informed that editing will start an MR ![new_dir](/uploads/99ca8cbfb2f70603e352b3fdf67b6281/new_dir.png) ## Hitting "Create directory" will commit and start an MR from my fork to the origin project ![Screen_Shot_2015-12-17_at_23.39.19](/uploads/3713d0235abf831361b803a6198c5bc1/Screen_Shot_2015-12-17_at_23.39.19.png) cc @dzaporozhets @skyruler See merge request !2145
| * | | | | Automatically fork a project when not allowed to edit a file.Douwe Maan2015-12-181-1/+1
| | |/ / / | |/| | |
* | | | | Merge branch 'fix/visibility-level-setting-in-forked-projects' into 'master' Douwe Maan2015-12-241-0/+9
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix/visibility level setting in forked projects Fixes #3136 /cc @DouweM See merge request !1744
| * | | | Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-12-21118-1645/+1897
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (723 commits) Bump Rack Attack to v4.3.1 for security fix Remove duplicate entry in the changelog Remove extra spaces after branchname Fix merge-request-reopen button title Add branch and tag operation to tree dropdown Use gitlab-shell 2.6.9 Clarify Windows shell executor artifact upload support Fix feature specs: we always show the build status if ci_commit is present Do not display project group/name when issue and MR are in same project Don't create CI status for refs that doesn't have .gitlab-ci.yml, even if the builds are enabled Use gitlab-workhorse 0.5.1 Fix ci_projects migration by using the value only from latest row [ci skip] Revert sidebar position for issue and merge request Add info on using private Docker registries in CI [ci skip] Upgrade Poltergeist to 1.8.1. #4131 Fix ux issue with "This issue will be closed automatically" message Move MR Builds tab next to Commits Api support for requesting starred projects for user Fix Rubocop complain. Fix merge widget JS for buttons ... Conflicts: app/models/project.rb
| * | | | Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-11-2049-339/+1734
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (296 commits) fox tests Don't rescue Exception, but StandardError adressing comments Update gitlab-shell documentation [ci skip] Align hash literals in IssuesFinder spec Fix tests Fix 'Attach a file' link in new tag form Add link to git-lfs client [ci skip] Do not limit workhorse POST/PUT size in NGINX added specs added spinach tests Since GitLab CI is enabled by default, remove enabling it by pushing .gitlab-ci.yml Fix tests Commits without .gitlab-ci.yml are marked as skipped Changelog entry for finding issues performance Use a JOIN in IssuableFinder#by_project Memoize IssuableFinder#projects Removed trailing whitespace from IssuableFinder Added benchmark for IssuesFinder Updated DB schema with new issues/projects indexes ... Conflicts: app/models/project.rb
| * \ \ \ \ Merge branch 'master' into fix/visibility-level-setting-in-forked-projectsTomasz Maczukin2015-11-048-17/+26
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (23 commits) Use single spaces Improvements to profile page UI Replace all usages of `git` command with configurable binary path Update Shell Commands doc for configurable git binary path Minor reformatting for Facebook integration doc Use proper labels for OAuth providers Add Facebook authentication Bump stamp to ~> 0.6.0 Add extra padding between user description and links on profile page Fix tests Fix clipboard button overflow Apply new design for user profile page Improve profile page UI Better name for up-level links Fixed User sorting specs Only sort by IDs by default Added benchmark for User.all Add changelog entry for contacted_at Spread out runner contacted_at updates Only redirect to homepage url when its not the root url ...
| * | | | | | Fix GitlabV::isibilityLevel::level_name methodTomasz Maczukin2015-11-041-1/+1
| | | | | | |
| * | | | | | Move level_name resolving to Gitlan::VisibilityLevelTomasz Maczukin2015-11-031-0/+9
| | | | | | |
* | | | | | | Merge branch 'emoji-picker-fix' into 'master' Valery Sizov2015-12-241-36/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emoji picker: better alias handling related to https://gitlab.com/gitlab-org/gitlab-ce/issues/3576 See merge request !2198
| * | | | | | | Emoji picker: better alias handlingValery Sizov2015-12-241-36/+17
| | | | | | | |
* | | | | | | | Fix spelling of "it's" to "its" where appropriate.cafuego2015-12-242-7/+7
| | | | | | | |
* | | | | | | | Merge branch 'add-project-permissions' into 'master' Dmitriy Zaporozhets2015-12-231-3/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add project permissions to all project API endpoints This standardizes all the project API formats. Also needed to support Huboard. See merge request !2090
| * | | | | | | | Add project permissions to all project API endpointsStan Hu2015-12-221-3/+3
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | This standardizes all the project API formats. Also needed to support Huboard.
* | | | | | | | Merge branch 'fix/ci-runners-token-persistence' into 'master' Grzegorz Bizon2015-12-231-1/+1
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix method that ensures authentication token Until now, `ensure_#{token_filed_name}!` method didn't persist new token in database. This closes #4235. See merge request !2185
| * | | | | | | Use method that creates runners registration tokenGrzegorz Bizon2015-12-231-1/+1
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | `runners_registration_token` now creates a new token if it is blank.
* | | | | | | emoji picker: minor fixesValery Sizov2015-12-221-8/+0
| | | | | | |
* | | | | | | base implementation of emoji picker [ci skip]Valery Sizov2015-12-221-9/+40
|/ / / / / /
* | | | | | Merge branch 'tduehr/gitlab-ce-cas-support'Douwe Maan2015-12-211-0/+17
|\ \ \ \ \ \
| * | | | | | add CAS authentication supporttduehr2015-12-141-0/+17
| | | | | | |
* | | | | | | Merge branch 'git-version' into 'master' Douwe Maan2015-12-211-0/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Show git version on admin page Before ![git-version-beore](/uploads/57444ad42220c9dfe8f187b8e399227f/git-version-beore.png) After ![git-version-after](/uploads/cc1b52ae1a251c2c46d9626c040726ab/git-version-after.png) gitlab-org/gitlab-ce#4077 See merge request !2101
| * | | | | | | Show git version on admin pageTrey Davis2015-12-151-0/+4
| |/ / / / / /
* | | | | | | Backport JIRA serviceDrew Blessing2015-12-182-4/+28
| |_|_|_|/ / |/| | | | |
* | | | | | Merge branch 'api-support-starred-projects' into 'master' Dmitriy Zaporozhets2015-12-161-0/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Api support for requesting starred projects for user Closes #4112 Note: probably targets the wrong release in the `CHANGELOG`, though 8.4 was not there yet See merge request !2127
| * | | | | | Api support for requesting starred projects for userZeger-Jan van de Weg2015-12-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #4112
* | | | | | | Merge branch 'fix_rubocop' into 'master' Robert Speicher2015-12-161-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | Fix Rubocop complain. See merge request !2125
| * | | | | | Fix Rubocop complain.fix_rubocopRubén Dávila2015-12-161-1/+1
| | | | | | |
* | | | | | | Merge branch 'disable-markdown-cache' into 'master' Douwe Maan2015-12-161-1/+3
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporarily disable Markdown caching See merge request !2120
| * | | | | | Temporarily disable Markdown cachingDouwe Maan2015-12-161-1/+3
| | | | | | |
* | | | | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-12-164-292/+6
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch 'workhorse-passthrough' into 'master' Kamil Trzciński2015-12-164-292/+6
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass all requests from NGINX to gitlab-workhorse See merge request !2073
| | * \ \ \ \ \ Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Jacob Vosmaer2015-12-1523-352/+162
| | |\ \ \ \ \ \ | | | |/ / / / / | | | | | | | | | | | | | | | | workhorse-passthrough
| | * | | | | | Update init script options for gitlab-workhorseJacob Vosmaer2015-12-152-2/+3
| | | | | | | |
| | * | | | | | Pass all requests from NGINX to gitlab-workhorseJacob Vosmaer2015-12-112-290/+3
| | | | | | | |
* | | | | | | | Merge branch 'add-open-issues-count-to-api' of ↵Dmitriy Zaporozhets2015-12-161-0/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.com/stanhu/gitlab-ce Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | | | | | | Add open_issues_count to project APIStan Hu2015-12-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed to support Huboard and a generally useful value.
* | | | | | | | Merge remote-tracking branch 'origin/feature/update-rubocop'Dmitriy Zaporozhets2015-12-1613-16/+21
|\ \ \ \ \ \ \ \
| * | | | | | | | Fixed Rubocop offensesGabriel Mazetto2015-12-1513-16/+21
| | |_|/ / / / / | |/| | | | | |
* | | | | | | | Merge branch 'lazy-reference-extractor' into 'master' Robert Speicher2015-12-1554-421/+471
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move Markdown/reference logic from `Gitlab::Markdown` to `Banzai` - Moves from `Gitlab::Markdown` to `Banzai` - Moves filters and pipelines into their own namespace: `Banzai::Filter` and `Banzai::Pipeline` - No more `autoload`! - Split up `Gitlab::ReferenceExtractor` into `Banzai::ReferenceExtractor` and `Gitlab::ReferenceExtractor` - Replace `something(load_lazy_references: true)` by `Gitlab::ReferenceExtractor.lazily { something }` Goes from: ```ruby def referenced_merge_requests references = [self, *notes].flat_map do |note| note.all_references(load_lazy_references: false).merge_requests end.uniq! Gitlab::Markdown::ReferenceFilter::LazyReference.load(references).uniq.sort_by(&:iid) end ``` to ```ruby def referenced_merge_requests Gitlab::ReferenceExtractor.lazily do [self, *notes].flat_map do |note| note.all_references.merge_requests end end.sort_by(&:iid) end ``` See merge request !2027
| * | | | | | | | Use lazy reference extractor to get issue's MRslazy-reference-extractorDouwe Maan2015-12-151-1/+1
| | | | | | | | |