Documentation ¶
Index ¶
- func GetSpecURL(domain string, svc akid.ServiceID, spec akid.APISpecID) url.URL
- func ParseFromHAR(col trace.Collector, log *hl.CustomHARLog) (int, sampled_err.Errors)
- func ProcessHAR(col trace.Collector, p string) (int, error)
- func ProcessHAREntry(col trace.Collector, harUUID uuid.UUID, seqNum int, entry hl.CustomHAREntry, ...) bool
- func Run(args Args) error
- func WriteSpec(out io.Writer, spec string) error
- type Args
- type ReconstructedTimestamps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSpecURL ¶ added in v0.12.0
func ParseFromHAR ¶ added in v0.21.2
func ParseFromHAR(col trace.Collector, log *hl.CustomHARLog) (int, sampled_err.Errors)
Returns the number of entries successfully collected from the given HAR log.
func ProcessHAR ¶ added in v0.12.0
Extract witnesses from a local HAR file and send them to the collector. Returns the number of entries extracted.
func ProcessHAREntry ¶ added in v0.12.0
func ProcessHAREntry(col trace.Collector, harUUID uuid.UUID, seqNum int, entry hl.CustomHAREntry, errs *sampled_err.Errors) bool
Processes a single entry from a HAR file. The UUID identifies the HAR file, whereas the seqNum identifies the entry within the file.
If any errors occur, the given Errors is updated, and false is returned. Otherwise, true is returned on success.
Types ¶
type Args ¶
type Args struct { // Required ClientID akid.ClientID Domain string Traces []location.Location // If unset, defaults to a randomly generated backend learn session. Out location.Location Service string Format string Tags map[tags.Key]string Versions []string GetSpecEnableRelatedFields bool IncludeTrackers bool PathParams []string PathExclusions []string Timeout *time.Duration TimeRange *time_span.TimeSpan GitHubBranch string GitHubCommit string GitHubRepo string GitHubPR int GitLabMR *gitlab.MRInfo Plugins []plugin.AkitaPlugin // Legacy -- used by `akita learn-sessions checkpoint`. LearnSessionID *akid.LearnSessionID }
type ReconstructedTimestamps ¶ added in v0.12.0
type ReconstructedTimestamps struct { RequestStart time.Time RequestEnd time.Time ResponseStart time.Time ResponseEnd time.Time }
ReconstructedTimestamps holds times we can use to fill in a ParsedNetworkTraffic, in such a way that the reported latencies in the Witness will end up the same as in the HAR file. (Because I couldn't think of a good way to pass the measurements through the to two separate Process calls, without major refactoring.)
In the future, we could save these timestamps directly in a custom field, or pass the interval values through.