HAR File wikipedia: https://en.wikipedia.org/wiki/HAR_(file_format)
Only official looking doc I could find was https://w3c.github.io/web-performance/specs/HAR/Overview.html
Goal of this issue is to support Recording and exporting of HAR files,
of course it doesn't have to be a file to which we export,
but in the most common use case it will be.
This feature can be used by:
har
to https://github.com/plabayo/rama/tree/main/rama-http/src/layer where:
HARExportService
and HARExportLayer
.Both service and layer will take the following input:
FnOnce + Clone
? Used to create a future (signal) to toggle between record and stop, where on stop the data is exportedThe service starts in stopped modus (== not active) and is to be activated once signal is true, this can be spawned (gracefully) as a task really where the service just keeps track of an AtomicBool. Important is that that background tasks does exit in case the context is cancelled.
When the service is in record mode it will need to buffer each incoming http request in a prepared manner, har-ready.
This data can be kept already in a custom struct format (with these structs being serde::Serialize+Deserialize
).
When the toggle stops the record it will need to serialize the buffer as a json blob and write it to the Writer, which is basically just an ascyn io writer.
Required input for the Service/Layer:
Custom options for the service/layer:
This feature should also be well unit tested.
We also require an Example file which inspects the har file exists and is valid (can be as basic as just verifying the default format, not need to have 100% fail proof test. If the file exists, and it is a valid json object, which contains the expected root object and entries, where one entry can be verified a bit more in depth, it is probably good enough for what that e2e example test is concerned.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too