Open wgy035 opened 4 months ago
looked interesting, I want to take a look into it.
I audited and tested most of AttributeExtractor.onEnd
implementations, in each scenario, whether the attribute extract is executed in onStart
or onEnd
, the test results are the same.
Is your feature request related to a problem? Please describe.
While conducting a performance test, I discovered through flame graph analysis that the merge operation in the
HttpServerMetrics.onEnd()
causes performance overhead.The
startAttributes
is generated byHttpCommonAttributesExtractor.onStart()
and all attributes are extracted from request, could we move the attributes extract intoHttpCommonAttributesExtractor.onEnd()
to avoid merge in theHttpServerMetrics.onEnd()
? I have reviewed the tracking code, the request will not be changed.Describe the solution you'd like
I would like
HttpCommonAttributesExtractor
to extract attributes onEnd, so that it can be used inHttpServerMetrics
directly. AndstartAttributes().toBuilder().putAll(endAttributes).build()
is no longer needed.Describe alternatives you've considered
No response
Additional context
No response