Skip to content

java v2: client wrapper instrumentation #7638

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

lmolkova
Copy link
Member

@lmolkova lmolkova commented Jun 13, 2025

Corresponding storage changes: Azure/azure-sdk-for-java#45902

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:java Issue for the Java client emitter: @typespec/http-client-java label Jun 13, 2025
Copy link
Contributor

No changes needing a change description found.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jun 13, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Copy link
Contributor

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +246 to +254
HttpInstrumentationOptions localHttpInstrumentationOptions = this.httpInstrumentationOptions == null
? new HttpInstrumentationOptions()
: this.httpInstrumentationOptions;
SdkInstrumentationOptions sdkInstrumentationOptions
= new SdkInstrumentationOptions(PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"))
.setSdkVersion(PROPERTIES.get(SDK_VERSION))
.setEndpoint(this.endpoint != null ? this.endpoint : "http://localhost:3000");
Instrumentation instrumentation
= Instrumentation.create(localHttpInstrumentationOptions, sdkInstrumentationOptions);
Copy link
Member

Choose a reason for hiding this comment

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

Should we consider moving this to buildInnerClient method? This will help when we introduce a buildAsyncClient in the future and also avoid having to duplicate the endpoint value in both places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emitter:client:java Issue for the Java client emitter: @typespec/http-client-java
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants