googleapis / googleapis/google-cloud-java

[java-spanner] Extend Spanner client metrics

Open
#12,265 3 comments 0 reactions 1 assignee Assigned to @rahul2393 View on GitHub
api: spanner priority: p3 type: feature request
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

**Is your feature request related to a problem? Please describe.**
We would like to receive more client metrics for spanner clients. Usually information like:

- retries
- latencies
- requests per second

allows to trace down issues by service-instance that uses spanner. There are server-side metrics that can not provide the same insights as metrics independent of a deployed service.

**Describe the solution you'd like**
Right now, open census metrics are used to provide information about:
- oc_worker_spans
- sessions

It would be awesome if this list can be extended by
- retries
- latencies
- requests per second.

Right now, we use the Prometheus open census exporter to export the metrics that we can expose via Prometheus. In an ideal scenario, metrics would also be exposed using micrometer because it's part of the popular spring boot stack.

**Describe alternatives you've considered**
- building our custom metrics (Gauges, counters) for each service (already done in other teams, but this is a lot of work)
- building our own abstraction layer that would allow us to build a reusable spanner client that exposes metrics that can be reused
- not to do it and only rely on server metrics in combination with high-level client metrics like HTTP request latencies

Thanks in advance and keep up the good work!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.