Skip to content
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

Convert java-http-client to use Instrumenter API #3790

Merged
merged 3 commits into from
Aug 10, 2021

Conversation

jack-berg
Copy link
Member

Contributing to Issue #2713.

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!


/** Context propagation is implemented via {@link HttpHeadersInstrumentation}. */
/** Context propagation is initiated in via {@link HttpHeadersInstrumentation}. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/** Context propagation is initiated in via {@link HttpHeadersInstrumentation}. */
/** Context propagation is initiated in {@link HttpHeadersInstrumentation}. */

.addAttributesExtractor(httpAttributesExtractor)
.addAttributesExtractor(netAttributesExtractor)
.addAttributesExtractor(PeerServiceAttributesExtractor.create(netAttributesExtractor))
.addRequestMetrics(HttpClientMetrics.get())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more metrics 🎉

}

@Override
protected @Nullable String flavor(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit

Suggested change
protected @Nullable String flavor(
protected String flavor(

}

@Override
protected @Nullable Integer statusCode(HttpRequest httpRequest, HttpResponse<?> httpResponse) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
protected @Nullable Integer statusCode(HttpRequest httpRequest, HttpResponse<?> httpResponse) {
protected Integer statusCode(HttpRequest httpRequest, HttpResponse<?> httpResponse) {

private static final Logger logger = LoggerFactory.getLogger(JdkHttpNetAttributesExtractor.class);

@Override
public @Nullable String transport(HttpRequest httpRequest) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public @Nullable String transport(HttpRequest httpRequest) {
public String transport(HttpRequest httpRequest) {

@trask trask merged commit f5be16b into open-telemetry:main Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants