---
component: bazel
version: ""
slug: bazel/getting-started
canonical_url: "https://docs.develocity.ai/bazel/getting-started/"
title: "Getting Started With Develocity for Bazel"
description: "Configure Bazel to publish Build Scan records to your Develocity instance, then inspect console logs, test results, build timelines, and the critical path."
keywords: []
status: current
---

<!-- llms-index: https://docs.develocity.ai/llms.txt -->

# Getting Started With Develocity for Bazel

<a id="preamble"></a>

> [!NOTE]
> Bazel support is not enabled by default with Develocity. To enable it, contact your customer success representative.

<a id="installation"></a>

## Installation

Develocity server installation is not covered here. Consult one of the following installation manuals for help with installation:

*   [Self-Hosted Kubernetes Installation Guide](https://docs.develocity.ai/2026.2/installation/kubernetes-installation/)
    
*   [Self-Hosted Standalone Installation Guide](https://docs.develocity.ai/2026.2/installation/standalone-installation/)
    
*   [Amazon EKS Kubernetes Installation Guide](https://docs.develocity.ai/2026.2/installation/aws/aws-eks-cluster/)
    
*   [Amazon EC2 Standalone Installation Guide](https://docs.develocity.ai/2026.2/installation/aws/aws-ec2-standalone/)
    
*   [Azure AKS Kubernetes Installation Guide](https://docs.develocity.ai/2026.2/installation/azure/azure-aks-cluster/)
    
*   [Azure VM Standalone Installation Guide](https://docs.develocity.ai/2026.2/installation/azure/azure-vm-standalone/)
    
*   [Google GKE Kubernetes Installation Guide](https://docs.develocity.ai/2026.2/installation/google-cloud/gke-kubernetes/)
    
*   [Google Compute Engine Standalone Installation Guide](https://docs.develocity.ai/2026.2/installation/google-cloud/gce-standalone/)
    

The examples in this guide use `develocity.example.com` as the Develocity hostname with HTTPS enabled.

<a id="quickstart-project"></a>

## Quickstart Project

If you do not have a suitable Bazel project to try Develocity with, use the [Bazel Develocity quickstart project](https://github.com/gradle/bazel-develocity-quickstart/).

<a id="build-scan"></a>

## Build Scan

A Build Scan is a permanent, shareable record of a Bazel invocation, capturing console output, test results, a build timeline, and performance data.

<a id="configuring-bazel"></a>

### Configuring Bazel

Follow the instructions in the [Configuration Guide](https://docs.develocity.ai/bazel/bazel-config/) to modify your project’s `.bazelrc` file.

At a minimum, unauthenticated Build Scans require the following configuration in your `.bazelrc` file:

```shell
common:develocity --remote_cache=grpcs://develocity.example.com
common:develocity --bes_results_url=https://develocity.example.com/build/
common:develocity --bes_backend=grpcs://develocity.example.com

build --config=develocity
```

As the build completes, the last lines of the output will be similar to:

```
INFO: Streaming build results to: https://develocity.example.com/build/f26e14c5-dfab-4725-8a77-648f4f8a0ff9
```

The last portion of the URL is the Bazel invocation ID. Follow that link to view your Build Scan.

Additional configuration for authentication, remote cache, and project names is covered in the [Configuration Guide](https://docs.develocity.ai/bazel/bazel-config/).

<a id="find-and-view-any-build-scan"></a>

### Find and View Any Build Scan

Search through all captured Build Scans by going to `https://develocity.example.com/scans`.

![Build Scan list showing build records with project](https://docs.develocity.ai/bazel/getting-started/../_images/scan-list.png)

Build Scan List

Search by project name, username, build outcome, start time, and more. By default, the list shows the most recent scans first.

The listing can also surface insights you did not know to look for:

*   Recurring failures across your organization’s builds
    
*   Builds taking longer than expected in certain cases
    
*   Users running more commands than necessary, adding avoidable build time
    

<a id="share-console-logs"></a>

### Share Console Logs

Build Scans include the console output produced by the build. Many tools used by the build, such as compilers, often write diagnostic information to the console log.

Use the left navigation menu to visit the **Console log** section.

![Console log section of a Build Scan with line highlighting](https://docs.develocity.ai/bazel/getting-started/../_images/console.png)

Console Log

Select any line to highlight it, or shift-click two lines to highlight a block. The browser location updates to reflect the selection. Share that URL with a colleague to direct them to specific console output.

<a id="inspect-test-results"></a>

### Inspect Test Results

If your build ran tests, their results are included in your Build Scan. Use the left navigation menu to visit the **Tests** view.

![Test results showing test outcomes](https://docs.develocity.ai/bazel/getting-started/../_images/tests.png)

Tests View

This section shows the results of all tests that ran during the build, along with their _outcome_, _total time_, _test timeout_, and _test size_. The _total time_ generally corresponds to the wall clock time that an execution lasted. Results are broken down by _target_, _test suite_, and _test case_. Select any _test case_ to see details about each of its individual executions, in case of test retry.

To see the slowest test cases, use the top navigation tab to visit the **Slowest Tests** view.

![Slowest test cases sorted by total execution time](https://docs.develocity.ai/bazel/getting-started/../_images/slowest-tests.png)

Slowest Tests View

> [!NOTE]
> By default, Bazel test reporting is at a target-level granularity. Bazel enables rules to override this behavior (for example, the built-in Java rules provide a detailed test report). If you do not see test reporting at a test-case-level granularity, check that the Bazel rules you are using produce the required `test.xml` to override the default behavior. See the [Bazel documentation](https://bazel.build/reference/test-encyclopedia#initial-conditions) for more details.

<a id="analyze-build-performance"></a>

### Analyze Build Performance

Use the left navigation menu to visit the **Timeline** view.

![Build timeline showing parallel action execution with CPU](https://docs.develocity.ai/bazel/getting-started/../_images/timeline.png)

Build Timeline

This view shows event executions as a timeline, alongside resource usage (CPU, memory, and network) for the Bazel process and the system as a whole.

The table below the graph provides a breakdown of events executed during the build. Select the ![details inspector](https://docs.develocity.ai/bazel/getting-started/../_images/details-inspector.svg) icon when hovering over an event to see more detail and understand dependencies between events.

The **Critical Path** tab shows the longest chain of dependent actions. It estimates the shortest possible build time if all non-dependent actions were executed in parallel with infinite resources.

![Critical path showing the longest chain of dependent build actions](https://docs.develocity.ai/bazel/getting-started/../_images/critical-path.png)

Critical Path

<a id="custom-tags-values-and-links"></a>

### Custom Tags, Values, and Links

Enrich your Build Scans with metadata using [several means](https://docs.develocity.ai/bazel/bazel-config/#extending-build-scans). In particular:

*   VCS information such as commit identifiers and branch names
    
*   Tags for different types of builds (for example, `CI` vs. `local`)
    
*   Links to CI pipeline runs
    

This adds searchable context to your Build Scans.

<a id="integrating-with-ci"></a>

### Integrating With CI

Build Scan publication is passive with regard to the build process. Enabling it does not affect the outputs of your build. It is safe to add the necessary configuration to your project’s `.bazelrc` file and check it into version control, enabling Build Scan publication for all users of the build.

With Bazel, connectivity errors to Develocity may cause the Bazel command to return a non-zero exit code. If there is no connection when Bazel tries to publish to the Develocity Build Event Server, Bazel exits with code 38 and displays a message similar to the following:

```
INFO: Build completed successfully, 1 total action
ERROR: The Build Event Protocol upload failed: All 4 retry attempts failed. UNAVAILABLE: develocity.example.com UNAVAILABLE: develocity.example.com
```

At the time of this writing, the Bazel client does not offer a configuration option to fail gracefully in these instances.

<a id="next-steps"></a>

## Next Steps

*   Configure authentication: see [Authenticating With Develocity](https://docs.develocity.ai/bazel/bazel-config/#authenticating) in the Configuration Guide
    
*   Configure the remote cache: see [Using a Bazel Remote Cache](https://docs.develocity.ai/bazel/bazel-config/#remote-cache) in the Configuration Guide
    
*   Set a project name for project-level access control: see [Setting the Project Name](https://docs.develocity.ai/bazel/bazel-config/#project-name) in the Configuration Guide
    
*   Extend Build Scans with custom tags and links: see [Extending Build Scans](https://docs.develocity.ai/bazel/bazel-config/#extending-build-scans) in the Configuration Guide