class CrashServer
Defined at line 28 of file ../../src/developer/forensics/crash_reports/crash_server.h
Represents the HTTP crash server to which the agent uploads crash reports to.
|fuchsia.net.http.Loader| is expected to be in |services|.
Public Methods
void ~CrashServer ()
Defined at line 36 of file ../../src/developer/forensics/crash_reports/crash_server.h
bool HasPendingRequest ()
Defined at line 38 of file ../../src/developer/forensics/crash_reports/crash_server.h
void CrashServer (async_dispatcher_t * dispatcher, std::shared_ptr<sys::ServiceDirectory> services, const std::string & url, LogTags * tags, feedback::AnnotationManager * annotation_manager, timekeeper::Clock * clock)
Defined at line 90 of file ../../src/developer/forensics/crash_reports/crash_server.cc
void MakeRequest (const Report & report, const Snapshot & snapshot, ::fit::function<void (UploadStatus, std::string)> callback)
Makes the HTTP request using |report| and |snapshot|.
Executes |callback| on completion with whether the request was successful (HTTP status
code [200-203]) and the crash report id on the server, if the request was successful.
Note: Only a single call to MakeRequest can be outstanding at a time.
Defined at line 106 of file ../../src/developer/forensics/crash_reports/crash_server.cc
std::map<std::string, std::string> PrepareAnnotations (const Report & report, const Snapshot & snapshot, const feedback::AnnotationManager * annotation_manager, zx::time_boot uptime)
Combines the annotations from |report|, |snapshot|, and |annotation_manager| into annotations
for upload.
* Annotations from |report| are always included.
* Only "presence" annotations from |snapshot| are included.
* Only the upload boot id from |annotation_manager| is included (if the current boot id is
immediately available).
Defined at line 234 of file ../../src/developer/forensics/crash_reports/crash_server.cc
Enumerations
enum UploadStatus
| Name | Value |
|---|---|
| kSuccess | 0 |
| kFailure | 1 |
| kThrottled | 2 |
| kTimedOut | 3 |
Defined at line 30 of file ../../src/developer/forensics/crash_reports/crash_server.h