Skip to content

Commit 96bd452

Browse files
authored
Restore spanner receiver, and add new codeowners (#35998)
#### Description Reverts #35724. The existing CODEOWNER had moved on. This adds myself as the sponsor of the component, and three members of the spanner team to ensure we don't have a single point of failure. @dsimil @KiranmayiB @harishbohara11 New codeowners, please approve! cc @codeboten
1 parent 1d864b6 commit 96bd452

File tree

92 files changed

+9943
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+9943
-28
lines changed

.chloggen/codeboten_rm-unmaintained-component.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ receiver/fluentforwardreceiver/ @open-teleme
243243
receiver/githubreceiver/ @open-telemetry/collector-contrib-approvers @adrielp @andrzej-stencel @crobert-1 @TylerHelmuth
244244
receiver/googlecloudmonitoringreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @TylerHelmuth @abhishek-at-cloudwerx
245245
receiver/googlecloudpubsubreceiver/ @open-telemetry/collector-contrib-approvers @alexvanboxel
246+
receiver/googlecloudspannerreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @dsimil @KiranmayiB @harishbohara11
246247
receiver/haproxyreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @MovieStoreGuy
247248
receiver/hostmetricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @braydonk
248249
receiver/httpcheckreceiver/ @open-telemetry/collector-contrib-approvers @codeboten

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ body:
237237
- receiver/github
238238
- receiver/googlecloudmonitoring
239239
- receiver/googlecloudpubsub
240+
- receiver/googlecloudspanner
240241
- receiver/haproxy
241242
- receiver/hostmetrics
242243
- receiver/httpcheck

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ body:
231231
- receiver/github
232232
- receiver/googlecloudmonitoring
233233
- receiver/googlecloudpubsub
234+
- receiver/googlecloudspanner
234235
- receiver/haproxy
235236
- receiver/hostmetrics
236237
- receiver/httpcheck

.github/ISSUE_TEMPLATE/other.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ body:
231231
- receiver/github
232232
- receiver/googlecloudmonitoring
233233
- receiver/googlecloudpubsub
234+
- receiver/googlecloudspanner
234235
- receiver/haproxy
235236
- receiver/hostmetrics
236237
- receiver/httpcheck

.github/ISSUE_TEMPLATE/unmaintained.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ body:
236236
- receiver/github
237237
- receiver/googlecloudmonitoring
238238
- receiver/googlecloudpubsub
239+
- receiver/googlecloudspanner
239240
- receiver/haproxy
240241
- receiver/hostmetrics
241242
- receiver/httpcheck

cmd/githubgen/allowlist.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ abhishek-at-cloudwerx
2525
joker-star-l
2626
michael-burt
2727
Hemansh31
28-
shazlehu
28+
shazlehu
29+
dsimil
30+
KiranmayiB
31+
harishbohara11

cmd/otelcontribcol/builder-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ receivers:
159159
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver v0.112.0
160160
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudmonitoringreceiver v0.112.0
161161
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.112.0
162+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.112.0
162163
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.112.0
163164
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.112.0
164165
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver v0.112.0
@@ -415,6 +416,7 @@ replaces:
415416
- github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension => ../../extension/httpforwarderextension
416417
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter => ../../exporter/elasticsearchexporter
417418
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter => ../../exporter/awscloudwatchlogsexporter
419+
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver => ../../receiver/googlecloudspannerreceiver
418420
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver => ../../receiver/prometheusreceiver
419421
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter => ../../exporter/sapmexporter
420422
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet => ../../internal/kubelet
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include ../../Makefile.Common
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Google Cloud Spanner Receiver
2+
3+
<!-- status autogenerated section -->
4+
| Status | |
5+
| ------------- |-----------|
6+
| Stability | [beta]: metrics |
7+
| Distributions | [contrib] |
8+
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fgooglecloudspanner%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fgooglecloudspanner) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fgooglecloudspanner%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fgooglecloudspanner) |
9+
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dashpole](https://www.github.com/dashpole), [@dsimil](https://www.github.com/dsimil), [@KiranmayiB](https://www.github.com/KiranmayiB), [@harishbohara11](https://www.github.com/harishbohara11) |
10+
| Emeritus | [@architjugran](https://www.github.com/architjugran), [@varunraiko](https://www.github.com/varunraiko) |
11+
12+
[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
13+
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
14+
<!-- end autogenerated section -->
15+
16+
Google Cloud Spanner enable you to investigate issues with your database
17+
by exposing via [Total and Top N built-in tables](https://cloud.google.com/spanner/docs/introspection):
18+
- Query statistics
19+
- Read statistics
20+
- Transaction statistics
21+
- Lock statistics
22+
- and others
23+
24+
_Note_: Total and Top N built-in tables are used with 1 minute statistics granularity.
25+
26+
The ultimate goal of Google Cloud Spanner Receiver is to collect and transform those statistics into metrics
27+
that would be convenient for further analysis by users.
28+
29+
## Getting Started
30+
31+
The following configuration example is:
32+
33+
```yaml
34+
receivers:
35+
googlecloudspanner:
36+
collection_interval: 60s
37+
initial_delay: 1s
38+
top_metrics_query_max_rows: 100
39+
backfill_enabled: true
40+
cardinality_total_limit: 200000
41+
hide_topn_lockstats_rowrangestartkey: false
42+
truncate_text: false
43+
projects:
44+
- project_id: "spanner project 1"
45+
service_account_key: "path to spanner project 1 service account json key"
46+
instances:
47+
- instance_id: "id1"
48+
databases:
49+
- "db11"
50+
- "db12"
51+
- instance_id: "id2"
52+
databases:
53+
- "db21"
54+
- "db22"
55+
- project_id: "spanner project 2"
56+
service_account_key: "path to spanner project 2 service account json key"
57+
instances:
58+
- instance_id: "id3"
59+
databases:
60+
- "db31"
61+
- "db32"
62+
- instance_id: "id4"
63+
databases:
64+
- "db41"
65+
- "db42"
66+
```
67+
68+
Brief description of configuration properties:
69+
- **googlecloudspanner** - name of the Cloud Spanner Receiver related section in OpenTelemetry collector configuration file
70+
- **collection_interval** - this receiver runs periodically. Each time it runs, it queries Google Cloud Spanner, creates metrics, and sends them to the next consumer (default: 1 minute). **It is not recommended to change the default value of collection interval, since new values for metrics in the Spanner database appear only once a minute.**
71+
- **initial_delay** defines how long this receiver waits before starting.
72+
- **top_metrics_query_max_rows** - max number of rows to fetch from Top N built-in table(100 by default)
73+
- **backfill_enabled** - turn on/off 1-hour data backfill(by default it is turned off)
74+
- **cardinality_total_limit** - limit of active series per 24 hours period. If specified, turns on cardinality filtering and handling. If zero or not specified, cardinality is not handled. You can read [this document](cardinality.md) for more information about cardinality handling and filtering.
75+
- **hide_topn_lockstats_rowrangestartkey** - if true, masks PII (key values) in row_range_start_key label for the "top minute lock stats" metric
76+
- **truncate_text** - if true, the query text is truncated to 1024 characters.
77+
- **projects** - list of GCP projects
78+
- **project_id** - identifier of GCP project
79+
- **service_account_key** - path to service account JSON key It is highly recommended to set this property to the correct value. In case it is empty, the [Application Default Credentials](https://google.aip.dev/auth/4110) will be used for the database connection.
80+
- **instances** - list of Google Cloud Spanner instance for connection
81+
- **instance_id** - identifier of Google Cloud Spanner instance
82+
- **databases** - list of databases used from this instance
83+

0 commit comments

Comments
 (0)