You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the tracehandler is caching already seen traces and already converted traces in 2 LRU.
If the value is already in one or the other, it will not call reporter.ReportFramesForTrace but only reporter.ReportCountForTrace.
I feel that the cache responsibility should be moved to the reporter as only it knows if it has seen enough (or kept in cache enough) data to handle a trace or if it needs the frames again.
I saw the new trace_event protocol, but it’s always converting the trace and sending all frames to the reporter. I feel that it costs more in terms of performances but I did not measure this extensively.
On a side note, if the reporter is supporting trace_events, then you may skip adding the trace hash to bpfTraceCache as it’s not used in this case.
The text was updated successfully, but these errors were encountered:
repoter.ReportFramesForTrace() will always be called if reporter.SupportsReportTraceEvent() returns true. Only if reporter.SupportsReportTraceEvent() returns false, then reporter.ReportCountForTrace() will be called.
So with returning true or false independent implementations of package reporter can change this behaviour. With OTel the focus is on a more stateless protocol, while it is possible to implement a more statefull protocol - e.g. by using reporter.ReportCountForTrace() and just reporting counts for traces and not all frames for a trace every time.
Currently, the tracehandler is caching already seen traces and already converted traces in 2 LRU.
If the value is already in one or the other, it will not call
reporter.ReportFramesForTrace
but onlyreporter.ReportCountForTrace
.I feel that the cache responsibility should be moved to the reporter as only it knows if it has seen enough (or kept in cache enough) data to handle a trace or if it needs the frames again.
I saw the new trace_event protocol, but it’s always converting the trace and sending all frames to the reporter. I feel that it costs more in terms of performances but I did not measure this extensively.
On a side note, if the reporter is supporting trace_events, then you may skip adding the trace hash to bpfTraceCache as it’s not used in this case.
The text was updated successfully, but these errors were encountered: