Daniel Jaglowski 40b485f08a Update core for v0.90.0 release (#29539) 1 년 전
..
internal f4c44858b5 [all][chore] Moved from interface{} to any for all go code (#29072) 1 년 전
testdata 518c50ec8f [GoogleCloudSpannerReceiver]: Truncate metric label values for query … (#22075) 1 년 전
Makefile 3feb4f78e1 Added Google Cloud Spanner metrics receiver skeleton. (#5240) 3 년 전
README.md 562dc48d10 Link component issue badges to the respective issue page (#24642) 1 년 전
cardinality.md 7ceba4ec70 [receiver/googlecloudspannerreceiver] Rename metadata.yaml to metrics.yaml (#24011) 1 년 전
config.go 518c50ec8f [GoogleCloudSpannerReceiver]: Truncate metric label values for query … (#22075) 1 년 전
config_test.go 4a0ea8e961 [chore] Improving life cycle tests reporting (#23145) 1 년 전
doc.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전
factory.go 518c50ec8f [GoogleCloudSpannerReceiver]: Truncate metric label values for query … (#22075) 1 년 전
factory_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전
go.mod 40b485f08a Update core for v0.90.0 release (#29539) 1 년 전
go.sum 40b485f08a Update core for v0.90.0 release (#29539) 1 년 전
metadata.yaml 8a4348cb00 [chore] add codeowners to metadata (#24404) 1 년 전
receiver.go 7ceba4ec70 [receiver/googlecloudspannerreceiver] Rename metadata.yaml to metrics.yaml (#24011) 1 년 전
receiver_test.go 5133f4ccd6 [chore] use license shortform (#22052) 1 년 전

README.md

Google Cloud Spanner Receiver

Status
Stability beta: metrics
Distributions contrib, observiq, sumo
Issues Open issues Closed issues
Code Owners @architjugran, @varunraiko, @kiranmayib

Google Cloud Spanner enable you to investigate issues with your database by exposing via Total and Top N built-in tables:

  • Query statistics
  • Read statistics
  • Transaction statistics
  • Lock statistics
  • and others

Note: Total and Top N built-in tables are used with 1 minute statistics granularity.

The ultimate goal of Google Cloud Spanner Receiver is to collect and transform those statistics into metrics that would be convenient for further analysis by users.

Getting Started

The following configuration example is:

receivers:
  googlecloudspanner:
    collection_interval: 60s
    initial_delay: 1s
    top_metrics_query_max_rows: 100
    backfill_enabled: true
    cardinality_total_limit: 200000
    hide_topn_lockstats_rowrangestartkey: false
    truncate_text: false
    projects:
      - project_id: "spanner project 1"
        service_account_key: "path to spanner project 1 service account json key"
        instances:
          - instance_id: "id1"
            databases:
              - "db11"
              - "db12"
          - instance_id: "id2"
            databases:
              - "db21"
              - "db22"
      - project_id: "spanner project 2"
        service_account_key: "path to spanner project 2 service account json key"
        instances:
          - instance_id: "id3"
            databases:
              - "db31"
              - "db32"
          - instance_id: "id4"
            databases:
              - "db41"
              - "db42"

Brief description of configuration properties:

  • googlecloudspanner - name of the Cloud Spanner Receiver related section in OpenTelemetry collector configuration file
  • 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.
  • initial_delay defines how long this receiver waits before starting.
  • top_metrics_query_max_rows - max number of rows to fetch from Top N built-in table(100 by default)
  • backfill_enabled - turn on/off 1-hour data backfill(by default it is turned off)
  • 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 for more information about cardinality handling and filtering.
  • hide_topn_lockstats_rowrangestartkey - if true, masks PII (key values) in row_range_start_key label for the "top minute lock stats" metric
  • truncate_text - if true, the query text is truncated to 1024 characters.
  • projects - list of GCP projects
    • project_id - identifier of GCP project
    • 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 will be used for the database connection.
    • instances - list of Google Cloud Spanner instance for connection
      • instance_id - identifier of Google Cloud Spanner instance
      • databases - list of databases used from this instance