google / exposure-notifications-server

Exposure Notification Reference Server | Covid-19 Exposure Notifications
https://www.google.com/covid19/exposurenotifications/
Apache License 2.0
2.45k stars 313 forks source link

exposure service can't create metricDescriptors in SD #745

Closed marekaf closed 4 years ago

marekaf commented 4 years ago

TL;DR

Exposure in Cloud Run is logging this all the time

Failed to export to Stackdriver: rpc error: code = PermissionDenied desc = Permission monitoring.metricDescriptors.create denied (or the resource may not exist).

I have the newest version deployed, including having correct ENV var PROJECT_ID specified and SA has the correct role from terraform

I have Stackdriver enabled, it works for other workload on this GCP project.

sethvargo commented 4 years ago

Can you make sure:

  1. The service is using the exposure service account
  2. The exposure service account has the monitoring.metricWriter role

?

marekaf commented 4 years ago

cloud run revisions detail:

Screenshot 2020-07-20 08 27 06

IAM: Screenshot 2020-07-19 19 51 01

sethvargo commented 4 years ago

The full email is blacked out - does it match the email from the Cloud Run screenshot? If it does, I'm really not sure.

marekaf commented 4 years ago

The full email is blacked out - does it match the email from the Cloud Run screenshot? If it does, I'm really not sure.

Yes, it does. I wanted to black out the first screenshot too, oops.

marekaf commented 4 years ago

@sethvargo I created a new GCP project, deployed with terraform everything from scratch, added something in the web admin and ran the exposure-client/main.go and now the exposure service is logging this

Failed to export to Stackdriver: rpc error: code = InvalidArgument desc = One or more TimeSeries could not be written: One or more points were written more frequently than the maximum sampling period configured for the metric.: timeSeries[0-9]

which I've seen already in other svcs' logs. Any ideas?

sethvargo commented 4 years ago

That's a known issue (https://github.com/google/exposure-notifications-server/issues/699). We haven't had a chance to fix it yet.