Skip to content
Snippets Groups Projects
  1. Mar 02, 2020
    • Craig Furman's avatar
      Stringify sidekiq job args in logs · 6c041a61
      Craig Furman authored
      If these logs are sent to Elasticsearch, it will not be able to process
      nested object fields, as this causes a type mismatch with scalar
      elements in the same array across log lines.
      
      This is a second attempt, as the first (reverted) one modified the
      actual job object that was used by sidekiq.
      6c041a61
  2. Feb 29, 2020
  3. Feb 28, 2020
    • Craig Furman's avatar
      Stringify sidekiq job args in logs · ec3f228c
      Craig Furman authored
      If these logs are sent to Elasticsearch, it will not be able to process
      nested object fields, as this causes a type mismatch with scalar
      elements in the same array across log lines.
      ec3f228c
  4. Feb 17, 2020
    • Sean McGivern's avatar
      Omit previous error from Sidekiq JSON logs · 5c030795
      Sean McGivern authored and Dylan Griffith's avatar Dylan Griffith committed
      Sidekiq stores a job's error details in the payload for the _next_ run,
      so that it can display the error in the Sidekiq UI. This is because
      Sidekiq's main state is the queue of jobs to be run. However, in our
      logs, this is very confusing, because we shouldn't have any error at all
      when a job starts, and we already add an error message and class to our
      logs when a job fails.
      5c030795
  5. Feb 14, 2020
    • Sean McGivern's avatar
      Limit size of params array in JSON logs to 10 KiB · f2d677ac
      Sean McGivern authored
      We did this for Sidekiq arguments, but not for HTTP request params. We
      now do the same everywhere: Sidekiq arguments, Grape params, and Rails
      controller params. As the params start life as hashes, the order is
      defined by whatever's creating the hashes.
      f2d677ac
  6. Jan 10, 2020
    • Stan Hu's avatar
      Make Sidekiq timestamps consistently ISO 8601 · f89237f0
      Stan Hu authored
      Previously when an exception occurred in Sidekiq, Sidekiq would export
      logs with timestamps (e.g. created_at, enqueued_at) in floating point
      seconds, while other jobs would report in ISO 8601 format. This
      inconsistency in data types would cause Elasticsearch to drop logs that
      did not match the schema type (date in most cases).
      
      This commit moves the responsibility of formatting timestamps to the
      Sidekiq JSON formatter where it properly belongs. The job logger now
      generates timestamps with floats, just as Sidekiq does. This ensures
      that timestamps are manipulated only in one place.
      
      See https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/8269
      f89237f0
  7. Jan 07, 2020
    • Sean McGivern's avatar
      Add database timings to Sidekiq JSON logs · f248f182
      Sean McGivern authored
      Sidekiq JSON logs have total duration, queuing time, Gitaly time, and
      CPU time. They don't (before this change) have database time.
      
      We provide two fields: db_duration and db_duration_s. That's because the
      units between the different duration fields are currently confusing, so
      providing an explicit unit moves us closer to that goal, while keeping
      the raw figure in the un-suffixed fields.
      f248f182
  8. Dec 17, 2019
  9. Oct 28, 2019
    • Andrew Newdigate's avatar
      Adds a Sidekiq queue duration metric · e1cbaf47
      Andrew Newdigate authored and Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ) committed
      Adds a Prometheus histogram, `sidekiq_jobs_queue_duration_seconds` for
      recording the duration that a Sidekiq job is queued for before being
      executed.
      
      This matches the scheduling_latency_s field emitted from structured
      logging for the same purpose.
      e1cbaf47
  10. Oct 11, 2019
    • Qingyu Zhao's avatar
      Fix Sidekiq job CPU time · 717f159b
      Qingyu Zhao authored
      When measure Sidekiq job CPU time usage, `Process.times` is wrong
      because it counts all threads CPU time in current Sidekiq proces.
      Use `Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID)` instead
      
      Removed `system_s`, `user_s`, and `child_s` - since we can not get
      these values for the job thread. Added `cpu_s`, this is CPU time
      used by the job thread, including system time and user time
      717f159b
  11. Sep 23, 2019
  12. Aug 22, 2019
  13. Aug 09, 2019
  14. Jul 31, 2019
  15. Jan 22, 2019
  16. Nov 20, 2018
    • gfyoung's avatar
      Enable even more frozen string for lib/gitlab · f93f8f56
      gfyoung authored
      Enables frozen string for the following:
      
      * lib/gitlab/patch/**/*.rb
      * lib/gitlab/popen/**/*.rb
      * lib/gitlab/profiler/**/*.rb
      * lib/gitlab/project_authorizations/**/*.rb
      * lib/gitlab/prometheus/**/*.rb
      * lib/gitlab/query_limiting/**/*.rb
      * lib/gitlab/quick_actions/**/*.rb
      * lib/gitlab/redis/**/*.rb
      * lib/gitlab/request_profiler/**/*.rb
      * lib/gitlab/search/**/*.rb
      * lib/gitlab/sherlock/**/*.rb
      * lib/gitlab/sidekiq_middleware/**/*.rb
      * lib/gitlab/slash_commands/**/*.rb
      * lib/gitlab/sql/**/*.rb
      * lib/gitlab/template/**/*.rb
      * lib/gitlab/testing/**/*.rb
      * lib/gitlab/utils/**/*.rb
      * lib/gitlab/webpack/**/*.rb
      
      Partially addresses gitlab-org/gitlab-ce#47424.
      f93f8f56
  17. Apr 04, 2018
Loading