View logs and metrics

You can use Cloud Monitoring and Cloud Logging with Service Directory.


Monitoring lets you create dashboards or set up alerts. You can access it by visiting Monitoring in Google Cloud console. To view basic monitoring metrics (request count, size, and latency), go to the Metrics Explorer and filter by resource_type:consumed_api and

View logs

Service Directory produces audit logs that you can view through Logging.

Audit logs

Audit logs can help you answer the questions "Who did what, where, and when?". Service Directory writes two types of audit logs: admin activity and data access. Admin activity logs are always enabled and apply to the following Service Directory operations:

  • CreateNamespace
  • UpdateNamespace
  • DeleteNamespace
  • SetIamPolicy

All other Service Directory operations are considered data access logs and are not enabled by default. Data access logs are also subject to Logging pricing and quota, whereas neither applies to admin activity logs. To enable data access logging, see Configuring Data Access logs.

To see these logs in Logging, select Service Directory Namespace from the Resource drop-down menu and or, as appropriate, from the Logs drop-down.

What's next