After you enable Cloud Audit Logs, the Google Cloud console logging explorer records the contents of the following categories:
- AuditLog proto
- API-level log
Enable and view
Cloud Audit Logs allow you to view administrative activities and permissions within Google Cloud resources.
Enable logging
Follow these steps to enable the logs.
- Navigate to the Google Cloud console, select IAM & Admin > Audit Logs.
- Enter the
Dialogflow APIfilter for Data access audit logs configuration, and select the following API types: Admin read, Data read, and Data write.
View logs
You must acquire the project owner and private logs viewer IAM roles, then follow these steps to view the logs.
- Navigate to the Google Cloud console, then select Logging > Logs Explorer.
- Optional: In Logs Explorer, add a filter or adjust the timeline as preferred.
- Select an entry to view details.
The logging proto
Each log entry will be an instance of the AuditLog proto, which contains the following fields:
| Field Type | Field Name |
|---|---|
| string | service_name |
| string | method_name |
| string | resource_name |
| ResourceLocation | resource_location
|
| google.protobuf.Struct | resource_original_state |
| int64 | num_response_items |
| google.rpc.Status | status |
| AuthenticationInfo | authentication_info
|
| repeated AuthorizationInfo | authorization_info
|
| PolicyViolationInfo | policy_violation_info |
| repeated PolicyViolationInfo | policy_violations |
| RequestMetadata | request_metadata
|
| google.protobuf.Struct | request |
| google.protobuf.Struct | response |
| google.protobuf.Struct | metadata |
| bytes | audit_loggable_mint |
| bytes | loggable_ubermint |
| bytes | audit_loggable_service_control_token |
| Redaction | redactions
|
Depending on the enabled Cloud Audit Logs fields, the log explorer populates the API's request and response bodies into the request and response fields of the logging proto.
API-level logged fields
| API | Logged field | |
|---|---|---|
| AnalyzeContent | Request
|
|
| StreamingAnalyzeContent | Request
|
Response
|
| CreateConversation | Request
|
Response
|
| CreateParticipant | Request
|
Response
|
| SuggestConversationSummary | Request
|
Response
|
| SearchKnowledge | Request
|
Response
|
| SuggestKnowledgeAssist | Request
|
Response
|