Skip to content

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


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.

3 participants