-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
@@ -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) |
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.
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) |
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.
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); |
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.
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?
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.
@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.
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.
Awesome, thank you! 🚢
No description provided.