- Configure distributed tracing for a project
- View your traces
- Tracing ingestion limits
- Data retention
- Create an issue for a trace
- View issues related to a trace
Distributed tracing
-
Introduced in GitLab 16.2 with a flag named
observability_tracing
. Disabled by default. This feature is in beta. - Feature flag changed in GitLab 17.3 to the
observability_features
feature flag, disabled by default. The previous feature flagobservability_tracing
was removed. - Introduced for self-managed in GitLab 17.3.
With distributed tracing, you can troubleshoot application performance issues by inspecting how a request moves through different services and systems, the timing of each operation, and any errors or logs as they occur. Tracing is particularly useful in the context of microservice applications, which group multiple independent services collaborating to fulfill user requests.
This feature is in beta. For more information, see the group direction page. To leave feedback about tracing bugs or functionality, comment in the feedback issue or open a new issue.
Configure distributed tracing for a project
Configure distributed tracing 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 traces, 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 self-managed instance, orgitlab.com
-
gitlab-project-id
- The project ID. -
gitlab-access-token
- The access token you created
-
When your application is configured, run it, and the OpenTelemetry exporter attempts to send traces to GitLab.
View your traces
If your traces are exported successfully, you can see them in the project.
To view the list of traces:
- On the left sidebar, select Search or go to and find your project.
- Select Monitor > Traces.
To see the details of a trace, select it from the list.
The trace details page and a list of spans are displayed.
To view the attributes for a single span, select it from the list.
Tracing ingestion limits
Tracing ingests a maximum of 102,400 bytes per minute.
After 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.
Data retention
GitLab has a retention limit of 30 days for all traces.
Create an issue for a trace
You can create an issue to track any action taken to resolve or investigate a trace. To create an issue for a trace:
- On the left sidebar, select Search or go to and find your project.
- Select Monitor > Traces.
- From the list of traces, select a trace.
- Select Create issue.
The issue is created in the selected project and pre-filled with information from the trace. You can edit the issue title and description.
View issues related to a trace
- On the left sidebar, select Search or go to and find your project.
- Select Monitor > Traces.
- From the list of traces, select a trace.
- Scroll to Related issues.
- Optional. To view the issue details, select an issue.