Learn how to help your team build confidently (and securely!) in prod in our upcoming Tech Talk: Sign up here.

Visualize Services

Connecting repositories to your services allows you to keep track of how your services and repositories are related.

There are multiple ways to visualize the connections between your services and repositories. This can be done from the Repositories List Page, Repository Details Page and from a Service Page.

Repositories List Page

From the Repositories List Page you can see which services are connected to each of your repositories from the Connected Services column.

Repositories Connected Services

Repository Details Page

From a Repository Details Page you can see which services are connected to your repository from the Services card.

Repository Connected Services

This page also shows you which paths are being used by which services. This is especially useful when dealing with monorepos.

Repository Connected Services Paths

Service Page

You can also view which repositories are used by a particular service from a Service page.

Navigate to a service’s Summary Tab. From there, you can see the repositories and paths are used by your service in the Repositories card.

Service Repositories Card

Connecting Services

Repositories List Page

To connect a service to your repository from the Repositories List Page, hover over a None field in the Connected Services column and click on the pencil icon.

Repositories Connected Service

After clicking the pencil icon, you can select a service from the dropdown menu.

Repositories Connected Services Dropdown

If you have a lot of services, you can use type ahead search to find your service.

Repositories Connected Services Typeahead

If this repository is storing the code for a service that’s not yet tracked in OpsLevel, you can add that service in OpsLevel by clicking + Create Service.

Repositories Create Service

When adding a service to OpsLevel from a repository, the repository to service connection will happen automatically.

Repository Details Page

You can only edit the connected services from a Repository Details Page if the repository does not have any connected services defined. To connect a service to your repository from the Repository page, visit a repository that has no connected services. Press the Select a Service dropdown.

Repository Connected Service

If you have a lot of services, you can type ahead search to find your service.

Repository Service Dropdown

If this repository is storing the code for a service that’s not yet tracked in OpsLevel, you can add that service in OpsLevel by clicking + Create Service.

Repository Service Create

When adding a service to OpsLevel from a repository, the repository to service connection will happen automatically.

Service Page

To connect or edit repository connections from the Service page, navigate to the service you wish to connect your repository. Once there, navigate to the Summary tab.

Service Show Summary Tab

Click the Edit button on the Repositories card.

Service Show Repo Edit

Then click the ”+ Add Repository”.

Service Show Add Repo

From the Create Repo modal, you can select the repository you wish to connect from the Repository field and click the Create button.

Service Show Repository Select

Note: If you have a lot of repositories, you can use type ahead search from this dropdown.

From this modal, you can also choose which Directory in the repository you wish to connect to your service. This is especially useful if you are using monorepos.

Service Show Repo Directory

You can also choose to sync the repository’s owner with your service by clicking on the Sync Owner checkbox.

Service Show Repo Owner Sync

opslevel.yml

You can also define which repositories are connected to your services using opslevel.yml. Refer to the opslevel.yml docs for more information.

Monorepos

A monorepo is a single repository that stores all the code and assets for your project. Some monorepos house many microservices. In this case, it’s important to know how all your microservices are related to your repository. This can be done by connecting services to different paths in your repository.

To specify which path of a repository is connected to your microservice, refer to the Service Page subsection of Connecting Services.

You can see which repository path is connected to your service from the Repositories Card on a service page.

Service Show Connected Paths