Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/mongodbatlas] Logging enhancement for logs retrieval (open-…
…telemetry#29084) **Description:** Enhances current logs by adding more context to the warning message and adds a debug log that will help orient users if they cannot reach that block of code. **Link to tracking Issue:** Resolves open-telemetry#28851 **Testing:** ```log 2023-11-09T10:11:17.716-0500 warn [email protected]/logs.go:245 Attempted to retrieve host logs but received 0 logs {"kind": "receiver", "name": "mongodbatlas", "data_type": "logs", "error": "EOF", "log": "mongos.gz", "hostname": "cluster1-shard-00-00.t5hdg.mongodb.net", "startTime": "2023-11-09T10:06:16.618-0500", "endTime": "2023-11-09T10:11:16.618-0500"} 2023-11-09T10:11:17.946-0500 info LogsExporter {"kind": "exporter", "data_type": "logs", "name": "logging", "resource logs": 1, "log records": 28} 2023-11-09T10:11:18.131-0500 warn [email protected]/logs.go:274 Attempted to retrieve audit logs but received 0 logs {"kind": "receiver", "name": "mongodbatlas", "data_type": "logs", "error": "EOF", "hostname": "cluster1-shard-00-00.t5hdg.mongodb.net", "log": "mongos-audit-log.gz", "startTime": "2023-11-09T10:06:16.618-0500", "endTime": "2023-11-09T10:11:16.618-0500"} ``` **Documentation:** <Describe the documentation added.>
- Loading branch information