opentelemetry.exporter.cloud_logging.CloudLoggingExporter¶
- class opentelemetry.exporter.cloud_logging.CloudLoggingExporter(project_id=None, default_log_name=None, client=None, *, structured_json_file=None)[source]¶
Bases:
LogRecordExporterMethods
Exports a batch of logs.
Flushes any buffered logs.
pick_log_id- rtype:
Shuts down the exporter.
- export(batch)[source]¶
Exports a batch of logs.
- Parameters:
batch (
Sequence[ReadableLogRecord]) – The list ofReadableLogRecordobjects to be exported.- Return type:
- Returns:
The result of the export.
- Raises:
Exception – This method may raise exceptions on network errors, timeouts, or other failures. Callers (i.e., log processors) should handle these exceptions to comply with OpenTelemetry error handling principles.