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

Add JDK version to user agent #1797

Closed
wants to merge 4 commits into from
Closed

Add JDK version to user agent #1797

wants to merge 4 commits into from

Conversation

schlosna
Copy link
Contributor

Before this PR

Diagnosing the JDK version a specific Dialogue client is using to make requests is difficult.

After this PR

==COMMIT_MSG==
Adds JDK version to the dialogue user agent string, e.g. jdk/17.0.4.1
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Sep 30, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Adds JDK version to the dialogue user agent string, e.g. jdk/17.0.4.1

Check the box to generate changelog(s)

  • Generate changelog entry

@@ -60,7 +61,7 @@ public ListenableFuture<Response> execute(Request request) {
}

private static UserAgent augmentUserAgent(UserAgent baseAgent, Endpoint endpoint) {
return tryAddEndpointAgent(baseAgent, endpoint).addAgent(DIALOGUE_AGENT);
return tryAddEndpointAgent(baseAgent, endpoint).addAgent(DIALOGUE_AGENT).addAgent(JDK_AGENT);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm considering exposing something like UserAgent addAgents(Iterable<Agent>) to conjure-java-runtime-api to avoid multiple immutable copies, but that can be a follow on PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schlosna
Copy link
Contributor Author

schlosna commented Oct 4, 2022

Closing in favor of #1802

@schlosna schlosna closed this Oct 4, 2022
@schlosna schlosna deleted the ds/jdk-version branch October 4, 2022 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants