Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

guides/http: document Java Jetty client integration #563

Merged
merged 1 commit into from
Feb 5, 2019

Conversation

odeke-em
Copy link
Member

@odeke-em odeke-em commented Feb 4, 2019

Document the Java Jetty client integration with a guide,
an end-to-end example and screenshots.

Updates #562

@rghetia
Copy link
Contributor

rghetia commented Feb 4, 2019

Looks good. Couple of things.

  1. Would it not be better to use same example as it is in the repo. If the example in repo is not sufficient then we can enhance or change.
  2. An example with client and server both would be better than standalone client.

@odeke-em
Copy link
Member Author

odeke-em commented Feb 4, 2019

Thank you for listing out your concerns @rghetia! Please see my responses below:

  1. Would it not be better to use same example as it is in the repo. If the example in repo is not sufficient then we can enhance or change.

The example in the OpenCensus-Java repo is a full copy and pastable example for both the server and client but here we are documenting step by step for those who just want to use the client integration and the same for those who want to use the server integration. Otherwise, we'd just be dumping for them source code to go inspect. Please see what we've done for Go's net/http https://opencensus.io/guides/http/go/net_http/

An example with client and server both would be better than standalone client.

Sure for running source code but not for prescriptive steps when users are integrating it to parts of their apps, when someone just wants to focus on the client, them reverse engineering source code yet not everyone runs both client and server.

@rghetia
Copy link
Contributor

rghetia commented Feb 4, 2019

I didn't mean to dump the source code from the example directory but rather use code snippets from the example directory. Your step by step instructions are great.

@odeke-em
Copy link
Member Author

odeke-em commented Feb 4, 2019

I didn't mean to dump the source code from the example directory but rather use code snippets from the example directory. Your step by step instructions are great.

Oh I see. You have great examples in the OpenCensus-Java repo, but for this guide, the differences that I made were:
a) not using the log4j logger
b) used two different URLs to demonstrate it capturing status codes: 200 and 404 by fetching from https://opencensus.io/community and https://opencensus.io/non-existent respectively which are then shown in the trace and stats screenshots to demonstrate how the integration enhances and captures observability from requests

import io.opencensus.contrib.http.jetty.client.OcJettyHttpClient;
{{</highlight>}}

#### Dependency management
Copy link
Contributor

Choose a reason for hiding this comment

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

what about gradle?

Copy link
Member Author

Choose a reason for hiding this comment

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

Roger that, I've added:

  • Gradle
  • Buildr
  • Ivy

for the minimum additions of *http-jetty-client and *http-util dependencies.

@rghetia
Copy link
Contributor

rghetia commented Feb 4, 2019

I didn't mean to dump the source code from the example directory but rather use code snippets from the example directory. Your step by step instructions are great.

Oh I see. You have great examples in the OpenCensus-Java repo, but for this guide, the differences that I made were:
a) not using the log4j logger
b) used two different URLs to demonstrate it capturing status codes: 200 and 404 by fetching from https://opencensus.io/community and https://opencensus.io/non-existent respectively which are then shown in the trace and stats screenshots to demonstrate how the integration enhances and captures observability from requests

SG.

@odeke-em
Copy link
Member Author

odeke-em commented Feb 5, 2019

Please take a look at the update @rghetia and thanks for the initial review!

@rghetia
Copy link
Contributor

rghetia commented Feb 5, 2019

LGTM

@odeke-em
Copy link
Member Author

odeke-em commented Feb 5, 2019

Thank you for the review @rghetia!

Document the Java Jetty client integration with a guide,
an end-to-end example and screenshots.

Updates #562
@odeke-em odeke-em merged commit 3b6f96f into master Feb 5, 2019
@odeke-em odeke-em deleted the document-jetty-client branch February 5, 2019 23:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants