-
Notifications
You must be signed in to change notification settings - Fork 1k
Apache HC 5 OTel semantic convention #6591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apache HC 5 OTel semantic convention #6591
Conversation
Adds an ObservationConvention implementation for the Apache HC 5 instrumentation that follows the latest (at this time) OpenTelemetry semantic conventions for HTTP clients. Also adds an ObservationDocumentation for it as well.
This will be needed by other HTTP instrumentation.
URL { | ||
@Override | ||
public String asString() { | ||
return "url.full"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worth mentioning that we have a uri
KeyValue on the existing DefaultApacheHttpClientObservationConvention
where we try to get a templated URI (although we can't if users don't provide a way to access it). The equivalent in OTel HTTP client semantic conventions is url.template
, but it is currently not marked stable. This means that HTTP client metrics using the stable OTel semantic conventions will have no information about the URL being called.
...instrument/binder/httpcomponents/hc5/OpenTelemetryApacheHttpClientObservationConvention.java
Outdated
Show resolved
Hide resolved
...trument/binder/httpcomponents/hc5/OpenTelemetryApacheHttpClientObservationDocumentation.java
Outdated
Show resolved
Hide resolved
Specifically, status and port are defined as ints. Uses 0 and -1 for the case when they are unknown/undefined.
Signed-off-by: Johnny Lim <izeye@naver.com>
Adds an ObservationConvention implementation for the Apache HC 5 instrumentation that follows the latest (at this time) OpenTelemetry semantic conventions for HTTP clients. Also adds an ObservationDocumentation for it as well.
Documentation has been updated to demonstrate how the convention can be configured with the instrumentation.