Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create helpers to initialize and export gRPC metrics #13998

Open
3 of 6 tasks
coryan opened this issue Apr 15, 2024 · 1 comment · May be fixed by #14270
Open
3 of 6 tasks

Create helpers to initialize and export gRPC metrics #13998

coryan opened this issue Apr 15, 2024 · 1 comment · May be fixed by #14270
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@coryan
Copy link
Member

coryan commented Apr 15, 2024

Starting with gRPC-v1.62.x there are cool metrics published via OTel:

https://github.com/grpc/grpc/blob/6d7a55890e076a3a8abc8185b6bf0153fcf9d179/include/grpcpp/ext/otel_plugin.h#L45-L58

We would like a simple function to initialize a metrics provider such that metrics related to the Storage library get exported to Cloud Monitoring. Presumably other libraries can use something similar.

Though we would probably need >= v1.63.0 to provide good filtering:

https://github.com/grpc/grpc/blob/bc470e47ad64ae94ba8baff01e75a7606ed1cd00/include/grpcpp/ext/otel_plugin.h#L125-L127

One issue is to figure out the right filtering function that works for universe domains, VPC-SC, and PSC.

  • Determine the project used to export GCS+gRPC metrics #14112
  • Initialize the endpoint for the exporter
  • Initialize gRPC exporter only once per "endpoint"
  • Use resource detector to initialize the resource attributes in the exporter
  • Configure the exporter to use CreateServiceTimeSeries()
  • Configure the exporter to use the right prefix for the metric name
@coryan coryan added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Apr 15, 2024
@coryan
Copy link
Member Author

coryan commented Apr 15, 2024

We need a function that will accept:

Target Authority
storage.${universe_domain} storage.${universe_domain}
private.googleapis.com storage.googleapis.com
restricted.googleapis.com storage.googleapis.com
storage-${foo}.p.googleapis.com storage.googleapis.com

It should reject everything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant