Commit Graph
234 Commits
Author SHA1 Message Date
Yorick Peterse a41287d898 Only track method calls above a certain threshold
This ensures we don't end up wasting resources by tracking method calls
that only take a few microseconds. By default the threshold is 10
milliseconds but this can be changed using the gitlab.yml configuration
file.
2015-12-17 17:25:48 +01:00
Yorick Peterse 141e946c3d Storing of application metrics in InfluxDB
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.
2015-12-17 17:25:48 +01:00
Douwe Maan a426fb1596 Update documentation about automatic issue closing 2015-12-07 14:11:13 +01:00
Kamil Trzcinski 11728b50f9 Expose artifacts path 2015-11-23 13:05:22 +01:00
Marin Jankovski 060e59f054 Lfs on by default. 2015-11-19 10:42:46 +01:00
Marin Jankovski 14032d8eb1 Add support for git lfs. 2015-11-16 12:39:13 +01:00
Kamil Trzcinski 6384c757b7 Expose CI enable option in project features
- Enable CI by default for all new projects
2015-11-13 10:52:50 +01:00
Douwe Maan 4773d98e83 Add Facebook authentication 2015-11-03 17:59:07 +01:00
Dmitriy Zaporozhets ead3ffd7a5 Merge branch 'shared-file-access' into 'master'
Start putting shared files in "shared"



See merge request !1691
2015-10-29 11:06:03 +00:00
Jacob Vosmaer 0b082b348b Start putting shared files in "shared" 2015-10-26 13:42:09 +01:00
Jacob Vosmaer 122f02bc39 Remove the contents of the satellites dir 2015-10-23 17:39:22 +02:00
Douwe Maan 712d17684b Make Reply by email easier to configure 2015-10-13 13:10:49 +02:00
Dmitriy Zaporozhets 3fa8bd0e67 Merge branch 'ee_features_in_example_config' into 'master'
Removes reference to Enterprise Edition ssh key sync feature.

fixes #2042

See merge request !1017
2015-10-01 15:12:24 +00:00
Paul Beattie 253d2320ab Add support for AWS S3 Server-Side Encryption support
This adds support for AWS S3 SSE with S3 managed keys, this means the
data is encrypted at rest and the encryption is handled transparently to
the end user as well as in the AWS Console. This is optional and not
required to make S3 uploads work.
2015-09-25 17:06:31 +01:00
Robert Speicher d4a960161e Merge branch 'rename-reply-by-email' into 'master'
Rename reply_by_email to incoming_email to prepare for the future.

Closes #2579.

See merge request !1367
2015-09-21 18:52:13 +00:00
Sytse Sijbrandij 534bd0f87d Fix grammar 2015-09-21 16:43:43 +00:00
Douwe Maan ee028d9d60 Rename reply_by_email to incoming_email to prepare for the future. 2015-09-21 10:35:37 +02:00
Sameer Naik 01c0d14e41 fixes link to reply_by_email docs 2015-09-20 11:25:09 +05:30
Valery Sizov d7242054ba add pg_schema to backup config 2015-09-18 16:29:13 +03:00
Robert Speicher 09bcce7d1f Merge branch 'ldap-attributes' into 'master'
Allow configuration of LDAP attributes GitLab will use for the new user account.

Fixes #2412.

