Viewing error logs in Stackdriver Logging

This page explains how to view logs in Stackdriver for errors triggered in DICOM import requests and FHIR import and export requests.

Logging

Errors triggered in each of the following requests are logged to Stackdriver Logging.

Logging is automatic and does not need to be enabled. To disable Stackdriver Logging for one or all monitored resources, see Logs exclusions.

Viewing logs

To view logs, go to the Logs Viewer. You can filter logs by store type (DICOM or FHIR store), region, and dataset.

For example, in the first list under Filter by label or text search, click Healthcare FHIR Store to view logs for FHIR stores.

UTF-8 encoding is enforced for log fields. Characters that are not UTF-8 characters are replaced with question marks.

For detailed information about the Logs Viewer, see Viewing logs.

What is logged

Cloud Healthcare API log entries contain the following types of information for debugging requests:

  • General information, such as severity, project ID, project number, and timestamp.
  • jsonPayload contains the actual body of the entry. This field contains the error code, the error message, and the name of the source file whose import triggered the error.
  • operation contains the type and ID of the operation that produced the error.
  • resource contains the location, dataset, and DICOM or FHIR store involved in the error.

If the number of errors exceeds a threshold, a limited number of errors appears in Stackdriver Logging. The threshold is dynamically calculated based on the size of the input.

Where logs are stored

Stackdriver is not a regionalized product. Logs written to Stackdriver could be stored in a different region from the DICOM and FHIR stores.

Sample DICOM import log entry

The following sample log entry shows an empty DICOM instance found error that occurred while attempting to import gs://DICOM_FILENAME.dcm to projects/PROJECT_ID/locations/REGION/datasets/DATASET_ID/dicomStores/DICOM_STORE_ID.

 jsonPayload: {
  @type:  "type.googleapis.com/google.cloud.healthcare.logging.ImportDicomLogEntry"
  error: {
   code:  3
   message:  "empty DICOM instance found"
  }
  source:  "gs://DICOM_FILENAME.dcm"
 }
 logName:  "projects/PROJECT_ID/logs/healthcare.googleapis.com%2Foperations"
 operation: {
  id:  "PROJECT_ID"
  producer:  "import_dicom"
 }
 receiveTimestamp:  "TIMESTAMP"
 resource: {
  labels: {
   dataset_id:  "DATASET_ID"
   dicom_store_id:  "DICOM_STORE_ID"
   location:  "REGION"
   project_id:  "PROJECT_ID"
  }
  type:  "healthcare_dicom_store"
 }
 severity:  "ERROR"
 timestamp:  "TIMESTAMP"

Sample FHIR import log entry

The following sample log entry shows a cannot import resource error that occurred while attempting to import gs://FHIR_FILENAME.ndjson to projects/PROJECT_ID/locations/REGION/datasets/DATASET_ID/fhirStore/FHIR_STORE_ID.

 jsonPayload: {
  @type:  "type.googleapis.com/google.cloud.healthcare.logging.ImportFhirLogEntry"
  error: {
   code:  3
   message:  "cannot import resource Patient/PATIENT_ID, conflicting resource already exists"
  }
  source:  "gs://FHIR_FILENAME.ndjson"
 }
 logName:  "projects/PROJECT_ID/logs/healthcare.googleapis.com%2Foperations"
 operation: {
  id:  "PROJECT_ID"
  producer:  "import_fhir"
 }
 receiveTimestamp:  "TIMESTAMP"
 resource: {
  labels: {
   dataset_id:  "DATASET_ID"
   fhir_store_id:  "FHIR_STORE_ID"
   location:  "REGION"
   project_id:  "PROJECT_ID"
  }
  type:  "healthcare_fhir_store"
 }
 severity:  "ERROR"
 timestamp:  "TIMESTAMP"

Sample DICOM de-identify log entry

The following sample log entry shows a cannot de-identify dicom instance error that occurred while trying to de-identify DICOM instance INSTANCE_ID in dataset projects/PROJECT_ID/locations/REGION/datasets/DATASET_ID.

 jsonPayload: {
  @type:  "type.googleapis.com/google.cloud.healthcare.logging.DeidentifyLogEntry"
  error: {
   code:  2
   message:  "Failed to process instance INSTANCE_ID"
  }
  resourceName:  "projects/PROJECT_ID/locations/REGION/datasets/DATASET_ID"
 }
 logName:  "projects/PROJECT_ID/logs/healthcare.googleapis.com%2Fdeidentify_dataset"
 operation: {
  id:  "projects/PROJECT_ID/locations/REGION/datasets/DATASET_ID/operations/OPERATION_ID"
  producer:  "healthcare.googleapis.com/DeidentifyDataset"
 }
 receiveTimestamp:  "TIMESTAMP"
 resource: {
  labels: {
   dataset_id:  "DATASET_ID"
   location:  "REGION"
   project_id:  "PROJECT_ID"
  }
  type:  "healthcare_dataset"
 }
 severity:  "ERROR"
 timestamp:  "TIMESTAMP"

What's next

Hai trovato utile questa pagina? Facci sapere cosa ne pensi:

Invia feedback per...

Cloud Healthcare API