View logs and metrics
You can use
Cloud Monitoring
and
Cloud Logging
with Service Directory.
Monitor
Monitoring lets you create dashboards or set up
alerts. You can access it by visiting
Monitoring
in Trusted 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 service:servicedirectory.googleapis.com
.
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
cloudaudit.googleapis.com/activity
or cloudaudit.googleapis.com/data_access
,
as appropriate, from the Logs drop-down.
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# View logs and metrics\n\nYou can use\n[Cloud Monitoring](/monitoring)\nand\n[Cloud Logging](/logging)\nwith Service Directory.\n\nMonitor\n-------\n\nMonitoring lets you create dashboards or set up\nalerts. You can access it by visiting\n[Monitoring](https://app.google.stackdriver.com/)\nin Google Cloud console. To view basic monitoring metrics (request\ncount, size, and latency), go to the **Metrics Explorer** and filter by\n`resource_type:consumed_api` and `service:servicedirectory.googleapis.com`.\n\nView logs\n---------\n\nService Directory produces audit logs that you can view through\nLogging.\n\n### Audit logs\n\n[Audit logs](/logging/docs/audit)\ncan help you answer the questions \"Who did what, where, and when?\".\nService Directory writes two types of audit logs: **admin activity** and\n**data access**. Admin activity logs are always enabled and apply to the\nfollowing Service Directory operations:\n\n- CreateNamespace\n- UpdateNamespace\n- DeleteNamespace\n- SetIamPolicy\n\nAll other Service Directory operations are considered data access logs and are\nnot enabled by default. Data access logs are also subject to\nLogging pricing and quota, whereas neither applies to admin\nactivity logs. To enable data access logging, see\n[Configuring Data Access logs](/logging/docs/audit/configure-data-access#config-console).\n\nTo see these logs in\n[Logging](/logging/docs/view/logs-explorer-interface#getting_started),\nselect `Service Directory Namespace` from the **Resource** drop-down menu and\n`cloudaudit.googleapis.com/activity` or `cloudaudit.googleapis.com/data_access`,\nas appropriate, from the **Logs** drop-down.\n\nWhat's next\n-----------\n\n- To get a thorough understanding of Monitoring, see the [Monitoring documentation](/monitoring/docs).\n- To find solutions for common issues that you might encounter when using Service Directory, see [Troubleshooting](/service-directory/docs/troubleshooting)."]]