> ## Documentation Index
> Fetch the complete documentation index at: https://metoro.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Service Map

> Visualize and analyze service-to-service communication in your clusters

## Overview

The service map is a powerful visualization tool in Metoro that displays connections between services in your cluster. Built on [trace data](/traces/overview), it provides insights into:

* Service-to-service communication within your cluster
* External client requests entering your cluster
* Outbound requests from your services to external dependencies

## How It Works

The service map is dynamically generated from trace data by:

1. Analyzing each request's client and server containers
2. Identifying service boundaries
3. Creating visual connections between communicating services
4. Detecting external traffic patterns

<img src="https://mintcdn.com/metoro/WUkDA8ZzUF2HFKec/images/service-map-overview.png?fit=max&auto=format&n=WUkDA8ZzUF2HFKec&q=85&s=c35f1f41310b59659fa26e1192c88165" alt="Service map showing connections between services" width="3456" height="1984" data-path="images/service-map-overview.png" />

## Connection Types

### Internal Connections

Lines between services represent internal cluster communication:

* Green lines indicate healthy connections
* Red lines indicate errors (5xx responses or traced errors)
* Line thickness represents traffic volume

### External Traffic

The service map identifies two types of external traffic:

1. **External Clients**:

* Detected when only server-side traces exist
* Shows incoming traffic from outside the cluster
* Helps monitor external access patterns

2. **External Services**:

* Identified by analyzing outbound request destinations
* Groups requests by hostname (e.g., `api.stripe.com`)
* Falls back to "Unknown External Service" for unresolvable IPs

<img src="https://mintcdn.com/metoro/WUkDA8ZzUF2HFKec/images/service-map-external.png?fit=max&auto=format&n=WUkDA8ZzUF2HFKec&q=85&s=12a9f9710ce42796e14292eeb7450357" alt="Service map showing external connections" width="3456" height="1984" data-path="images/service-map-external.png" />

## Interactive Features

### Connection Details

Mouse over any connection to:

* View request rate statistics
* Access underlying traces
* See error rates and patterns
* Filter by connection attributes

### Service Details

Mouse over any service node to see:

* Incoming request rates
* Connected services
* Traffic patterns
* Service health metrics

<img src="https://mintcdn.com/metoro/WUkDA8ZzUF2HFKec/images/service-map-details.png?fit=max&auto=format&n=WUkDA8ZzUF2HFKec&q=85&s=bff349abdcfedd713e5aca798db9223f" alt="Service map interaction details" width="1470" height="1002" data-path="images/service-map-details.png" />

## Filtering

### Namespace Filtering

Filter traffic by namespace:

```
# Show requests to services in a namespace
server.namespace = metoro

# Show requests from services in a namespace
client.namespace = metoro
```

### Service Filtering

Filter by service names:

```
# Show traffic to specific services
server.service.name = api.stripe.com

# Show traffic from specific services
client.service.name = metoro-apiserver
```

### Path Filtering

Use regex to filter by HTTP path:

```
# Find v1 trace endpoints
v1.traces
```

## Use Cases

1. **Dependency Monitoring**:

* Track external service dependencies
* Monitor third-party API usage
* Set up alerts for external service issues

2. **Traffic Analysis**:

* Identify communication patterns
* Debug service connectivity issues
* Monitor service health

3. **Error Detection**:

* Quickly spot failing connections
* Investigate error patterns
* Track error rates across services