See merge request !1261
2015-09-16 18:34:55 +00:00
Kamil Trzcinski 1b464bfe03 Update documentation and config files 2015-09-16 00:28:59 +02:00
Douwe Maan 00ecacf8ea Add to docs 2015-09-09 11:54:48 +01:00
Douwe Maan 9c6ed29664 Expand explanation in config file 2015-09-09 11:36:08 +01:00
Douwe Maan c915e2c823 Allow configuration of LDAP attributes GitLab will use for the new user account. 2015-09-08 16:18:14 +01:00
Valery Sizov 3700e5a960 Crowd integration 2015-09-02 12:42:01 +03:00
Douwe Maan 34026c97b4 Add documentation. 2015-08-19 13:58:14 -07:00
Douwe Maan f76eac56b9 Reply by email POC 2015-08-18 15:46:36 -07:00
Jacob Vosmaer 05b518aa4d Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into backup-archive-permissions 2015-07-29 15:44:04 +02:00
Jacob Vosmaer d371331a65 Remove weird trailing characters 2015-07-24 18:55:50 +02:00
Jacob Vosmaer 39a7e210a3 Use a separate backup test directory and nuke its contents 2015-07-24 18:54:06 +02:00
Douwe Maan 70a3c165a9 Allow custom label to be set for authentication providers. 2015-07-23 15:20:12 +02:00
Ted Strzalkowski 9d59438094 Removes reference to Enterprise Edition ssh key sync feature. 2015-07-21 13:17:43 -07:00
Jacob Vosmaer bb50b7fcd0 Allow custom backup archive permissions
This change helps system administrators who want to replicate
GitLab backup files without needing root permissions.
2015-07-06 18:43:17 +02:00
Robert Speicher 5f20574db5 Fix a few remaining references to the old Theme names/IDs 2015-06-13 17:58:17 -04:00
Marin Jankovski df346e9507 Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
Jeroen Nijhof cd522f3309 remove extra space 2015-06-09 17:59:08 +02:00
Jeroen Nijhof bf7315cb13 update fog to 1.25.0 and add multipart upload support 2015-06-09 17:56:37 +02:00
Alex Lossent dfcea8ed51 Add option to automatically link omniauth and LDAP identities
Until now, a user needed to first sign in with his LDAP identity and then manually
link his/her account with an omniauth identity from their profile.
Only when this is done can the user authenticate with the omniauth provider and at
the same time benefit from the LDAP integration (HTTPS authentication with LDAP
username/password and in EE: LDAP groups, SSH keys etc.).
This feature automates the process by looking up a corresponding LDAP person when a
user connects with omniauth for the first time and then automatically linking the LDAP
and omniauth identities (of course, like the existing allow_single_sign_on setting,
this is meant to be used with trusted omniauth providers).
The result is identical to a manual account link.

Add config initializers for other omniauth settings.
2015-06-03 11:46:20 +02:00
Alex Lossent 5491f6fbde Add an option to automatically sign-in with an Omniauth provider without showing the GitLab sign-in page
This is useful when integrating with existing SSO environments and we want to use a single Omniauth provider for
all user authentication.
2015-05-29 18:15:03 +02:00
Alex Lossent 22de5443c5 Add SAML support via Omniauth 2015-05-27 16:38:10 +02:00
Jakub Jirutka ed3298fc01 Allow to configure gitlab_shell_secret location 2015-05-16 21:46:06 +02:00
Dmitriy Zaporozhets 317ed1fa90 Revert "Allow to configure smtp and sendmail in gitlab.yml" 2015-05-06 17:39:18 +03:00
Jakub Jirutka b4be7aed77 Allow to configure smtp and sendmail in gitlab.yml 2015-05-06 13:15:33 +02:00
Stan Hu dc2b380da6 Fix config template from parse errors 2015-05-03 08:58:52 -07:00
Achilleas Pipinellis 62aa05dd0c Merge branch 'master' into 'master'
Update config.yml.example

See merge request !597
2015-05-03 12:05:19 +00:00
win32 fc79f7382c Update config.yml.example 2015-05-02 11:04:07 +00:00
Vinnie Okada bd557e4b64 Add new admin settings
Add new global application settings for default project and snippet
visibility levels.
2015-04-26 07:48:19 -06:00
Douwe Maan 55d086ba08 Clarify config var and add to LDAP docs. 2015-04-14 18:17:46 +02:00
Douwe Maan 238e4f0295 Add config var to block auto-created LDAP users. 2015-04-14 17:09:05 +02:00
Jacob Vosmaer f39b150a02 Call your existing LDAP server 'main'
By imposing this rule we avoid having to demand that 'ldapmain' exists
in the settings initializer.
2015-04-13 15:45:19 +02:00