# Grafana graph query service in Kloudfuse platform

## Trace edge metrics

### traces_service_graph_request_total

Total count of requests between two nodes

- **Type:** Counter
- **Labels:** client, server, connection_type
- Used in grafana UI

### traces_service_graph_request_failed_total:

Total count of failed requests between two nodes

- **Type:** Counter
- **Labels:** client, server, connection_type
- Used in grafana UI

### traces_service_graph_request_server_seconds

Time for a request between two nodes as seen from the server

- **Type:** Histogram
- **Labels:** client, server, connection_type
- Used in grafana UI

### traces_service_graph_request_client_seconds

Time for a request between two nodes as seen from the client

- **Type:** Histogram
- **Labels:** client, server, connection_type
- NOT used in grafana UI

### traces_service_graph_unpaired_spans_total

Total count of unpaired spans

- **Type:** Counter
- **Labels:** client, server, connection_type
- NOT used in grafana UI

### traces_service_graph_dropped_spans_total

Total count of dropped spans

- **Type:** Counter
- **Labels:** client, server, connection_type
- NOT used in grafana UI

## Span Metrics

### traces_spanmetrics_latency

Duration of the span

- **Type:** Histogram
- **Labels:** Dimensions
- Used in grafana UI

### traces_spanmetrics_calls_total

Total count of the span

- **Type:** Counter
- **Labels:** Dimensions
- Used in grafana UI

### traces_spanmetrics_size_total

Total size of spans ingested

- **Type:** Counter
- **Labels:** Dimensions
- NOT used in grafana UI

## Queries received on query service

### /api/v1/series

For auto-complete of filter labels and values. The following label names are translated in the series results:

- client_service_name → client
- service_name → server
- span_type → connection_type

Possible values for `connection_type`: `unset`, `messaging_system`, or `database`

Possible values for `span_type`: `db`, `http`

### traces_service_graph_request_server_seconds_sum

```console
time=2023-06-15T21:28:30.249382665Z level=info msg=Received method=POST request=map[end:[1686864511] match[]:[traces_service_graph_request_server_seconds_sum] start:[1686860911]] requestId=aab94d47-c514-499c-9404-3983f01784d6 uri=/api/v1/series
```

```console
time=2023-06-15T21:28:30.249505128Z level=info msg=Prom adapter received a getSeries end=1686864511000 matchers=[[name="edge_latency_sum"]] requestId=aab94d47-c514-499c-9404-3983f01784d6 start=1686860911000
```
