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

Updated Examples with License Key #274

Merged
merged 5 commits into from
Jun 8, 2021
Merged

Updated Examples with License Key #274

merged 5 commits into from
Jun 8, 2021

Conversation

yamnihcg
Copy link
Contributor

@yamnihcg yamnihcg commented Jun 1, 2021

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jun 1, 2021

CLA assistant check
All committers have signed the CLA.

@yamnihcg yamnihcg requested a review from XiXiaPdx June 1, 2021 21:11
@@ -73,31 +74,31 @@ public static void main(String[] args) throws MalformedURLException {
.connectTimeout(Duration.ofSeconds(3))
// configure custom stuff here, like proxies, etc.
.build()))
.configureWith(insertApiKey)
.configureWith(licenseKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might be missing useLicenseKey(true) ?

.endpoint(new URL("http://special-metrics.com/your/custom/path"))
.build());

// Configure your span sender:
SpanBatchSender spanBatchSender =
SpanBatchSender.create(
SpanBatchSenderFactory.fromHttpImplementation(Java11HttpPoster::new)
.configureWith(insertApiKey)
.configureWith(licenseKey)
Copy link
Contributor

Choose a reason for hiding this comment

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

useLicenseKey(true) ?

Also, for the next two configurations as well.

// create a TelemetryClient with an http connect timeout of 10 seconds.
TelemetryClient telemetryClient =
TelemetryClient.create(
() -> new OkHttpPoster(Duration.of(10, ChronoUnit.SECONDS)), licenseKey);
Copy link
Contributor

Choose a reason for hiding this comment

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

I tried this with my prod license key and I'm getting 403. I don't think the code path will allow a license key in this particular example. Did you get this to work with a license key?

Copy link
Contributor

Choose a reason for hiding this comment

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

@yamnihcg I don't think a license key will work here, without some changes to the create of the TelemetryClient.

Lets update the TelemetryClient so that it configured with a license key

…erences from Insights Insert Key to License Key.
@yamnihcg yamnihcg requested a review from XiXiaPdx June 1, 2021 23:33
Copy link
Contributor

@XiXiaPdx XiXiaPdx left a comment

Choose a reason for hiding this comment

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

Awesome, thank you! 🚢

@yamnihcg yamnihcg merged commit f65b4c7 into main Jun 8, 2021
@yamnihcg yamnihcg deleted the updated-examples-branch branch June 8, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants