summaryrefslogtreecommitdiff
path: root/app
Commit message (Collapse)AuthorAgeFilesLines
* Downcased user or email search for avatar_icon.issue_3780Stefan Kahlhöfer2015-12-281-1/+1
| | | | Signed-off-by: Rubén Dávila <rdavila84@gmail.com>
* Move InfluxDB settings to ApplicationSettingrelocate-influxdb-settingsYorick Peterse2015-12-282-0/+61
|
* Merge branch 'influxdb' into 'master' Dmitriy Zaporozhets2015-12-281-0/+33
|\ | | | | | | | | | | | | Storing of application metrics in InfluxDB This adds support for tracking metrics in InfluxDB, which in turn can be visualized using Grafana. For more information see #2936. See merge request !2042
| * Drop empty tag values from metricsYorick Peterse2015-12-171-1/+5
| | | | | | | | | | InfluxDB throws an error when trying to store a list of tags where one or more have an empty value.
| * Cast values to strings before escaping themYorick Peterse2015-12-171-1/+1
| | | | | | | | | | This ensures that e.g. line numbers used in tags are first casted to strings.
| * Storing of application metrics in InfluxDBYorick Peterse2015-12-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'disable-git-follow' into 'master' Dmitriy Zaporozhets2015-12-281-1/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable --follow in `git log` to avoid loading duplicate commit data in infinite scroll `git` doesn't work properly when `--follow` and `--skip` are specified together. We could even be **omitting commits in the Web log** as a result. Here are the gory details. Let's say you ran: ``` git log -n=5 --skip=2 README ``` This is the working case since it omits `--follow`. This is what happens: 1. `git` starts at `HEAD` and traverses down the tree until it finds the top-most commit relevant to README. 2. Once this is found, this commit is returned via `get_revision_1()`. 3. If the `skip_count` is positive, decrement and repeat step 2. Otherwise go onto step 4. 4. `show_log()` gets called with that commit. 5. Repeat step 1 until we have all five entries. That's exactly what we want. What happens when you use `--follow`? You have to understand how step 1 is performed: * When you specify a pathspec on the command-line (e.g. README), a flag `prune` [gets set here](https://github.com/git/git/blob/master/revision.c#L2351). * If the `prune` flag is active, `get_commit_action()` determines whether the commit should be [scanned for matching paths](https://github.com/git/git/blob/master/revision.c#L2989). * In the case of `--follow`, however, `prune` is [disabled here](https://github.com/git/git/blob/master/revision.c#L2350). * As a result, a commit is never scanned for matching paths and therefore never pruned. `HEAD` will always get returned as the first commit, even if it's not relevant to the README. * Making matters worse, the `--skip` in the example above would actually skip a every other entry after `HEAD` N times. If README were changed in these skipped commits, we would actually miss information! Since git uses a matching algorithm to determine whether a file was renamed, I believe `git` needs to generate a diff of each commit to do this and traverse each commit one-by-one to do this. I think that's the rationale for disabling the `prune` functionality since you can't just do a simple string comparison. Closes #4181, #4229, #3574, #2410 See merge request !2210
| * | Disable --follow in `git log` to avoid loading duplicate commit data in ↵Stan Hu2015-12-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | infinite scroll `git` doesn't work properly when `--follow` and `--skip` are specified together. We could even be **omitting commits in the Web log** as a result. Here are the gory details. Let's say you ran: ``` git log -n=5 --skip=2 README ``` This is the working case since it omits `--follow`. This is what happens: 1. `git` starts at `HEAD` and traverses down the tree until it finds the top-most commit relevant to README. 2. Once this is found, this commit is returned via `get_revision_1()`. 3. If the `skip_count` is positive, decrement and repeat step 2. Otherwise go onto step 4. 4. `show_log()` gets called with that commit. 5. Repeat step 1 until we have all five entries. That's exactly what we want. What happens when you use `--follow`? You have to understand how step 1 is performed: * When you specify a pathspec on the command-line (e.g. README), a flag `prune` [gets set here](https://github.com/git/git/blob/master/revision.c#L2351). * If the `prune` flag is active, `get_commit_action()` determines whether the commit should be [scanned for matching paths](https://github.com/git/git/blob/master/revision.c#L2989). * In the case of `--follow`, however, `prune` is [disabled here](https://github.com/git/git/blob/master/revision.c#L2350). * As a result, a commit is never scanned for matching paths and therefore never pruned. `HEAD` will always get returned as the first commit, even if it's not relevant to the README. * Making matters worse, the `--skip` in the example above would actually skip every other after `HEAD` N times. If README were changed in these skipped commits, we would actually miss information! Since git uses a matching algorithm to determine whether a file was renamed, I believe `git` needs to generate a diff of each commit to do this and traverse each commit one-by-one to do this. I think that's the rationale for disabling the `prune` functionality since you can't just do a simple string comparison. Closes #4181, #4229, #3574, #2410
* | | Merge branch 'rs-fix-shortcut-help' into 'master' Dmitriy Zaporozhets2015-12-283-12/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix the "Show all" link for the keyboard shortcut modal 18cb430f7983ea557cf2308f5ea7c0af8b79a7b5 introduced a typo that made this stop working. See merge request !2218
| * | | Fix the "Show all" link for the keyboard shortcut modalrs-fix-shortcut-helpRobert Speicher2015-12-273-12/+8
| | | |
* | | | Merge branch 'add-recaptcha-support' into 'master' Dmitriy Zaporozhets2015-12-283-10/+38
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for Google reCAPTCHA in user registration to prevent spammers To do: - [x] Failing reCAPTCHA test causes all the fields to be lost - ~~[ ] Improve styling of reCAPTCHA box~~ (not possible) - ~~[ ] Put settings in `application_settings` (?)~~ ![image](/uploads/d38ca89820d3c0066fb8aeb645fd77f0/image.png) ![image](/uploads/6b050749963691b023d076682abcf736/image.png) Page when you fail CAPTCHA: ![image](/uploads/bc4846f0a5144985bc41dfa75eeab4c1/image.png) See merge request !2216
| * | | | Make sign-up form retain fields after failed CAPTCHA testStan Hu2015-12-271-4/+5
| | | | |
| * | | | Fix failed specStan Hu2015-12-271-1/+1
| | | | |
| * | | | Add support for Google reCAPTCHA in user registration to prevent spammersStan Hu2015-12-273-6/+33
| | | | |
* | | | | Merge branch 'rs-bump-brakeman' into 'master' Dmitriy Zaporozhets2015-12-281-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump brakeman to ~> 3.1.0 See merge request !2219
| * | | | | Prevent an XSS warning from the updated Brakemanrs-bump-brakemanRobert Speicher2015-12-271-1/+1
| | |/ / / | |/| | |
* | | | | Do not show frequently used emojis when emptyValery Sizov2015-12-281-6/+7
|/ / / /
* | | | Merge branch 'mention-all' into 'master' Robert Speicher2015-12-272-2/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 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-2414-35/+181
| |\ \ \
| * | | | Only allow group/project members to mention `@all`Douwe Maan2015-12-242-2/+2
| | | | |
* | | | | Merge branch 'close-open-ajax-issue' into 'master' Robert Speicher2015-12-253-10/+41
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | open and close issue via ajax request. With tests Close and Reopen issues with ajax request. See merge request !2164
| * | | | | removes unused `alert` from issue spec. Requires flash in the ↵close-open-ajax-issueJacob Schatz2015-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | *implementation* instead of the spec.
| * | | | | adds test for issue close/reopen failureJacob Schatz2015-12-231-2/+3
| | | | | |
| * | | | | resolves conflicts with new buttonsJacob Schatz2015-12-2364-254/+1980
| |\ \ \ \ \
| * | | | | | changes `issue-box` to `status-box` since html was changed as wellJacob Schatz2015-12-211-9/+9
| | | | | | |
| * | | | | | adds alerts for when http request errors out in some way.Jacob Schatz2015-12-211-0/+2
| | | | | | |
| * | | | | | removes console logsJacob Schatz2015-12-211-1/+0
| | | | | | |
| * | | | | | changes `data-url` to `href` for javascript url grabbingJacob Schatz2015-12-212-3/+4
| | | | | | |
| * | | | | | removes `console.log`sJacob Schatz2015-12-211-2/+0
| | | | | | |
| * | | | | | open and close issue via ajax request. With testsJacob Schatz2015-12-213-9/+38
| | | | | | |
* | | | | | | Merge branch 'revert_votes_back' into 'master' Dmitriy Zaporozhets2015-12-254-9/+29
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert vote buttons back to issue and MR pages https://gitlab.com/gitlab-org/gitlab-ce/issues/3672 /cc @dzaporozhets @JobV ![joxi_screenshot_1450809309400](/uploads/379a75505e0d5f24e743aa0a6a6684e2/joxi_screenshot_1450809309400.png) See merge request !2206
| * | | | | | | add sorting of awardsValery Sizov2015-12-252-1/+13
| | | | | | | |
| * | | | | | | revert back vote buttons to issue and MR pagesValery Sizov2015-12-252-8/+16
| | | | | | | |
* | | | | | | | Merge branch 'rs-opengraph' into 'master' Douwe Maan2015-12-259-8/+115
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Open Graph meta tags See merge request !2192
| * | | | | | | Add link to twitter docsDouwe Maan2015-12-251-1/+2
| | | | | | | |
| * | | | | | | Add more twitter metatags.Douwe Maan2015-12-251-0/+6
| | | | | | | |
| * | | | | | | Add og:site_nameDouwe Maan2015-12-251-2/+2
| | | | | | | |
| * | | | | | | Add support for `twitter:label` meta tagsrs-opengraphRobert Speicher2015-12-245-4/+39
| | | | | | | |
| * | | | | | | Use `request.fullpath` for `og:url` tagRobert Speicher2015-12-241-1/+1
| | | | | | | |
| * | | | | | | Truncate page_description to 30 wordsRobert Speicher2015-12-241-2/+2
| | | | | | | |
| * | | | | | | Account for `@project.description` being nilRobert Speicher2015-12-231-1/+1
| | | | | | | |
| * | | | | | | Add page descriptions and imagesRobert Speicher2015-12-236-9/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A limited number of pages have defined their own descriptions, but otherwise we default to the Project's description (if `@project` is set), or the old `brand_title` fallback. The image will either be the uploaded project icon (never a generated one), the user's uploaded icon or Gravatar, or, finally, the GitLab logo.
| * | | | | | | Add gitlab_logo.png, remove brand_logo.pngRobert Speicher2015-12-232-0/+0
| | | | | | | |
| * | | | | | | Add Open Graph meta tagsRobert Speicher2015-12-231-1/+5
| | |/ / / / / | |/| | | | |
* | | | | | | Fixed codestyle and added 2FA documentationfeature/force-tfaGabriel Mazetto2015-12-242-3/+5
| | | | | | |
* | | | | | | Add to application_settings forced TFA optionsGabriel Mazetto2015-12-242-0/+14
| | | | | | |
* | | | | | | specs for forced two-factor authentication and grace periodGabriel Mazetto2015-12-242-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | simplified code and fixed stuffs
* | | | | | | Grace period support for TFAGabriel Mazetto2015-12-244-3/+44
| | | | | | |
* | | | | | | WIP require two factor authenticationGabriel Mazetto2015-12-243-26/+47
| |_|_|_|/ / |/| | | | |
* | | | | | Enable "Add key" button when user fills in a proper keyStan Hu2015-12-241-1/+1
| |_|_|/ / |/| | | | | | | | | | | | | | Closes #4295