Logs
- Tier: Ultimate
- Offering: GitLab.com, GitLab Self-Managed
- Status: Beta
This feature is not under active development.
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.
GitLab supports centralized application and infrastructure logs collection, storage, and analysis. GitLab Logging provides insight about the operational health of monitored systems. Use logs to learn more about your systems and applications in a given range of time.
Logs ingestion limits
Logs ingest a maximum of 102,400 bytes per minute.
When the limit is exceeded, a 429 Too Many Requests
response is returned.
To request a limit increase to 1,048,576 bytes per minute, contact GitLab support.
Configure logging
Configure logging to enable it for a project.
Prerequisites:
- You must have at least the Maintainer role for the project.
Create an access token:
- On the left sidebar, select Search or go to and find your project.
- Select Settings > Access tokens.
- Create an access token with the
api
scope and Developer role or greater. Save the access token value for later.
To configure your application to send GitLab logs, set the following environment variables:
OTEL_EXPORTER = "otlphttp" OTEL_EXPORTER_OTLP_ENDPOINT = "https://gitlab.example.com/api/v4/projects/<gitlab-project-id>/observability/" OTEL_EXPORTER_OTLP_HEADERS = "PRIVATE-TOKEN=<gitlab-access-token>"
Use the following values:
gitlab.example.com
- The hostname for your GitLab Self-Managed instance, orgitlab.com
gitlab-project-id
- The project IDgitlab-access-token
- The access token you created
Logs are configured for your project. When you run your application, the OpenTelemetry exporter sends logs to GitLab.
View logs
You can view the logs for a given project:
- On the left sidebar, select Search or go to and find your project.
- Select Monitor > Logs.
A list of logs is displayed. Currently log date, level, service, and message are supported. Select a log line to view its details.
You can either filter logs by attribute or query log strings with the search bar. The log volume chart at the top shows the number of logs ingested over the given time period.
View logs details
It is also possible to see log line details such as metadata and resource attributes.
Create an issue for a log
You can create an issue to track any action taken to resolve or investigate a log. To create an issue for a log:
- On the left sidebar, select Search or go to and find your project.
- Select Monitor > Logs.
- From the list of logs, select a log.
- In the details drawer, select Create issue.
The issue is created in the selected project and pre-filled with information from the log. You can edit the issue title and description.
View issues related to a log
- On the left sidebar, select Search or go to and find your project.
- Select Monitor > Logs.
- From the list of logs, select a log.
- In the details drawer, scroll to Related issues.
- Optional. To view the issue details, select an issue.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support