[GCP] [Firestore] Instances metadata (database id/location) #8620
Labels
blocked
bug
Something isn't working, use only for issues
Integration:gcp
Google Cloud Platform
Team:obs-ds-hosted-services
Label for the Observability Hosted Services team [elastic/obs-ds-hosted-services]
While working on enabling TSDB for GCP metrics data streams, @agithomas found that it's impossible to uniquely identify the Firestore database that produced metrics.
Each GCP Firestore document has labels, but they're generic and don't specify a particular Firestore database.
If a user has several Firestore databases and performs the same action (QUERY/LOOKUP/CREATE) on two or more databases at the same time, it can result in lost documents.
The metrics we collect in the current configuration don't include database metadata.
To solve this, we need to add more metadata about the Firestore databases in the documents, like database id and location.
I see two potential solutions:
Modify the agent configuration for Firestore to gather different metrics that contain these labels. This can be done by:
document/delete_count
withdocument/delete_ops_count
document/read_count
withdocument/read_ops_count
document/write_count
withdocument/write_ops_count
This approach would resolve the issue as these new metrics include database metadata. The downside is that these new metrics are currently in BETA, since having several Firestore databases under one account seems like a new feature.
Implement additional code in beats to retrieve metadata about Firestore databases (might not be possible).
Test with first approach
Changes I made to test this:
Document sample:
@agithomas @lalit-satapathy
The text was updated successfully, but these errors were encountered: