summaryrefslogtreecommitdiff
path: root/lib/gitlab/metrics
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of `worker_label` in RubySampler30939-remove-worker-label-from-ruby-sampler-metricsAleksei Lipniagov2019-07-191-19/+6
| | | | | | We have Prometheus::PidProvider which sets correct worker id for a process, so such implementation of `worker_label` in the sampler is obsolete.
* Adjust redis cache metricsBen Kochie2019-07-191-3/+12
| | | | | | * Remove `controller` and `action` labels from duration histogram. * Create a new simple counter for `controller` and `action`. * Adjust histogram buckets to observe smaller response times.
* Remove unused methodRyan Cobb2019-07-111-4/+0
|
* Add a rubocop for Rails.loggerMayra Cabrera2019-07-102-2/+2
| | | | | | Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
* Expose metrics element for FE consumptionSarah Yasonik2019-07-101-0/+40
| | | | | | | | | | | Adds GFM Pipline filters to insert a placeholder in the generated HTML from GFM based on the presence of a metrics dashboard link. The front end should look for the class 'js-render-metrics' to determine if it should replace the element with metrics charts. The data element 'data-dashboard-url' should be the endpoint the front end should hit in order to obtain a dashboard layout in order to appropriately render the charts.
* Make unicorn_workers to return meaningful resultsfix-unicorn-sampler-workers-countKamil TrzciƄski2019-07-091-1/+10
|
* Fix process start timeRyan Cobb2019-07-042-13/+6
| | | | | Previously we were recording process start time as seconds from boot. This makes it so we record as epoch time.
* Use PROCESS_CPUTIME_ID for cpu time metricsAleksei Lipniagov2019-06-281-11/+3
| | | | | To measure ruby cpu time, we should use PROCESS_CPUTIME_ID instead of THREAD_CPUTIME_ID in our environments.
* Add permission check to dashboardsSarah Yasonik2019-06-271-0/+8
| | | | | | Adds permission checks to the metrics_dashboard endpoint. Users with role of Reporter or above should have access to view the metrics for a given project.
* Add embedding flag and filter to CPU/MemSarah Yasonik2019-06-203-10/+98
| | | | | | | | | | | This commits adds support for metrics dashboards for embedding. If the flag 'embedded' is provided to the environments/id/metrics_dashboard endpoint, the response will be suitable for embedding in issues or other content. This is a precursor for support for embedding metrics in GFM.
* Specify a dropdown name for dashboardsSarah Yasonik2019-06-142-1/+14
|
* Refactor for cleaner caching in dashboardsSarah Yasonik2019-06-134-25/+53
| | | | | | | | Opts to cache a full list of cached dashboards to better manage removing items from the cache. This also allows dashboards to be stored in the cache that don't necessarily correspond to a single dashboard yml.
* Merge branch 'prom-api-1' into 'master'Sean McGivern2019-06-114-6/+51
|\ | | | | | | | | Update server API to enable switch prometheus endpoint See merge request gitlab-org/gitlab-ce!29186
| * Switch errors to inherit from a base classprom-api-1syasonik2019-06-063-9/+9
| | | | | | | | | | | | | | | | | | | | Error classes associated with individual stages of dashboard processing tend to have very long names. As dashboard post-processing includes more steps, we will likely need to handle more error cases. Refactoring to have all errors inherit from a specific base class will help accommodate this and keep the code more readable.
| * Address rubocop errorssyasonik2019-06-061-2/+1
| |
| * Expose prometheus endpoint per metric in dashboardsyasonik2019-06-063-1/+47
| | | | | | | | | | | | | | | | Adds a new stage to dashboard processesing step for the EnvironmentsController::metrics_dashboard endpoint. Allows the front end to avoid generating the endpoint unitutive string mutations.
* | Adds sidekiq worker label for ruby metricsRyan Cobb2019-06-061-1/+1
|/
* Merge branch '61964-unicorn-instrumentation' into 'master'Bob Van Landuyt2019-06-043-21/+74
|\ | | | | | | | | | | | | Adds ruby and unicorn instrumentation Closes #61964 See merge request gitlab-org/gitlab-ce!28499
| * Add comment to clarify system proc stat field61964-unicorn-instrumentationRyan Cobb2019-06-041-0/+2
| |
| * Remove unnecessary super call in unicorn samplerRyan Cobb2019-06-031-4/+0
| |
| * Merge branch 'master' into 61964-unicorn-instrumentationRyan Cobb2019-05-291-0/+92
| |\
| * | Fix typo in system.rbRyan Cobb2019-05-201-1/+1
| | |
| * | Adds ruby and unicorn instrumentationRyan Cobb2019-05-203-17/+72
| | | | | | | | | | | | | | | | | | | | | This adds ruby and unicorn instrumentation. This was originally intended in 11.11 but due to performance concerns it was reverted. This new commit foregoes the sys-proctable gem was causing performance issues previously.
* | | Ignore Puma empty worker statsJan Provaznik2019-06-041-1/+2
| |/ |/| | | | | | | | | | | In some cases (during worker start) it's possible that Puma.stats returns an empty hash for worker's last status. In that case we just skip sampling of the worker until these stats are available.
* | Add Puma samplerJan Provaznik2019-05-291-0/+92
|/ | | | | This sampler gathers Puma-specific metrics which can be used by Prometheus then.
* Revert "Merge branch '56850-add-new-unicorn-metrics' into 'master'"revert-c5a9bc17Ryan Cobb2019-05-203-69/+17
| | | This reverts merge request !27474
* Merge branch '56850-add-new-unicorn-metrics' into 'master'Ash McKenzie2019-05-073-17/+69
|\ | | | | | | | | | | | | Resolve "Add new Unicorn metrics" Closes #56850 See merge request gitlab-org/gitlab-ce!27474
| * Add back ruby_memory_bytes metric, limit duplication, clean upRyan Cobb2019-04-292-9/+18
| | | | | | | | | | | | This adds back ruby_memory_bytes for backwards compatibility, limits code duplication, cleans up unused methods, and limits the unicorn worker sampling scope.
| * Cleanup syntax in System max_open_file_descriptorsRyan Cobb2019-04-261-4/+2
| |
| * Update docs and calculate process start time via proc tableRyan Cobb2019-04-242-20/+20
| | | | | | | | | | | | This updates monitor docs to reflect the new ruby and unicorn metrics as well as making it so we fetch process start time via the proc table instead of via CLOCK_BOOTTIME
| * Move process specific metrics to ruby samplerRyan Cobb2019-04-242-15/+15
| | | | | | | | | | These metrics are not unicorn specific and can be used across ruby processes
| * Adds new metrics for unicorn monitoringRyan Cobb2019-04-182-8/+53
| | | | | | | | | | | | This adds new metrics for monitoring unicorn. These metrics include process_cpu_seconds_total, process_start_time_seconds, process_max_fds, and unicorn_workers.
* | Run rubocop -a on CE filessh-upgrade-rubocop-0.68.0-ceStan Hu2019-05-051-1/+1
| |
* | Update metrics dashboard API to load yml from repoSarah Yasonik2019-05-018-47/+230
| | | | | | | | | | | | | | | | | | | | | | Updates the EnvironmentController#metrics_dashboard endpoint to support a "dashboard" param, which can be used to specify the filepath of a dashboard configuration from a project repository. Dashboard configurations are expected to be stored in .gitlab/dashboards/. Updates dashboard post-processing steps to exclude custom metrics, which should only display on the system dashboard.
* | Move dashboard param to initialize method60383-setup-dashboard-endpointsyasonik2019-04-256-18/+17
| |
* | Prefer safe_load and deep_symbolize_keyssyasonik2019-04-252-9/+8
| |
* | Move MetricsDashboard to Metrics::Dashboardsyasonik2019-04-256-0/+304
|/
* Filters branch and path labels for metricsRyan Cobb2019-04-041-3/+12
|
* Run rubocop -aNick Thomas2019-03-131-4/+2
|
* Update Metrics references to Object pathSarah Yasonik2019-02-1410-23/+23
| | | | | | | On reload, references to Metrics within classes in the Gitlab::Metrics module fail. Update all references to ::Gitlab::Metrics so that constant lookup finds the right module in development. This fix should not impact production.
* Clean up unicorn sampler metric labelsBen Kochie2019-02-061-4/+4
| | | | | Change `type` and `address` labels to be less generic to avoid conflicts with other systems.
* Port this style change from EELin Jen-Shin2019-01-301-3/+1
|
* Enable even more frozen string for lib/gitlabgfyoung2018-11-1624-1/+49
| | | | | | | | | | | | | | | | Enables frozen string for the following: * lib/gitlab/hook_data/**/*.rb * lib/gitlab/i18n/**/*.rb * lib/gitlab/import/**/*.rb * lib/gitlab/import_export/**/*.rb * lib/gitlab/kubernetes/**/*.rb * lib/gitlab/legacy_github_import/**/*.rb * lib/gitlab/manifest_import/**/*.rb * lib/gitlab/metrics/**/*.rb * lib/gitlab/middleware/**/*.rb Partially addresses gitlab-org/gitlab-ce#47424.
* Make getting a user by the username case insensitiveWilliam George2018-10-181-1/+1
|
* Ignore irrelevant sql commands in metricsMark Chao2018-09-051-0/+6
| | | | Fix #51005
* Add a 10 ms bucket for SQL timingstweak-sql-bucketsYorick Peterse2018-07-101-1/+1
| | | | | This allows us to calculate quantiles of SQL timings more accurately, instead of a lot of timings being assigned to the 50 ms bucket.
* Use stable gitlab-styles and eliminate offensesLin Jen-Shin2018-07-091-1/+0
|
* Updates from `rubocop -a`Lin Jen-Shin2018-07-092-3/+0
|
* Cleanup ruby sampler metricsbjk/48176_ruby_gcBen Kochie2018-06-221-12/+14
| | | | | | | | | * Use a simple counter for sampler duration instead of a histogram. * Use a counter to collect GC time. * Remove unused objects metric. * Cleanup metric names to match Prometheus conventions. * Prefix generic GC stats with `gc_stat`. * Include worker label on memory and file descriptor metrics.
* Merge branch 'limit-metrics-content-type' into 'master'Stan Hu2018-06-201-2/+7
|\ | | | | | | | | Limit the action suffixes in transaction metrics See merge request gitlab-org/gitlab-ce!20032