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 Tracing context in Key Vault keys package #4500

Merged
merged 14 commits into from
Jul 26, 2019

Conversation

samvaity
Copy link
Member

@samvaity samvaity commented Jul 20, 2019

  • Added tracing context to Keyvault keys package
  • Added T with Response<T> "overload in sync and async Key vault keys client.
  • Updated tests if necessary to work with the new return types.

Closes: #4475

@samvaity samvaity self-assigned this Jul 20, 2019
Copy link
Member

@JonathanGiles JonathanGiles left a comment

Choose a reason for hiding this comment

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

Looks good! I didn't review the JavaDoc yet, but the impl mostly looks good with only a few minor comments. Once that is fixed up we can do a JavaDoc review and then merge.

@danieljurek
Copy link
Member

[Following up on CI build that was improperly triggered]

Please ignore the java - cosmos - ci build failure. This was triggered by a bug. The bug has been fixed (#4520) so we shouldn't see this problem going forward.

@samvaity samvaity marked this pull request as ready for review July 23, 2019 04:13
@JonathanGiles
Copy link
Member

The one checkstyle error is the following:

[ERROR] /azure-sdk-for-java/sdk/keyvault/azure-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/KeyClientJavaDocCodeSnippets.java:16:8: Unused import - com.azure.security.keyvault.keys.models.KeyImportOptions. [UnusedImports]

Copy link
Member

@JonathanGiles JonathanGiles left a comment

Choose a reason for hiding this comment

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

Do an update where you defer to the 'withResponse' call. This should be the pattern used everywhere.


Thread.sleep(2000);

keyAsyncClient.createRsaKey(new RsaKeyCreateOptions("CloudRsaKey")
keyAsyncClient.createRsaKeyWithResponse(new RsaKeyCreateOptions("CloudRsaKey")
Copy link
Member

Choose a reason for hiding this comment

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

We should probably show a detailed sample for withResponse, processing/printing the headers info.

Copy link
Member Author

Choose a reason for hiding this comment

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

But that might lead to a lot of similar-looking samples 🤷‍♀

Copy link
Member

Choose a reason for hiding this comment

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

We can just update the existing sample, and make it print the response headers info along with the returned key details.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we should have samples which show the T response type methods as that is the more used one. I will update these examples in #4549 to use T response methods.

@g2vinay
Copy link
Member

g2vinay commented Jul 26, 2019

We should add one more test case for withResponse, parsing response headers and validating their values. But don't worry about it in this PR. as it will require recording it too.
I'll add that in my Keys crypyo PR.

Copy link
Member

@g2vinay g2vinay left a comment

Choose a reason for hiding this comment

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

We can add detailed test and samples for withResponse API in a follow up PR.
Looks good otherwise.

@samvaity samvaity merged commit dd272bf into Azure:master Jul 26, 2019
@samvaity samvaity deleted the tracing-keys branch September 27, 2019 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Tracing support in KeyVault Keys package
5 participants