Skip to content

chore(gax): deprecate ApiTracer.inScope() - #14467

Draft
jinseopkim0 wants to merge 2 commits into
mainfrom
deprecate-api-tracer-inscope
Draft

jinseopkim0 wants to merge 2 commits into
mainfrom
deprecate-api-tracer-inscope

Conversation

@jinseopkim0

Copy link
Copy Markdown
Contributor

This PR deprecates ApiTracer.inScope() with @Deprecated and @ObsoleteApi, as span scope lifecycle is now managed internally by tracer implementations rather than requiring callers to manually install thread locals.

@jinseopkim0

Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request deprecates the inScope() method across ApiTracer, BaseApiTracer, and CompositeTracer by adding @Deprecated and @ObsoleteApi annotations. The feedback suggests making the deprecation message in @ObsoleteApi more generic by removing the specific reference to 'OpenTelemetry tracer implementations' to avoid referencing specific or potentially stale implementations in the future.

@jinseopkim0

Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

1 similar comment
@jinseopkim0

Copy link
Copy Markdown
Contributor Author

@gemini-code-assist review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request deprecates the inScope() method across ApiTracer, BaseApiTracer, and CompositeTracer by adding @Deprecated and @ObsoleteApi annotations. However, the required import com.google.api.core.ObsoleteApi is missing in both ApiTracer.java and BaseApiTracer.java, which will lead to compilation failures.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request deprecates the inScope() method across ApiTracer, BaseApiTracer, and CompositeTracer by adding the @Deprecated and @ObsoleteApi annotations, indicating that scope management is now handled internally. There are no review comments to address, and I have no additional feedback to provide.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request deprecates the inScope() method across ApiTracer, BaseApiTracer, and CompositeTracer using the @Deprecated and @ObsoleteApi annotations. The feedback identifies critical compilation errors in ApiTracer.java and BaseApiTracer.java because the com.google.api.core.ObsoleteApi class is used without being imported.

* @deprecated Scope management is handled internally.
*/
@Deprecated
@ObsoleteApi("Scope management is handled internally")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The annotation @ObsoleteApi is used here, but com.google.api.core.ObsoleteApi is not imported in this file. This will cause a compilation error. Please add import com.google.api.core.ObsoleteApi; to the imports section of this file.


@Override
@Deprecated
@ObsoleteApi("Scope management is handled internally")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The annotation @ObsoleteApi is used here, but com.google.api.core.ObsoleteApi is not imported in this file. This will cause a compilation error. Please add import com.google.api.core.ObsoleteApi; to the imports section of this file.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

1 participant