Log system
- Tier: Free, Premium, Ultimate
- Offering: GitLab Self-Managed
The log system in GitLab provides comprehensive logging and monitoring capabilities for analyzing your GitLab instance. You can use logs to identify system issues, investigate security events, and analyze application performance. A log entry exists for every action, so when issues occur, these logs provide the data needed to quickly diagnose and resolve problems.
The log system:
- Tracks all application activity across GitLab components in structured log files.
- Records performance metrics, errors, and security events in standardized formats.
- Integrates with log analysis tools like Elasticsearch and Splunk through JSON logging.
- Maintains separate log files for different GitLab services and components.
- Includes correlation IDs to trace requests across the entire system.
System log files are typically plain text in a standard log file format.
The log system is similar to audit events. For more information, see also:
Log Levels
Each log message has an assigned log level that indicates its importance and verbosity. Each logger has an assigned minimum log level. A logger emits a log message only if its log level is equal to or above the minimum log level.
The following log levels are supported:
| Level | Name |
|---|---|
| 0 | DEBUG |
| 1 | INFO |
| 2 | WARN |
| 3 | ERROR |
| 4 | FATAL |
| 5 | UNKNOWN |
GitLab loggers emit all log messages because they are set to DEBUG by default.
Override default log level
You can override the minimum log level for GitLab loggers using the GITLAB_LOG_LEVEL environment variable.
Valid values are either a value of 0 to 5, or the name of the log level.
Example:
GITLAB_LOG_LEVEL=infoFor some services, other log levels are in place that are not affected by this setting. Some of these services have their own environment variables to override the log level. For example:
| Service | Log level | Environment variable |
|---|---|---|
| GitLab Cleanup | INFO | DEBUG |
| GitLab Doctor | INFO | VERBOSE |
| GitLab Export | INFO | EXPORT_DEBUG |
| GitLab Import | INFO | IMPORT_DEBUG |
| GitLab QA Runtime | INFO | QA_LOG_LEVEL |
| GitLab Product Usage Data | INFO | |
| Google APIs | INFO | |
| Rack Timeout | ERROR | |
| Snowplow Tracker | FATAL | |
| gRPC Client (Gitaly) | WARN | GRPC_LOG_LEVEL |
| LLM | INFO | LLM_DEBUG |
Log Rotation
The logs for a given service may be managed and rotated by:
logrotatesvlogd(runit’s service logging daemon)logrotateandsvlogd- Or not at all
The following table includes information about which daemon is responsible for managing and rotating logs for the included services:
- Logs managed by
svlogdare written to a file calledcurrent. Their archived versions are compressed into@<hexadecimal-ID>.sfiles. - The
logrotateservice built into GitLab manages all other logs. Their archived versions are compressed into<original-name>.<number>.gzfiles.
| Log type | Managed by logrotate | Managed by svlogd/runit |
|---|---|---|
| Alertmanager logs | No | |
| Consul logs | No | |
| crond logs | No | |
| Gitaly | ||
| GitLab Exporter for Linux package installations | No | |
| GitLab Pages logs | ||
| GitLab Rails | No | |
| GitLab Shell logs | No | |
| Grafana logs | No | |
| LogRotate logs | No | |
| Mailroom | ||
| NGINX | ||
| Patroni logs | No | |
| PgBouncer logs | No | |
| PostgreSQL logs | No | |
| Praefect logs | ||
| Prometheus logs | No | |
| Puma | ||
| Redis logs | No | |
| Registry logs | No | |
| Sentinel logs | No | |
| Sidekiq logs | No | |
| Workhorse logs |
For more information on the services that generate these logs, see the GitLab architecture overview.
Accessing logs on Helm chart installations
On Helm chart installations, GitLab components send logs to stdout, which can be accessed by using kubectl logs.
Logs are also available in the pod at /var/log/gitlab for the lifetime of the pod.
Pods with structured logs (subcomponent filtering)
Some pods include a subcomponent field that identifies the specific log type:
# Webservice pod logs (Rails application)
kubectl logs -l app=webservice -c webservice | jq 'select(."subcomponent"=="<subcomponent-key>")'
# Sidekiq pod logs (background jobs)
kubectl logs -l app=sidekiq | jq 'select(."subcomponent"=="<subcomponent-key>")'The following log sections indicate the appropriate pod and subcomponent key where applicable.
Other pods
For other GitLab components that don’t use structured logs with subcomponents, you can access logs directly.
To find available pod selectors:
# List all unique app labels in use
kubectl get pods -o jsonpath='{range .items[*]}{.metadata.labels.app}{"\n"}{end}' | grep -v '^$' | sort | uniq
# For pods with app labels
kubectl logs -l app=<pod-selector>
# For specific pods (when app labels aren't available)
kubectl get pods
kubectl logs <pod-name>For more Kubernetes troubleshooting commands, see the Kubernetes cheat sheet.
production_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/production_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/production_json.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="production_json"key on Helm chart installations.
It contains a structured log for Rails controller requests received from
GitLab, thanks to Lograge.
Requests from the API are logged to a separate file in api_json.log.
Each line contains JSON that can be ingested by services like Elasticsearch and Splunk. Line breaks were added to examples for legibility:
{
"method":"GET",
"path":"/gitlab/gitlab-foss/issues/1234",
"format":"html",
"controller":"Projects::IssuesController",
"action":"show",
"status":200,
"time":"2017-08-08T20:15:54.821Z",
"params":[{"key":"param_key","value":"param_value"}],
"remote_ip":"18.245.0.1",
"user_id":1,
"username":"admin",
"queue_duration_s":0.0,
"gitaly_calls":16,
"gitaly_duration_s":0.16,
"redis_calls":115,
"redis_duration_s":0.13,
"redis_read_bytes":1507378,
"redis_write_bytes":2920,
"correlation_id":"O1SdybnnIq7",
"cpu_s":17.50,
"db_duration_s":0.08,
"view_duration_s":2.39,
"duration_s":20.54,
"pid": 81836,
"worker_id":"puma_0"
}This example was a GET request for a specific issue. Each line also contains performance data, with times in seconds:
duration_s: Total time to retrieve the requestqueue_duration_s: Total time the request was queued inside GitLab Workhorseview_duration_s: Total time inside the Rails viewsdb_duration_s: Total time to retrieve data from PostgreSQLdb_write_bytes: Approximate bytes sent to PostgreSQL in write statementsdb_<database>_write_bytes: Approximate bytes sent to a database, such asmainorci, in write statementscpu_s: Total time spent on CPUgitaly_duration_s: Total time by Gitaly callsgitaly_calls: Total number of calls made to Gitalyredis_calls: Total number of calls made to Redisredis_cross_slot_calls: Total number of cross-slot calls made to Redisredis_allowed_cross_slot_calls: Total number of allowed cross-slot calls made to Redisredis_duration_s: Total time to retrieve data from Redisredis_read_bytes: Total bytes read from Redisredis_write_bytes: Total bytes written to Redisredis_<instance>_calls: Total number of calls made to a Redis instanceredis_<instance>_cross_slot_calls: Total number of cross-slot calls made to a Redis instanceredis_<instance>_allowed_cross_slot_calls: Total number of allowed cross-slot calls made to a Redis instanceredis_<instance>_duration_s: Total time to retrieve data from a Redis instanceredis_<instance>_read_bytes: Total bytes read from a Redis instanceredis_<instance>_write_bytes: Total bytes written to a Redis instancepid: The worker’s Linux process ID (changes when workers restart)worker_id: The worker’s logical ID (does not change when workers restart)
In GitLab 19.6 and later,
the db_write_bytes fields add up the size of the SQL text and the bind values of every statement
that is not a plain SELECT, such as INSERT, UPDATE, DELETE, and SELECT ... FOR UPDATE.
They show how much data a request or a Sidekiq job sent to PostgreSQL, not how much PostgreSQL
wrote to disk: an UPDATE that changes many rows can be a short statement.
A request or job that ran no such statements has no db_write_bytes fields.
The availability of the db_write_bytes fields is controlled by the log_db_write_bytes
feature flag. This flag is disabled by default.
User clone and fetch activity using HTTP transport appears in the log as action: git_upload_pack.
In addition, the log contains the originating IP address
(remote_ip), the user’s ID (user_id), and username (username).
Some endpoints (such as /search) may make requests to Elasticsearch if using
advanced search. These
additionally log elasticsearch_calls and elasticsearch_duration_s,
which correspond to:
elasticsearch_calls: Total number of calls to Elasticsearchelasticsearch_duration_s: Total time taken by Elasticsearch callselasticsearch_timed_out_count: Total number of calls to Elasticsearch that timed out and therefore returned partial results
Search requests also log meta.search.request_id, a UUID that identifies a single
search request. The same value is sent as the property of the perform_search and
click_search_result events, so a result click can be attributed to the search that
returned it. Requests that log no meta.search.request_id emitted no perform_search
event.
Requests that read or write secrets with the GitLab Secrets Manager
additionally log openbao_calls and openbao_duration_s, which correspond to:
openbao_calls: Total number of calls to OpenBaoopenbao_duration_s: Total time taken by OpenBao calls
In GitLab 19.6 and later, requests that query ClickHouse additionally log:
clickhouse_queries_count: Total number of ClickHouse queriesclickhouse_rows_read: Total number of rows ClickHouse read to answer those queriesclickhouse_bytes_read: Total number of bytes ClickHouse read to answer those queriesclickhouse_duration_s: Total time taken by ClickHouse queriesclickhouse_read_duration_s: Time taken by queries run withClickHouse::Client.select(GitLab 19.7 and later)clickhouse_execute_duration_s: Time taken by all other queries, such as inserts andClickHouse::Client.executecalls (GitLab 19.7 and later)
In GitLab 19.5 and later, requests that
the LabKit rate limiter evaluates also log rate_limit_state. The field is added to the
per-request structured logs, including production_json.log and api_json.log.
The field is an array of strings with the format <limiter>:<rule>:<result>.
The array has an entry for each rate limit rule that counted the request or ended the check. For example:
"rate_limit_state": ["rack_request:unauthenticated_api:log"]<result> is one of:
allow: The request did not exceed the limit of the rule.log: The request exceeded the limit of a rule that only logs, like a throttle in dry run mode. GitLab does not block the request.block: The request exceeded the limit of a rule that can block requests. This result does not always mean that GitLab rejected the request.banned: The request exceeded the limit of a rule that bans the client.skip: A rule ended the rate limit check without counting the request (for example, because the request bypassed the rate limiter).
Requests that produce no LabKit rule result do not log rate_limit_state.
A missing field means that no rule produced a result for the request, not that telemetry failed.
The legacy Rack::Attack rate limiter does not log rate_limit_state.
For its events, see auth.log.
ActionCable connection and subscription events are also logged to this file and they follow the
previous format. The method, path, and format fields are not applicable, and are always empty.
The ActionCable connection or channel class is used as the controller.
{
"method":null,
"path":null,
"format":null,
"controller":"IssuesChannel",
"action":"subscribe",
"status":200,
"time":"2020-05-14T19:46:22.008Z",
"params":[{"key":"project_path","value":"gitlab/gitlab-foss"},{"key":"iid","value":"1"}],
"remote_ip":"127.0.0.1",
"user_id":1,
"username":"admin",
"ua":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0",
"correlation_id":"jSOIEynHCUa",
"duration_s":0.32566
}If an error occurs, an
exception field is included with class, message, and
backtrace. Previous versions included an error field instead of
exception.class and exception.message. For example:
{
"method": "GET",
"path": "/admin",
"format": "html",
"controller": "Admin::DashboardController",
"action": "index",
"status": 500,
"time": "2019-11-14T13:12:46.156Z",
"params": [],
"remote_ip": "127.0.0.1",
"user_id": 1,
"username": "root",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0",
"queue_duration": 274.35,
"correlation_id": "KjDVUhNvvV3",
"queue_duration_s":0.0,
"gitaly_calls":16,
"gitaly_duration_s":0.16,
"redis_calls":115,
"redis_duration_s":0.13,
"correlation_id":"O1SdybnnIq7",
"cpu_s":17.50,
"db_duration_s":0.08,
"view_duration_s":2.39,
"duration_s":20.54,
"pid": 81836,
"worker_id": "puma_0",
"exception.class": "NameError",
"exception.message": "undefined local variable or method `adsf' for #<Admin::DashboardController:0x00007ff3c9648588>",
"exception.backtrace": [
"app/controllers/admin/dashboard_controller.rb:11:in `index'",
"ee/app/controllers/ee/admin/dashboard_controller.rb:14:in `index'",
"ee/lib/gitlab/ip_address_state.rb:10:in `with'",
"ee/app/controllers/ee/application_controller.rb:43:in `set_current_ip_address'",
"lib/gitlab/session.rb:11:in `with_session'",
"app/controllers/application_controller.rb:450:in `set_session_storage'",
"app/controllers/application_controller.rb:444:in `set_locale'",
"ee/lib/gitlab/jira/middleware.rb:19:in `call'"
]
}production.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/production.logfile on Linux package installations. - In the
/home/git/gitlab/log/production.logfile on self-compiled installations.
It contains information about all performed requests. You can see the URL and type of request, IP address, and what parts of code were involved to service this particular request. Also, you can see all SQL requests performed, and how much time each took. This task is more useful for GitLab contributors and developers. Use part of this log file when you’re reporting bugs. For example:
Started GET "/gitlabhq/yaml_db/tree/master" for 168.111.56.1 at 2015-02-12 19:34:53 +0200
Processing by Projects::TreeController#show as HTML
Parameters: {"project_id"=>"gitlabhq/yaml_db", "id"=>"master"}
... [CUT OUT]
Namespaces"."created_at" DESC, "namespaces"."id" DESC LIMIT 1 [["id", 26]]
CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members"."type" IN ('ProjectMember') AND "members"."source_id" = $1 AND "members"."source_type" = $2 AND "members"."user_id" = 1 ORDER BY "members"."created_at" DESC, "members"."id" DESC LIMIT 1 [["source_id", 18], ["source_type", "Project"]]
CACHE (0.0ms) SELECT "members".* FROM "members" WHERE "members"."source_type" = 'Project' AND "members".
(1.4ms) SELECT COUNT(*) FROM "merge_requests" WHERE "merge_requests"."target_project_id" = $1 AND ("merge_requests"."state" IN ('opened','reopened')) [["target_project_id", 18]]
Rendered layouts/nav/_project.html.haml (28.0ms)
Rendered layouts/_collapse_button.html.haml (0.2ms)
Rendered layouts/_flash.html.haml (0.1ms)
Rendered layouts/_page.html.haml (32.9ms)
Completed 200 OK in 166ms (Views: 117.4ms | ActiveRecord: 27.2ms)In this example, the server processed an HTTP request with URL
/gitlabhq/yaml_db/tree/master from IP 168.111.56.1 at 2015-02-12 19:34:53 +0200.
The request was processed by Projects::TreeController.
api_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/api_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/api_json.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="api_json"key on Helm chart installations.
It helps you see requests made directly to the API. For example:
{
"time":"2018-10-29T12:49:42.123Z",
"severity":"INFO",
"duration":709.08,
"db":14.59,
"view":694.49,
"status":200,
"method":"GET",
"path":"/api/v4/projects",
"params":[{"key":"action","value":"git-upload-pack"},{"key":"changes","value":"_any"},{"key":"key_id","value":"secret"},{"key":"secret_token","value":"[FILTERED]"}],
"host":"localhost",
"remote_ip":"::1",
"ua":"Ruby",
"route":"/api/:version/projects",
"user_id":1,
"username":"root",
"queue_duration":100.31,
"gitaly_calls":30,
"gitaly_duration":5.36,
"pid": 81836,
"worker_id": "puma_0",
...
}This entry shows an internal endpoint accessed to check whether an
associated SSH key can download the project in question by using a git fetch or
git clone. In this example, we see:
duration: Total time in milliseconds to retrieve the requestqueue_duration: Total time in milliseconds the request was queued inside GitLab Workhorsemethod: The HTTP method used to make the requestpath: The relative path of the queryparams: Key-value pairs passed in a query string or HTTP body (sensitive parameters, such as passwords and tokens, are filtered out)ua: The User-Agent of the requester
As of Grape Logging v1.8.4,
the view_duration_s is calculated by duration_s - db_duration_s.
Therefore, view_duration_s can be affected by multiple different factors, like read-write
process on Redis or external HTTP, not only the serialization process.
application.log (deprecated)
This log is located:
- In the
/var/log/gitlab/gitlab-rails/application.logfile on Linux package installations. - In the
/home/git/gitlab/log/application.logfile on self-compiled installations.
It contains a less structured version of the logs in
application_json.log, like this example:
October 06, 2014 11:56: User "Administrator" (admin@example.com) was created
October 06, 2014 11:56: Documentcloud created a new project "Documentcloud / Underscore"
October 06, 2014 11:56: Gitlab Org created a new project "Gitlab Org / Gitlab Ce"
October 07, 2014 11:25: User "Claudie Hodkiewicz" (nasir_stehr@olson.co.uk) was removed
October 07, 2014 11:25: Project "project133" was removedapplication_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/application_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/application_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="application_json"key on Helm chart installations.
It helps you discover events happening in your instance such as user creation and project deletion. For example:
{
"severity":"INFO",
"time":"2020-01-14T13:35:15.466Z",
"correlation_id":"3823a1550b64417f9c9ed8ee0f48087e",
"message":"User \"Administrator\" (admin@example.com) was created"
}
{
"severity":"INFO",
"time":"2020-01-14T13:35:15.466Z",
"correlation_id":"78e3df10c9a18745243d524540bd5be4",
"message":"Project \"project133\" was removed"
}redacted_search_results.log
The redacted_search_results.log file records search results that GitLab
removes because the searching user cannot read them.
When GitLab filters out at least one result, it writes an ERROR entry.
Use this log to investigate
results excluded from a search.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/redacted_search_results.logfile on Linux package installations. - In the
/home/git/gitlab/log/redacted_search_results.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="redacted_search_results"key on Helm chart installations.
Each JSON entry includes a filtered array that identifies excluded results
by object class, ID, and the permission checked.
It also includes the search query and search context, such as the search
type, level, scope, group ID, and project ID.
Because queries can contain sensitive information, restrict access to this
log and review its contents before sharing it.
integrations_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/integrations_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/integrations_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="integrations_json"key on Helm chart installations.
It contains information about integration activities, such as Jira, Asana, and irker services. It uses JSON format, like this example:
{
"severity":"ERROR",
"time":"2018-09-06T14:56:20.439Z",
"service_class":"Integrations::Jira",
"project_id":8,
"project_path":"h5bp/html5-boilerplate",
"message":"Error sending message",
"client_url":"http://jira.gitlab.com:8080",
"error":"execution expired"
}
{
"severity":"INFO",
"time":"2018-09-06T17:15:16.365Z",
"service_class":"Integrations::Jira",
"project_id":3,
"project_path":"namespace2/project2",
"message":"Successfully posted",
"client_url":"http://jira.example.com"
}kubernetes.log (deprecated)
This log is located:
- In the
/var/log/gitlab/gitlab-rails/kubernetes.logfile on Linux package installations. - In the
/home/git/gitlab/log/kubernetes.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="kubernetes"key on Helm chart installations.
It logs information related to certificate-based clusters, such as connectivity errors. Each line contains JSON that can be ingested by services like Elasticsearch and Splunk.
git_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/git_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/git_json.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="git_json"key on Helm chart installations.
GitLab has to interact with Git repositories, but in some rare cases something can go wrong. If this happens, you need to know exactly what happened. This log file contains all failed requests from GitLab to Git repositories. In the majority of cases this file is useful for developers only. For example:
{
"severity":"ERROR",
"time":"2019-07-19T22:16:12.528Z",
"correlation_id":"FeGxww5Hj64",
"message":"Command failed [1]: /usr/bin/git --git-dir=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq/.git --work-tree=/Users/vsizov/gitlab-development-kit/gitlab/tmp/tests/gitlab-satellites/group184/gitlabhq merge --no-ff -mMerge branch 'feature_conflict' into 'feature' source/feature_conflict\n\nerror: failed to push some refs to '/Users/vsizov/gitlab-development-kit/repositories/gitlabhq/gitlab_git.git'"
}audit_json.log
- Tier: Free, Premium, Ultimate
- Offering: GitLab Self-Managed, GitLab Dedicated
GitLab Free tracks a small number of different audit events. GitLab Premium tracks many more.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/audit_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/audit_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="audit_json"key on Helm chart installations.
Changes to group or project settings and memberships (target_details)
are logged to this file. For example:
{
"severity":"INFO",
"time":"2018-10-17T17:38:22.523Z",
"author_id":3,
"entity_id":2,
"entity_type":"Project",
"change":"visibility",
"from":"Private",
"to":"Public",
"author_name":"John Doe4",
"target_id":2,
"target_type":"Project",
"target_details":"namespace2/project2"
}Sidekiq logs
For Linux package installations, some Sidekiq logs are in /var/log/gitlab/sidekiq/current
and as follows.
sidekiq.log
This log is located:
- In the
/var/log/gitlab/sidekiq/currentfile on Linux package installations. - In the
/home/git/gitlab/log/sidekiq.logfile on self-compiled installations.
The default log format for GitLab Helm chart installations is json.
GitLab uses background jobs for processing tasks which can take a long time. All information about processing these jobs are written to this file. For example:
{
"severity":"INFO",
"time":"2018-04-03T22:57:22.071Z",
"queue":"cronjob:update_all_mirrors",
"args":[],
"class":"UpdateAllMirrorsWorker",
"retry":false,
"queue_namespace":"cronjob",
"jid":"06aeaa3b0aadacf9981f368e",
"created_at":"2018-04-03T22:57:21.930Z",
"enqueued_at":"2018-04-03T22:57:21.931Z",
"pid":10077,
"worker_id":"sidekiq_0",
"message":"UpdateAllMirrorsWorker JID-06aeaa3b0aadacf9981f368e: done: 0.139 sec",
"job_status":"done",
"duration":0.139,
"completed_at":"2018-04-03T22:57:22.071Z",
"db_duration":0.05,
"db_duration_s":0.0005,
"gitaly_duration":0,
"gitaly_calls":0
}Jobs enqueued by a request, or by another job, share the correlation_id of that request or job.
The correlation_duration_s field is the time in seconds since the root request or job of that chain
started, so a filter like correlation_duration_s > 3600 finds jobs that belong to a long-running chain.
The start time does not cross HTTP or gRPC calls, so a chain that passes through a request, for example
when a job pushes to a repository and Gitaly calls the internal API, starts a new measurement at that request.
The correlation_depth field is the depth of the job in that chain. A job enqueued by a request, or outside
one, has depth 1, and a job enqueued by another job is one deeper than that job, so a filter like
correlation_depth > 100 finds jobs that keep enqueueing themselves.
Sidekiq pushes retried, deferred, and scheduled jobs again, and both fields keep their values across such a
push. The duration therefore includes retry backoff and the delay of a scheduled job, and the depth of the
job does not change.
The availability of correlation_duration_s and correlation_depth is controlled by the
log_correlation_duration feature flag. This flag is disabled by default.
Instead of JSON logs, you can opt to generate text logs for Sidekiq. For example:
2023-05-16T16:08:55.272Z pid=82525 tid=23rl INFO: Initializing websocket
2023-05-16T16:08:55.279Z pid=82525 tid=23rl INFO: Booted Rails 6.1.7.2 application in production environment
2023-05-16T16:08:55.279Z pid=82525 tid=23rl INFO: Running in ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [arm64-darwin22]
2023-05-16T16:08:55.279Z pid=82525 tid=23rl INFO: See LICENSE and the LGPL-3.0 for licensing details.
2023-05-16T16:08:55.279Z pid=82525 tid=23rl INFO: Upgrade to Sidekiq Pro for more features and support: https://sidekiq.org
2023-05-16T16:08:55.286Z pid=82525 tid=7p4t INFO: Cleaning working queues
2023-05-16T16:09:06.043Z pid=82525 tid=7p7d class=ScheduleMergeRequestCleanupRefsWorker jid=efcc73f169c09a514b06da3f INFO: start
2023-05-16T16:09:06.050Z pid=82525 tid=7p7d class=ScheduleMergeRequestCleanupRefsWorker jid=efcc73f169c09a514b06da3f INFO: arguments: []
2023-05-16T16:09:06.065Z pid=82525 tid=7p81 class=UserStatusCleanup::BatchWorker jid=e279aa6409ac33031a314822 INFO: start
2023-05-16T16:09:06.066Z pid=82525 tid=7p81 class=UserStatusCleanup::BatchWorker jid=e279aa6409ac33031a314822 INFO: arguments: []For Linux package installations, add the configuration option:
sidekiq['log_format'] = 'text'For self-compiled installations, edit the gitlab.yml and set the Sidekiq
log_format configuration option:
## Sidekiq
sidekiq:
log_format: textsidekiq_client.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/sidekiq_client.logfile on Linux package installations. - In the
/home/git/gitlab/log/sidekiq_client.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="sidekiq_client"key on Helm chart installations.
This file contains logging information about jobs before Sidekiq starts processing them, such as before being enqueued.
This log file follows the same structure as
sidekiq.log, so it is structured as JSON if
you’ve configured this for Sidekiq as mentioned previously.
gitlab-shell.log
GitLab Shell is used by GitLab for executing Git commands and provide SSH access to Git repositories.
Information containing git-{upload-pack,receive-pack} requests is at
/var/log/gitlab/gitlab-shell/gitlab-shell.log. Information about hooks to
GitLab Shell from Gitaly is at /var/log/gitlab/gitaly/current.
Example log entries for /var/log/gitlab/gitlab-shell/gitlab-shell.log:
{
"duration_ms": 74.104,
"level": "info",
"method": "POST",
"msg": "Finished HTTP request",
"time": "2020-04-17T20:28:46Z",
"url": "http://127.0.0.1:8080/api/v4/internal/allowed"
}
{
"command": "git-upload-pack",
"git_protocol": "",
"gl_project_path": "root/example",
"gl_repository": "project-1",
"level": "info",
"msg": "executing git command",
"time": "2020-04-17T20:28:46Z",
"user_id": "user-1",
"username": "root"
}Example log entries for /var/log/gitlab/gitaly/current:
{
"method": "POST",
"url": "http://127.0.0.1:8080/api/v4/internal/allowed",
"duration": 0.058012959,
"gitaly_embedded": true,
"pid": 16636,
"level": "info",
"msg": "finished HTTP request",
"time": "2020-04-17T20:29:08+00:00"
}
{
"method": "POST",
"url": "http://127.0.0.1:8080/api/v4/internal/pre_receive",
"duration": 0.031022552,
"gitaly_embedded": true,
"pid": 16636,
"level": "info",
"msg": "finished HTTP request",
"time": "2020-04-17T20:29:08+00:00"
}Gitaly logs
This file is in /var/log/gitlab/gitaly/current and is produced by runit.
runit is packaged with the Linux package and a brief explanation of its purpose
is available in the Linux package documentation.
grpc.log
This file is at /var/log/gitlab/gitlab-rails/grpc.log for Linux
package installations. Native gRPC logging used by Gitaly.
gitaly_hooks.log
This file is at /var/log/gitlab/gitaly/gitaly_hooks.log and is
produced by gitaly-hooks command. It also contains records about
failures received during processing of the responses from GitLab API.
Puma logs
puma_stdout.log
This log is located:
- In the
/var/log/gitlab/puma/puma_stdout.logfile on Linux package installations. - In the
/home/git/gitlab/log/puma_stdout.logfile on self-compiled installations.
puma_stderr.log
This log is located:
- In the
/var/log/gitlab/puma/puma_stderr.logfile on Linux package installations. - In the
/home/git/gitlab/log/puma_stderr.logfile on self-compiled installations.
repocheck.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/repocheck.logfile on Linux package installations. - In the
/home/git/gitlab/log/repocheck.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="repocheck"key on Helm chart installations.
It logs information whenever a repository check is run on a project.
importer.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/importer.logfile on Linux package installations. - In the
/home/git/gitlab/log/importer.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="importer"key on Helm chart installations.
This file logs the progress of project imports and migrations.
exporter.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/exporter.logfile on Linux package installations. - In the
/home/git/gitlab/log/exporter.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="exporter"key on Helm chart installations.
It logs the progress of the export process.
features_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/features_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/features_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="features_json"key on Helm chart installations.
The modification events from Feature flags in development of GitLab are recorded in this file. For example:
{"severity":"INFO","time":"2020-11-24T02:30:59.860Z","correlation_id":null,"key":"cd_auto_rollback","action":"enable","extra.thing":"true"}
{"severity":"INFO","time":"2020-11-24T02:31:29.108Z","correlation_id":null,"key":"cd_auto_rollback","action":"enable","extra.thing":"true"}
{"severity":"INFO","time":"2020-11-24T02:31:29.129Z","correlation_id":null,"key":"cd_auto_rollback","action":"disable","extra.thing":"false"}
{"severity":"INFO","time":"2020-11-24T02:31:29.177Z","correlation_id":null,"key":"cd_auto_rollback","action":"enable","extra.thing":"Project:1"}
{"severity":"INFO","time":"2020-11-24T02:31:29.183Z","correlation_id":null,"key":"cd_auto_rollback","action":"disable","extra.thing":"Project:1"}
{"severity":"INFO","time":"2020-11-24T02:31:29.188Z","correlation_id":null,"key":"cd_auto_rollback","action":"enable_percentage_of_time","extra.percentage":"50"}
{"severity":"INFO","time":"2020-11-24T02:31:29.193Z","correlation_id":null,"key":"cd_auto_rollback","action":"disable_percentage_of_time"}
{"severity":"INFO","time":"2020-11-24T02:31:29.198Z","correlation_id":null,"key":"cd_auto_rollback","action":"enable_percentage_of_actors","extra.percentage":"50"}
{"severity":"INFO","time":"2020-11-24T02:31:29.203Z","correlation_id":null,"key":"cd_auto_rollback","action":"disable_percentage_of_actors"}
{"severity":"INFO","time":"2020-11-24T02:31:29.329Z","correlation_id":null,"key":"cd_auto_rollback","action":"remove"}ci_resource_groups_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/ci_resource_groups_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/ci_resource_group_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="ci_resource_groups_json"key on Helm chart installations.
It contains information about resource group acquisition. For example:
{"severity":"INFO","time":"2023-02-10T23:02:06.095Z","correlation_id":"01GRYS10C2DZQ9J1G12ZVAD4YD","resource_group_id":1,"processable_id":288,"message":"attempted to assign resource to processable","success":true}
{"severity":"INFO","time":"2023-02-10T23:02:08.945Z","correlation_id":"01GRYS138MYEG32C0QEWMC4BDM","resource_group_id":1,"processable_id":288,"message":"attempted to release resource from processable","success":true}The examples show the resource_group_id, processable_id, message, and success fields for each entry.
auth.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/auth.logfile on Linux package installations. - In the
/home/git/gitlab/log/auth.logfile on self-compiled installations.
This log records:
- Requests over the Rate Limit on raw endpoints.
- Protected paths abusive requests.
- User ID and username, if available.
auth_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/auth_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/auth_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="auth_json"key on Helm chart installations.
This file contains the JSON version of the logs in auth.log, for example:
{
"severity":"ERROR",
"time":"2023-04-19T22:14:25.893Z",
"correlation_id":"01GYDSAKAN2SPZPAMJNRWW5H8S",
"message":"Rack_Attack",
"env":"blocklist",
"remote_ip":"x.x.x.x",
"method":"GET",
"path":"/group/project.git/info/refs?service=git-upload-pack"
}Rate_Limit_Block messages
When the LabKit rate limiter blocks a request, GitLab returns a 429 status code
before the request reaches a controller or an API endpoint.
production_json.log and api_json.log have no entry for the blocked request.
Instead, GitLab logs a Rate_Limit_Block message to auth_json.log.
To limit the log volume, GitLab does not log a message for every blocked request. GitLab logs a message only when the request count of a rule reaches one of these values:
- One more than the limit.
- Two, four, eight, or a higher power of two times the limit.
For example, for a limit of 60 requests each hour, GitLab logs a message for requests 61, 120, 240, and 480 in that hour.
The count is separate for each client that the rule counts, as shown in the counted_by field.
For example:
{
"severity":"ERROR",
"time":"2026-10-30T09:21:14.512Z",
"correlation_id":"01JBRZ6Q7J5Y0T8V2N4K6M8P0R",
"message":"Rate_Limit_Block",
"status":429,
"matched":"throttle_unauthenticated_api",
"rule":"unauthenticated_api",
"remote_ip":"x.x.x.x",
"path":"/api/v4/projects",
"method":"GET",
"limit":500,
"period_s":60,
"count":501,
"counted_by":{"ip":"x.x.x.x"},
"rate_limit_state":["rack_request:unauthenticated_api:block"]
}The message has these fields:
| Field | Description |
|---|---|
severity | Always ERROR. |
time | Time that GitLab logged the message, in UTC. |
correlation_id | Correlation ID of the blocked request that GitLab logged. |
message | Always Rate_Limit_Block. |
status | Always 429. |
matched | Name of the throttle that blocked the request. For a rule with no throttle, the name of the rule. The Rack_Attack message uses the same field name. |
rule | Name of the LabKit rule that blocked the request. |
remote_ip | IP address of the client. GitLab logs this field for every rule, also for rules that count requests by requester. |
path | Path of the request, without the query string. If GitLab is installed under a relative URL, the path does not include the relative URL. The path field of a Rack_Attack message includes both. |
method | HTTP method of the request. |
limit | Number of requests that the rule allows in each period. |
period_s | Length of the period, in seconds. |
count | Number of requests that the rule counted for this client in the current period. |
counted_by | Values that the rule counts requests by, for example ip for a rule that counts by IP address. For a rule that counts by authenticated requester, the field contains requester_type (user or deploy_token) and requester_id. Some rules count by other values, such as aid. For an IPv6 client, the ip value can be the network of the client instead of its exact address. |
rate_limit_state | Rate limit rules that counted the request or ended the check. The format is the same as the rate_limit_state field in production_json.log. |
To find the requests that GitLab blocked for a user or an IP address:
- In
auth_json.log, search forRate_Limit_Blockmessages in the time period of the problem. - Filter the messages by
counted_by,remote_ip, orpath.
GitLab does not log most blocked requests, so most blocked requests have no Rate_Limit_Block message.
If you search for the correlation_id of a blocked request, you find a Rate_Limit_Block message only if GitLab logged that request.
rate_limit_block_summary messages
The availability of this feature is controlled by a feature flag. For more information, see the history.
Each Puma worker counts the requests that the LabKit rate limiter blocks, by endpoint and rule.
About every 15 minutes, the worker logs one rate_limit_block_summary message to auth_json.log
for each endpoint and rule that it blocked requests for.
When a worker stops gracefully, it logs the counts it has left.
Each message has the counts of one worker only.
To get the number of blocked requests for an endpoint, add the block_count values of all messages in the time period.
Each worker counts up to five endpoint and rule pairs in each period.
The worker counts the blocks for any other pair in one message, with endpoint_id and rate_limit_rule set to other.
For example:
{
"severity":"INFO",
"time":"2026-11-05T09:25:00.104Z",
"message":"rate_limit_block_summary",
"endpoint_id":"GET /api/:version/projects",
"rate_limit_rule":"unauthenticated_api",
"feature_category":"groups_and_projects",
"block_count":42
}The message has these fields:
| Field | Description |
|---|---|
severity | Always INFO. |
time | Time that GitLab logged the message, in UTC. |
message | Always rate_limit_block_summary. |
endpoint_id | Endpoint that the blocked requests were for. unknown when GitLab cannot find the endpoint without a database lookup, such as for project and group pages, and for an API path with no endpoint. other for the blocks of pairs over the limit of five. |
rate_limit_rule | Name of the LabKit rule that blocked the requests. The same value as the rule field of a Rate_Limit_Block message. other for the blocks of pairs over the limit of five. |
feature_category | Feature category of the endpoint. unknown when the endpoint has no feature category, and for every message with an endpoint_id of unknown. Not present in the message for other. |
block_count | Number of requests that the rule blocked for this endpoint on this worker since the worker’s previous message. |
graphql_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/graphql_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/graphql_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="graphql_json"key on Helm chart installations.
GraphQL queries are recorded in the file. For example:
{"query_string":"query IntrospectionQuery{__schema {queryType { name },mutationType { name }}}...(etc)","variables":{"a":1,"b":2},"complexity":181,"depth":1,"duration_s":7}clickhouse.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/clickhouse.logfile on Linux package installations. - In the
/home/git/gitlab/log/clickhouse.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="clickhouse"key.
The clickhouse.log file logs information related to the
ClickHouse database client in GitLab.
migrations.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/migrations.logfile on Linux package installations. - In the
/home/git/gitlab/log/migrations.logfile on self-compiled installations.
This file logs the progress of database migrations.
mail_room_json.log (default)
This log is located:
- In the
/var/log/gitlab/mailroom/mail_room_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/mail_room_json.logfile on self-compiled installations.
This structured log file records internal activity in the mail_room gem.
Its name and path are configurable, so the name and path may not match this one
documented previously.
web_hooks.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/web_hooks.logfile on Linux package installations. - In the
/home/git/gitlab/log/web_hooks.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="web_hooks"key on Helm chart installations.
The back-off, disablement, and re-enablement events for webhooks are recorded in this file. For example:
{"severity":"INFO","time":"2020-11-24T02:30:59.860Z","hook_id":12,"action":"backoff","disabled_until":"2020-11-24T04:30:59.860Z","recent_failures":2}
{"severity":"INFO","time":"2020-11-24T02:30:59.860Z","hook_id":12,"action":"disable","disabled_until":null,"recent_failures":100}
{"severity":"INFO","time":"2020-11-24T02:30:59.860Z","hook_id":12,"action":"enable","disabled_until":null,"recent_failures":0}Reconfigure logs
Reconfigure log files are in /var/log/gitlab/reconfigure for Linux package installations. Self-compiled installations
don’t have reconfigure logs. A reconfigure log is populated whenever gitlab-ctl reconfigure is run manually or as part
of an upgrade.
Reconfigure log files are named according to the UNIX timestamp of when the reconfigure
was initiated, such as 1509705644.log
sidekiq_exporter.log and web_exporter.log
If Prometheus metrics and the Sidekiq Exporter are both enabled, Sidekiq
starts a Web server and listens to the defined port (default:
8082). By default, Sidekiq Exporter access logs are disabled but can
be enabled:
- Use the
sidekiq['exporter_log_enabled'] = trueoption in/etc/gitlab/gitlab.rbon Linux package installations. - Use the
sidekiq_exporter.log_enabledoption ingitlab.ymlon self-compiled installations.
When enabled, depending on your installation method, this file is located at:
/var/log/gitlab/gitlab-rails/sidekiq_exporter.logon Linux package installations./home/git/gitlab/log/sidekiq_exporter.logon self-compiled installations.
If Prometheus metrics and the Web Exporter are both enabled, Puma
starts a Web server and listens to the defined port (default: 8083), and access logs
are generated in a location based on your installation method:
/var/log/gitlab/gitlab-rails/web_exporter.logon Linux package installations./home/git/gitlab/log/web_exporter.logon self-compiled installations.
database_load_balancing.log
- Tier: Premium, Ultimate
- Offering: GitLab Self-Managed
Contains details of GitLab Database Load Balancing.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/database_load_balancing.logfile on Linux package installations. - In the
/home/git/gitlab/log/database_load_balancing.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="database_load_balancing"key on Helm chart installations.
zoekt.log
- Tier: Premium, Ultimate
- Offering: GitLab Self-Managed
This file logs information related to exact code search.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/zoekt.logfile on Linux package installations. - In the
/home/git/gitlab/log/zoekt.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="zoekt"key on Helm chart installations.
zoekt.log fields
Entries from the periodic metrics cron job are distinguished by the metric
field (node_metrics, indices_metrics, or enabled_namespaces_metrics). Per-request log entries do not
carry a metric field and instead append the Zoekt fields documented below
to whichever Rails request or Sidekiq job log line they were captured in.
Node metrics entries (metric: node_metrics)
These entries are emitted once per online Zoekt node by the periodic metrics cron job.
| Field | Type | Description |
|---|---|---|
enabled_namespaces_count | Integer | Number of namespaces enabled for exact code search on this node |
indices_count | Integer | Number of repository indices on this node |
task_count_pending | Integer | Number of indexing tasks in the pending state |
task_count_failed | Integer | Number of indexing tasks in the failed state |
task_count_processing_queue | Integer | Number of indexing tasks ready to be processed (state is pending or processing with perform_at <= now) |
task_count_orphaned | Integer | Number of indexing tasks in the orphaned state |
task_count_done | Integer | Number of indexing tasks in the done state |
meta | Object | Node metadata, including the node ID and URL |
Indices metrics entries (metric: indices_metrics)
These entries are emitted once per metrics collection cycle.
The key meta.zoekt.with_stale_used_storage_bytes_updated_at is a literal
flat key name with dots, not a nested object path.
| Field | Type | Description |
|---|---|---|
meta.zoekt.with_stale_used_storage_bytes_updated_at | Integer | Number of Zoekt indices whose used_storage_bytes value has not been updated recently |
Enabled namespaces metrics entries (metric: enabled_namespaces_metrics)
These entries are emitted once per metrics collection cycle.
The key meta.zoekt.enabled_namespaces_without_replicas is a literal
flat key name with dots, not a nested object path.
| Field | Type | Description |
|---|---|---|
meta.zoekt.enabled_namespaces_without_replicas | Integer | Number of namespaces enabled for exact code search that have no Zoekt replicas and are waiting for rollout |
Per-request fields
These fields appear in log entries emitted for each HTTP request from GitLab Rails to a Zoekt node.
| Field | Type | Description |
|---|---|---|
zoekt_calls | Integer | Number of Zoekt HTTP requests made during this Rails request |
zoekt_duration_s | Float | Total time in seconds spent waiting for Zoekt responses during this Rails request |
elasticsearch.log
- Tier: Premium, Ultimate
- Offering: GitLab Self-Managed
This file logs information related to the Elasticsearch Integration, including errors during indexing or searching Elasticsearch.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/elasticsearch.logfile on Linux package installations. - In the
/home/git/gitlab/log/elasticsearch.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="elasticsearch"key on Helm chart installations.
Each line contains JSON that can be ingested by services like Elasticsearch and Splunk. Line breaks have been added to the following example line for clarity:
{
"severity":"DEBUG",
"time":"2019-10-17T06:23:13.227Z",
"correlation_id":null,
"message":"redacted_search_result",
"class_name":"Milestone",
"id":2,
"ability":"read_milestone",
"current_user_id":2,
"query":"project"
}exceptions_json.log
This file logs the information about exceptions being tracked by
Gitlab::ErrorTracking, which provides a standard and consistent way of
processing rescued exceptions.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/exceptions_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/exceptions_json.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="exceptions_json"key on Helm chart installations.
Each line contains JSON that can be ingested by Elasticsearch. For example:
{
"severity": "ERROR",
"time": "2019-12-17T11:49:29.485Z",
"correlation_id": "AbDVUrrTvM1",
"extra.project_id": 55,
"extra.relation_key": "milestones",
"extra.relation_index": 1,
"exception.class": "NoMethodError",
"exception.message": "undefined method `strong_memoize' for #<Gitlab::ImportExport::RelationFactory:0x00007fb5d917c4b0>",
"exception.backtrace": [
"lib/gitlab/import_export/relation_factory.rb:329:in `unique_relation?'",
"lib/gitlab/import_export/relation_factory.rb:345:in `find_or_create_object!'"
]
}service_measurement.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/service_measurement.logfile on Linux package installations. - In the
/home/git/gitlab/log/service_measurement.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="service_measurement"key on Helm chart installations.
It contains only a single structured log with measurements for each service execution.
It contains measurements such as the number of SQL calls, execution_time, gc_stats, and memory usage.
For example:
{ "severity":"INFO", "time":"2020-04-22T16:04:50.691Z","correlation_id":"04f1366e-57a1-45b8-88c1-b00b23dc3616","class":"Projects::ImportExport::ExportService","current_user":"John Doe","project_full_path":"group1/test-export","file_path":"/path/to/archive","gc_stats":{"count":{"before":127,"after":127,"diff":0},"heap_allocated_pages":{"before":10369,"after":10369,"diff":0},"heap_sorted_length":{"before":10369,"after":10369,"diff":0},"heap_allocatable_pages":{"before":0,"after":0,"diff":0},"heap_available_slots":{"before":4226409,"after":4226409,"diff":0},"heap_live_slots":{"before":2542709,"after":2641420,"diff":98711},"heap_free_slots":{"before":1683700,"after":1584989,"diff":-98711},"heap_final_slots":{"before":0,"after":0,"diff":0},"heap_marked_slots":{"before":2542704,"after":2542704,"diff":0},"heap_eden_pages":{"before":10369,"after":10369,"diff":0},"heap_tomb_pages":{"before":0,"after":0,"diff":0},"total_allocated_pages":{"before":10369,"after":10369,"diff":0},"total_freed_pages":{"before":0,"after":0,"diff":0},"total_allocated_objects":{"before":24896308,"after":24995019,"diff":98711},"total_freed_objects":{"before":22353599,"after":22353599,"diff":0},"malloc_increase_bytes":{"before":140032,"after":6650240,"diff":6510208},"malloc_increase_bytes_limit":{"before":25804104,"after":25804104,"diff":0},"minor_gc_count":{"before":94,"after":94,"diff":0},"major_gc_count":{"before":33,"after":33,"diff":0},"remembered_wb_unprotected_objects":{"before":34284,"after":34284,"diff":0},"remembered_wb_unprotected_objects_limit":{"before":68568,"after":68568,"diff":0},"old_objects":{"before":2404725,"after":2404725,"diff":0},"old_objects_limit":{"before":4809450,"after":4809450,"diff":0},"oldmalloc_increase_bytes":{"before":140032,"after":6650240,"diff":6510208},"oldmalloc_increase_bytes_limit":{"before":68537556,"after":68537556,"diff":0}},"time_to_finish":0.12298400001600385,"number_of_sql_calls":70,"memory_usage":"0.0 MiB","label":"process_48616"}geo.log
- Tier: Premium, Ultimate
- Offering: GitLab Self-Managed
This log is located:
- In the
/var/log/gitlab/gitlab-rails/geo.logfile on Linux package installations. - In the
/home/git/gitlab/log/geo.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="geo"key on Helm chart installations.
This file contains information about when Geo attempts to sync repositories and files. Each line in the file contains a separate JSON entry that can be ingested into (for example, Elasticsearch or Splunk).
For example:
{"severity":"INFO","time":"2017-08-06T05:40:16.104Z","message":"Repository update","project_id":1,"source":"repository","resync_repository":true,"resync_wiki":true,"class":"Gitlab::Geo::LogCursor::Daemon","cursor_delay_s":0.038}This message shows that Geo detected that a repository update was needed for project 1.
update_mirror_service_json.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/update_mirror_service_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/update_mirror_service_json.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="update_mirror_service_json"key on Helm chart installations.
This file contains information about LFS errors that occurred during project mirroring. While we work to move other project mirroring errors into this log, the general log can be used.
{
"severity":"ERROR",
"time":"2020-07-28T23:29:29.473Z",
"correlation_id":"5HgIkCJsO53",
"user_id":"x",
"project_id":"x",
"import_url":"https://mirror-source/group/project.git",
"error_message":"The LFS objects download list couldn't be imported. Error: Unauthorized"
}llm.log
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
The llm.log file logs information related to
AI features. Logging includes information about AI events.
LLM input and output logging
The availability of this feature is controlled by a feature flag. For more information, see the history. This feature is available for testing, but not ready for production use.
To log the LLM prompt input and response output, enable the expanded_ai_logging feature flag. This flag is intended for use on GitLab.com only, and not on GitLab Self-Managed instances.
This flag is disabled by default and can only be enabled:
- For GitLab.com, when you provide consent through a GitLab Support Ticket.
By default, the log does not contain LLM prompt input and response output to support data retention policies of AI feature data.
The log file is located at:
- In the
/var/log/gitlab/gitlab-rails/llm.logfile on Linux package installations. - In the
/home/git/gitlab/log/llm.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="llm"key on Helm chart installations.
mcp.log
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
The mcp.log file logs information related to the
GitLab MCP server.
This log is located in the following locations:
- The
/var/log/gitlab/gitlab-rails/mcp.logfile on Linux package installations. - The
/home/git/gitlab/log/mcp.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="mcp"key on Helm chart installations.
Tool call fields
Each tool call logs one line with event_name set to tools_call, message set to
MCP tool call, and ai_component set to mcp_server.
The line has a tool_status field that records how the call ended:
tool_status | Field description |
|---|---|
ok | The tool ran successfully. |
bad_request | The agent sent missing, malformed, or invalid arguments or tool requirements, or requested an unknown or invalid tool version. GitLab also uses it when the call names too many projects or groups to check tool governance rules. |
unauthorized | The user lacks access to the resource, or a tool governance rule denied the tool. GitLab also uses it when it refuses the GitLab Duo session that the token is bound to. The message returned to the agent might say the resource was not found. |
not_found | The tool or the resource does not exist, or the resource could not be distinguished from one the user cannot see. |
rate_limited | A rate limit throttled the call, either a limit on the tool itself or on the API endpoint it runs. This applies to every tool. Before this status existed, these calls were logged as error. |
error | A backend or downstream failure, or a failure the tool could not categorize. |
Calls to tools that run a REST API route also include a status field with the HTTP status code
that the route returned, for example 404. Unlike tool_status, which groups outcomes into
categories, status is the exact HTTP status code. The route runs inside the MCP request, so it has
no api_json.log line of its own. The MCP request is logged once in api_json.log as a POST
to /api/:version/mcp.
GitLab records error_type when it rejects the call before the tool runs, or when the tool
raises an exception that it does not handle.
The value is the full class name of the exception, for example API::Mcp::Handlers::CallTool::ToolDeniedError.
The following errors set error_type:
- An unknown tool.
- An unknown or invalid tool version, or invalid tool requirements.
- A call that names too many projects or groups for GitLab to check tool governance rules.
- A denial by a tool governance rule.
- A refused GitLab Duo session.
- An exception that the tool does not handle.
Tools handle most invalid arguments and unexpected exceptions themselves, and return an error response.
These calls have tool_status set to bad_request or error, and no error_type.
GitLab reports unexpected exceptions to the error tracking service, whether or not the tool handles them.
Tool calls also record a gl_root_namespace_id field with the ID of the top-level namespace
of the project or group that the tool call targets. The field is empty if the tool does not target
a project or group. The field is also empty if GitLab cannot find the project or group that the
tool call names, for example because it does not exist or the lookup failed.
GitLab Community Edition always leaves the field empty.
The initialize and tools_call lines include mcp_client_name and mcp_client_version fields when the
MCP client identifies itself. The values come from the clientInfo in the request _meta, or from
the first product token of the User-Agent header, for example Cursor/1.0.0. The initialize
line also has declared_client_name and declared_client_version fields from the clientInfo in
the request. The values are reported by the client and are not verified. Each value is truncated
to 64 characters.
Calls to tools that run one of several underlying tools, such as search or save_merge_request,
also include a dispatched_tool_name field. It records which underlying tool handled the call,
for example gitlab_search_in_project.
When a tool runs database queries, the tools_call line includes database fields that count only
the queries the tool ran. Queries for authentication and tool lookup are not included.
The fields have the same names as in api_json.log, for example db_count, db_main_count, and
db_main_duration_s. db_duration_s is the total query time across all databases.
Fields whose value did not change are left out. The *_txn_max_duration_s fields are always
left out, because they hold the longest transaction in the whole request.
Calls that GitLab rejects before the tool runs have no database fields.
Tools that read from Gitaly, such as tools for files, diffs, commits, and merge conflicts, add the following fields:
gitaly_calls, which is the number of Gitaly calls the tool made.gitaly_duration_s, which is the total time in seconds.
The fields have the same names as in api_json.log.
Both fields are absent when:
- The tool made no Gitaly calls.
- GitLab rejects the call before the tool runs.
For tool calls from a GitLab Duo Agent Platform session, the tools_call line has a meta.duo_workflow_id
field with the session ID. Workhorse reports this value, and GitLab does not verify it.
The tools_call line also has these fields:
| Field | Value |
|---|---|
tool_name | The tool name the client called. GitLab first removes the prefix that the X-Gitlab-Mcp-Server-Tool-Name-Prefix header sets. |
canonical_tool_name | The tool that the alias resolves to. Present only when tool_name is an alias. |
tool_version | The version of the tool that GitLab selected for the call. Empty when GitLab cannot find the tool or the requested version. |
requested_tool_version | The version the client pinned in _meta["com.gitlab/tool_requirements"]. GitLab truncates the value to 255 characters. |
request_id | The JSON-RPC request id. |
duration_s | How long the tool ran, in seconds. For a call that GitLab rejects before the tool runs, how long GitLab took to reject it. |
argument_keys | The names of the arguments the client sent. This field does not contain the values. |
normalized_arguments | A list of the changes GitLab made to arguments that use an older format. Each change has the form from->to, for example ["id:gid->work_item_iid"]. Present only when GitLab changes an argument. |
gl_user_id | The ID of the user who made the call. |
Expanded logging
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed
Expanded logging adds the argument values and error messages of a tool call to its tools_call line.
Prerequisites:
- On GitLab Self-Managed, an administrator must turn on expanded logging for the instance. The steps are in the next topic.
- On GitLab.com, the top-level group of the project or group that the call targets must share usage data with GitLab.
On GitLab.com, GitLab can also turn on expanded logging for a user.
The tools_call line has the following fields when expanded logging is on:
arguments: The argument names and values.error_message: The error message. GitLab logs it for the same errors that seterror_type.
In arguments, GitLab replaces a value with [FILTERED] when the argument name is on a built-in list
of sensitive names.
For example, the list matches:
- Names that contain
password,secret,search, orcontent. - Names that end in
tokenorkey. - The names
title,description,body,query,note,text,message, andoutput.
The list matches names only, including the names of nested keys. GitLab logs the values of arguments with other names, even when a value contains sensitive data.
The arguments field shows the arguments after GitLab changes arguments that use an older format.
For a tool that runs one of several underlying tools, the field shows the arguments that GitLab
passed to the underlying tool.
The names can differ from argument_keys.
Turn on expanded logging on GitLab Self-Managed
Turn on expanded logging to add argument values and error messages to tools_call lines.
The Enable AI logs setting applies to the whole instance.
The setting also turns on expanded logging for other AI features, for example prompts and responses in llm.log.
Prerequisites:
- Administrator access.
To turn on expanded logging:
- In the upper-right corner, select Admin.
- In the left sidebar, select GitLab Duo.
- Select Change configuration.
- Under Enable AI logs, select the Capture detailed information about AI-related activities and requests. checkbox.
- Select Save changes.
Request and session events
In addition to tools_call lines, the MCP server logs these events.
Access denied
When the MCP server is not available to a user, GitLab logs a line with event_name set to
permission_denied, message set to MCP server not available, and ai_component set to mcp_server.
GitLab then rejects the request.
The line has these fields:
| Field | Value |
|---|---|
denial_reason | Why GitLab rejected the request. instance_setting_disabled on GitLab Self-Managed and GitLab Dedicated, when the MCP server is turned off for the instance. no_enabled_namespace on GitLab.com, when none of the user’s top-level groups has the MCP server turned on. |
gl_user_id | The ID of the user who made the request. |
Initialize
When GitLab accepts an initialize request, it logs a line with event_name set to initialize,
message set to MCP initialize, and ai_component set to mcp_server.
GitLab does not log a line when it rejects the request, for example for a missing or unsupported protocol version.
In addition to the mcp_client_name, mcp_client_version, declared_client_name, and
declared_client_version fields, the line has these fields:
| Field | Value |
|---|---|
requested_protocol_version | The MCP protocol version that the client requested. |
protocol_version | The MCP protocol version that GitLab answered with. |
server_instructions_sent | The boolean true when GitLab sent server instructions to the client, otherwise false. |
gl_user_id | The ID of the user who made the request. |
Tool list
When a client lists the available tools, GitLab logs a line with event_name set to tools_list,
message set to MCP tools list, and ai_component set to mcp_server.
The line has these fields:
| Field | Value |
|---|---|
tool_count | The number of tools returned to the client. |
gl_user_id | The ID of the user who made the request. |
toolset_source | How the client chose tool groups. default when the X-Gitlab-Enabled-Mcp-Server-Toolsets header is empty or missing, all when the header includes all, and explicit in all other cases. |
requested_toolsets | The names of the requested tool groups, sorted and separated by commas. Present only when toolset_source is explicit. |
tools_header_present | The string true when the X-Gitlab-Enabled-Mcp-Server-Tools header names at least one tool, otherwise false. |
When toolset_source is default and tools_header_present is true, GitLab returns only the
tools that the X-Gitlab-Enabled-Mcp-Server-Tools header names.
Expanded logging does not add fields to this line.
If the X-Gitlab-Enabled-Mcp-Server-Tools header names tools that GitLab does not recognize, GitLab also logs a warning with message set to
Unknown MCP tool names in allowed_tools, and the unrecognized names in a names field.
GitLab does not recognize Orbit tool names unless the request selects the orbit tool group.
GitLab Duo session refused
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
The availability of this feature is controlled by a feature flag. For more information, see the history.
GitLab logs this event for a token bound to a GitLab Duo session that GitLab cannot resolve or read. GitLab checks the session even when no tool governance rules are set:
- For a tool call, when the call targets a project or group that the user can read.
- For a tool list, when the
X-Gitlab-Namespace-Idheader names a group or project that the user can read, or when the user has a default GitLab Duo namespace.
The line has event_name set to session_refused, message set to MCP session refused,
and ai_component set to mcp_server.
The line has these fields:
| Field | Value |
|---|---|
duo_workflow_id | The ID of the session the token is bound to. Empty when refusal_reason is invalid_workflow_scope. |
refusal_reason | Why GitLab refused the session. |
gl_user_id | The ID of the user who made the request. |
refusal_reason has one of these values:
refusal_reason | Meaning |
|---|---|
invalid_workflow_scope | GitLab cannot read one session ID from the token, because the token has more than one session scope or the scope is malformed. |
workflow_not_found | No session has the ID in the token. |
workflow_not_readable | The session exists, but the user cannot view it. |
After GitLab refuses the session:
- A tool call fails with
tool_statusset tounauthorized, anderror_typeset toEE::API::Mcp::Handlers::CallTool::SessionRefusedError. - A tool list returns no tools.
GitLab Duo session created
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
When a GitLab Duo session is created through the MCP server, GitLab logs a line with event_name set to
duo_session_created, message set to Duo session created over MCP, and ai_component set to mcp_server.
This line has source_type set to mcp.
The duo_workflow_id field holds the session ID. The mcp_client_name and mcp_client_version
fields hold the MCP client that created the session, when the client identifies itself.
The line also shows which flow or agent the session runs, in the fields item_type, flow_name,
component_name, custom_item_id, item_version, and item_schema_version.
Fields that do not apply are left out.
epic_work_item_sync.log
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
The epic_work_item_sync.log file logs information related to syncing and migrating epics as work items.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/epic_work_item_sync.logfile on Linux package installations. - In the
/home/git/gitlab/log/epic_work_item_sync.logfile on self-compiled installations. - On the Sidekiq and Webservice pods under the
subcomponent="epic_work_item_sync"key on Helm chart installations.
secret_push_protection.log
- Tier: Ultimate
- Offering: GitLab.com, GitLab Dedicated
The secret_push_protection.log file logs information related to the secret push protection feature.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/secret_push_protection.logfile on Linux package installations. - In the
/home/git/gitlab/log/secret_push_protection.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="secret_push_protection"key on Helm chart installations.
active_context.log
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed
The active_context.log file logs information related to embedding pipelines through the
ActiveContext layer.
GitLab supports ActiveContext code embeddings.
This pipeline handles embedding generation for project code files.
For more information, see architecture design.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/active_context.logfile on Linux package installations. - In the
/home/git/gitlab/log/active_context.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="activecontext"key on Helm chart installations.
ai_catalog.log
- Tier: Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
The ai_catalog.log file logs information related to the
AI Catalog, including when AI Catalog flows and agents are executed.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/ai_catalog.logfile on Linux package installations. - In the
/home/git/gitlab/log/ai_catalog.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="ai_catalog"key on Helm chart installations.
user_experience_slis.log
This log is located:
- In the
/var/log/gitlab/gitlab-rails/user_experience_slis.logfile on Linux package installations. - In the
/home/git/gitlab/log/user_experience_slis.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="user_experience_slis"key on Helm chart installations.
It contains a JSON structured log for User Experience SLIs that match with their metrics.
Each line contains JSON that can be ingested by services like Elasticsearch.
Example:
{
"checkpoint": "start",
"component": "gitlab",
"correlation_id": "3823a1550b64417f9c9ed8ee0f48087e",
"covered_experience": "create_merge_request",
"elapsed_time_s": 0,
"environment": "gprd",
"feature_category": "code_review_workflow",
"logtag": "F",
"meta": {
"caller_id": "Projects::MergeRequests::CreationsController#create",
"client_id": "user/123",
"feature_category": "code_review_workflow",
"gl_user_id": 123,
"organization_id": 456,
"project": "project/path/here",
"remote_ip": "x.x.x.x",
"root_namespace": "project",
"subscription_plan": "ultimate",
"user": "a_username"
},
"severity": "INFO",
"shard": "default",
"stage": "cny",
"start_time": "2025-10-31 15:21:40 UTC",
"subcomponent": "user_experience_slis",
"tag": "web-cny-rails.var.log.containers.gitlab-cny-webservice-web-123-abc_gitlab-cny_webservice-4567890.log",
"tier": "sv",
"time": "2025-10-31T15:21:40.333Z",
"type": "web",
"urgency": "async_fast",
"urgency_threshold_s": 15
}The available fields are documented on the design document for User Experience SLIs.
Registry logs
For Linux package installations, container registry logs are in /var/log/gitlab/registry/current.
NGINX logs
For Linux package installations, NGINX logs are in:
/var/log/gitlab/nginx/gitlab_access.log: A log of requests made to GitLab/var/log/gitlab/nginx/gitlab_error.log: A log of NGINX errors for GitLab/var/log/gitlab/nginx/gitlab_pages_access.log: A log of requests made to Pages static sites/var/log/gitlab/nginx/gitlab_pages_error.log: A log of NGINX errors for Pages static sites/var/log/gitlab/nginx/gitlab_registry_access.log: A log of requests made to the container registry/var/log/gitlab/nginx/gitlab_registry_error.log: A log of NGINX errors for the container registry/var/log/gitlab/nginx/gitlab_mattermost_access.log: A log of requests made to Mattermost/var/log/gitlab/nginx/gitlab_mattermost_error.log: A log of NGINX errors for Mattermost
Below is the default GitLab NGINX access log format:
'$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'The $request and $http_referer are
filtered
for sensitive query string parameters such as secret tokens.
Pages logs
For Linux package installations, Pages logs are in /var/log/gitlab/gitlab-pages/current.
For example:
{
"level": "info",
"msg": "GitLab Pages Daemon",
"revision": "52b2899",
"time": "2020-04-22T17:53:12Z",
"version": "1.17.0"
}
{
"level": "info",
"msg": "URL: https://gitlab.com/gitlab-org/gitlab-pages",
"time": "2020-04-22T17:53:12Z"
}
{
"gid": 998,
"in-place": false,
"level": "info",
"msg": "running the daemon as unprivileged user",
"time": "2020-04-22T17:53:12Z",
"uid": 998
}Product Usage Data log
We recommend against using the raw logs for analyzing feature usage, as the data quality has not yet been certified for accuracy.
The list of events can change in each version based on new features or changes to existing features. Certified in-product adoption reports will be available after the data is ready for analysis.
This log is located:
- In the
/var/log/gitlab/gitlab-rails/product_usage_data.logfile on Linux package installations. - In the
/home/git/gitlab/log/product_usage_data.logfile on self-compiled installations. - On the Webservice pods under the
subcomponent="product_usage_data"key on Helm chart installations.
It contains JSON-formatted logs of product usage events tracked through Snowplow. Each line in the file contains a separate JSON entry that can be ingested by services like Elasticsearch or Splunk. Line breaks were added to examples for legibility:
{
"severity":"INFO",
"time":"2025-04-09T13:43:40.254Z",
"message":"sending event",
"payload":"{
\"e\":\"se\",
\"se_ca\":\"projects:merge_requests:diffs\",
\"se_ac\":\"i_code_review_user_searches_diff\",
\"cx\":\"eyJzY2hlbWEiOiJpZ2x1OmNvbS5zbm93cGxvd2FuYWx5dGljcy5zbm93cGxvdy9jb250ZXh0cy9qc29uc2NoZW1hLzEtMC0xIiwiZGF0YSI6W3sic2NoZW1hIjoiaWdsdTpjb20uZ2l0bGFiL2dpdGxhYl9zdGFuZGFyZC9qc29uc2NoZW1hLzEtMS0xIiwiZGF0YSI6eyJlbnZpcm9ubWVudCI6ImRldmVsb3BtZW50Iiwic291cmNlIjoiZ2l0bGFiLXJhaWxzIiwiY29ycmVsYXRpb25faWQiOiJlNDk2NzNjNWI2MGQ5ODc0M2U4YWI0MjZiMTZmMTkxMiIsInBsYW4iOiJkZWZhdWx0IiwiZXh0cmEiOnt9LCJ1c2VyX2lkIjpudWxsLCJnbG9iYWxfdXNlcl9pZCI6bnVsbCwiaXNfZ2l0bGFiX3RlYW1fbWVtYmVyIjpudWxsLCJuYW1lc3BhY2VfaWQiOjMxLCJwcm9qZWN0X2lkIjo2LCJmZWF0dXJlX2VuYWJsZWRfYnlfbmFtZXNwYWNlX2lkcyI6bnVsbCwicmVhbG0iOiJzZWxmLW1hbmFnZWQiLCJpbnN0YW5jZV9pZCI6IjJkMDg1NzBkLWNmZGItNDFmMy1iODllLWM3MTM5YmFjZTI3NSIsImhvc3RfbmFtZSI6ImpsYXJzZW4tLTIwMjIxMjE0LVBWWTY5IiwiaW5zdGFuY2VfdmVyc2lvbiI6IjE3LjExLjAiLCJjb250ZXh0X2dlbmVyYXRlZF9hdCI6IjIwMjUtMDQtMDkgMTM6NDM6NDAgVVRDIn19LHsic2NoZW1hIjoiaWdsdTpjb20uZ2l0bGFiL2dpdGxhYl9zZXJ2aWNlX3BpbmcvanNvbnNjaGVtYS8xLTAtMSIsImRhdGEiOnsiZGF0YV9zb3VyY2UiOiJyZWRpc19obGwiLCJldmVudF9uYW1lIjoiaV9jb2RlX3Jldmlld191c2VyX3NlYXJjaGVzX2RpZmYifX1dfQ==\",
\"p\":\"srv\",
\"dtm\":\"1744206220253\",
\"tna\":\"gl\",
\"tv\":\"rb-0.8.0\",
\"eid\":\"4f067989-d10d-40b0-9312-ad9d7355be7f\"
}To inspect these logs, you can use the Rake task product_usage_data:format which formats the JSON output and decodes base64-encoded context data for better readability:
gitlab-rake "product_usage_data:format[log/product_usage_data.log]"
# or pipe the logs directly
cat log/product_usage_data.log | gitlab-rake product_usage_data:format
# or tail the logs in real-time
tail -f log/product_usage_data.log | gitlab-rake product_usage_data:formatYou can disable this log by setting the GITLAB_DISABLE_PRODUCT_USAGE_EVENT_LOGGING environment variable to any value.
Let’s Encrypt logs
For Linux package installations, Let’s Encrypt auto-renew logs are in /var/log/gitlab/lets-encrypt/.
Mattermost logs
For Linux package installations, Mattermost logs are in these locations:
/var/log/gitlab/mattermost/mattermost.log/var/log/gitlab/mattermost/current
Workhorse logs
For Linux package installations, Workhorse logs are in /var/log/gitlab/gitlab-workhorse/current.
Patroni logs
For Linux package installations, Patroni logs are in /var/log/gitlab/patroni/current.
PgBouncer logs
For Linux package installations, PgBouncer logs are in /var/log/gitlab/pgbouncer/current.
PostgreSQL logs
For Linux package installations, PostgreSQL logs are in /var/log/gitlab/postgresql/current.
If Patroni is being used, the PostgreSQL logs are stored in the Patroni logs instead.
Prometheus logs
For Linux package installations, Prometheus logs are in /var/log/gitlab/prometheus/current.
Redis logs
For Linux package installations, Redis logs are in /var/log/gitlab/redis/current.
Sentinel logs
For Linux package installations, Sentinel logs are in /var/log/gitlab/sentinel/current.
Alertmanager logs
For Linux package installations, Alertmanager logs are in /var/log/gitlab/alertmanager/current.
Consul logs
For Linux package installations, Consul logs are in /var/log/gitlab/consul/current.
crond logs
For Linux package installations, crond logs are in /var/log/gitlab/crond/.
Grafana logs
For Linux package installations, Grafana logs are in /var/log/gitlab/grafana/current.
LogRotate logs
For Linux package installations, logrotate logs are in /var/log/gitlab/logrotate/current.
GitLab Monitor logs
For Linux package installations, GitLab Monitor logs are in /var/log/gitlab/gitlab-monitor/.
GitLab Exporter logs
For Linux package installations, GitLab Exporter logs are in /var/log/gitlab/gitlab-exporter/current.
GitLab agent server for Kubernetes logs
For Linux package installations, GitLab agent server for Kubernetes logs are
in /var/log/gitlab/gitlab-kas/current.
Praefect logs
For Linux package installations, Praefect logs are in /var/log/gitlab/praefect/.
GitLab also tracks Prometheus metrics for Gitaly Cluster (Praefect).
Backup log
For Linux package installations, the backup log is located at /var/log/gitlab/gitlab-rails/backup_json.log.
On Helm chart installations, the backup log is stored in the Toolbox pod, at /var/log/gitlab/backup_json.log.
This log is populated when a GitLab backup is created. You can use this log to understand how the backup process performed.
Performance bar stats
This log is located:
- In the
/var/log/gitlab/gitlab-rails/performance_bar_json.logfile on Linux package installations. - In the
/home/git/gitlab/log/performance_bar_json.logfile on self-compiled installations. - On the Sidekiq pods under the
subcomponent="performance_bar_json"key on Helm chart installations.
Performance bar statistics (currently only duration of SQL queries) are recorded in that file. For example:
{"severity":"INFO","time":"2020-12-04T09:29:44.592Z","correlation_id":"33680b1490ccd35981b03639c406a697","filename":"app/models/ci/pipeline.rb","method_path":"app/models/ci/pipeline.rb:each_with_object","request_id":"rYHomD0VJS4","duration_ms":26.889,"count":2,"query_type": "active-record"}These statistics are logged on .com only, and are disabled on self-deployments.
Gathering logs
When troubleshooting issues that aren’t localized to one of the previously listed components, it’s helpful to simultaneously gather multiple logs and statistics from a GitLab instance.
GitLab Support often asks for one of these, and maintains the required tools.
Briefly tail the main logs
If the bug or error is readily reproducible, save the main GitLab logs to a file while reproducing the problem a few times:
sudo gitlab-ctl tail | tee /tmp/<case-ID-and-keywords>.logConclude the log gathering with Control + C.
Gathering SOS logs
If performance degradations or cascading errors occur that can’t readily be attributed to one of the previously listed GitLab components, use our SOS scripts.
Fast-stats
Fast-stats is a tool for creating and comparing performance statistics from GitLab logs. For more details and instructions to run it, read the documentation for fast-stats.
Find relevant log entries with a correlation ID
Most requests have a log ID that can be used to find relevant log entries.