opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
RpcServerAttributesExtractor should extract attributes onEnd
Is your feature request related to a problem? Please describe.
For server rpc spans, sometimes the rpc service/method is not known when the span is started.
Unfortunately RpcServerAttributesExtractor
cannot currently be used in this situation, because it inherits from RpcCommonAttributesExtractor
, which only extracts attributes onStart
.
Describe the solution you'd like
I would like RpcServerAttributesExtractor
to extract attributes onEnd
, so that it can be used in situations where the rpc service/method is not known when the span is started.
Describe alternatives you've considered
Re-implement a new AtributesExtractor
that calls an RpcAttributesGetter
in onEnd
Additional context
No response