You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/07/01 13:24:00 UTC
[jira] [Commented] (HTTPCLIENT-2423) Support trace context header propagation in httpclient5-observation
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18092956#comment-18092956 ]
ASF subversion and git services commented on HTTPCLIENT-2423:
-------------------------------------------------------------
Commit afba680b24370b85430e5314512fb2e955dd1b88 in httpcomponents-client's branch refs/heads/dependabot/maven/all-29bbd2bd6c from Arturo Bernal
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-client.git;h=afba680b2 ]
HTTPCLIENT-2423: Propagate trace context in observation interceptors
Expose outbound requests as Micrometer sender carriers for header injection.
> Support trace context header propagation in httpclient5-observation
> -------------------------------------------------------------------
>
> Key: HTTPCLIENT-2423
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2423
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: HttpClient (classic)
> Affects Versions: 5.6.1
> Reporter: Phil Clay
> Priority: Major
> Fix For: 5.7-alpha1
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The httpclient5-observation module does not provide a mechanism for propagating tracing headers (e.g. {{{}traceparent{}}}) in outbound requests.
> For reference, the old (deprecated) httpclient5 micrometer observation instrumentation in the micrometer-core library [provided a context so that headers would be propagated|https://github.com/micrometer-metrics/micrometer/blob/e11e7c6b3e579c607393905732d3b9b1f5863e95/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/hc5/ApacheHttpClientContext.java#L60-L62].
> The instrumentation from micrometer-core has been [deprecated in favor of the instrumentation provided by httpclient5-observation|https://github.com/micrometer-metrics/micrometer/issues/7158].
> Unfortunately, the httpclient5-observation instrumentation does not propagate trace context via headers. Therefore, users switching from micrometer-core to httpclient5-observation will lose functionality.
> This enhancement request is to add the appropriate context and header propagation mechanism to the httpclient5-observation module, so that users migrating from micrometer-core instrumentation to httpclient5-observation instrumentation will retain header propagation functionality. The old instrumentation from micrometer-core could be used as a reference for implementation (although, I would prefer if it called setHeader instead of addHeader).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org