Modelling HTTP client response body capture #1284
Labels
area:semantic-conventions
Related to semantic conventions
priority:p3
Lowest priority level
release:allowed-for-ga
Editorial changes that can still be added before GA since they don't require action by SIGs
spec:trace
Related to the specification/trace directory
What are you trying to achieve?
I would like to discuss the correct way of capturing HTTP client response body. When a response body is captured the HTTP client span is usually finished - the body can be read from a stream after a response object is returned.
The ideal situation would be to add the body to the client span, but the span is usually finished as mentioned above. If the client span is finished our instrumentation creates a new span with a link to the HTTP client span with a name e.g.
additional-attributes
and attaches the body and immediately finishes the span. The "additional-attributes" span could be started when the body reading starts to also capture the timing information for the body read operation.An alternative approach could be to allow flushing of data after the span is ended. The OTEL design does not seem to pursue this.
Has anybody come across this use case?
The instrumentation is available in
https://github.com/hypertrace/javaagent. e.g. the jaxrs-client instrumentation.
Additional context.
Related to open-telemetry/semantic-conventions#857
The text was updated successfully, but these errors were encountered: