Skip to content

Deprecate OpenCensus shim public API - #8674

Open
LarryHu0217 wants to merge 2 commits into
open-telemetry:mainfrom
LarryHu0217:codex/deprecate-opencensus-shim-8673
Open

Deprecate OpenCensus shim public API#8674
LarryHu0217 wants to merge 2 commits into
open-telemetry:mainfrom
LarryHu0217:codex/deprecate-opencensus-shim-8673

Conversation

@LarryHu0217

Copy link
Copy Markdown

Summary

  • deprecate the OpenCensus shim public entry points in line with the specification
  • add module and package guidance directing users toward OpenTelemetry APIs
  • suppress deprecation warnings only in tests that exercise the legacy shim API

This does not change runtime behavior or define the post-deprecation maintenance policy discussed in the issue.

Fixes #8673

Testing

  • ./gradlew :opencensus-shim:spotlessApply :opencensus-shim:check
  • ./gradlew :opencensus-shim:build

@LarryHu0217
LarryHu0217 requested a review from a team as a code owner July 31, 2026 15:41
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.48%. Comparing base (bc956bc) to head (dc333b8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8674      +/-   ##
============================================
+ Coverage     91.47%   91.48%   +0.01%     
- Complexity    10465    10467       +2     
============================================
  Files          1021     1021              
  Lines         27694    27694              
  Branches       3247     3247              
============================================
+ Hits          25333    25337       +4     
+ Misses         1617     1615       -2     
+ Partials        744      742       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LarryHu0217

Copy link
Copy Markdown
Author

The Windows Java 17 job failed during Gradle configuration because Maven Central returned HTTP 429 while resolving Kotlin 2.3.21, before project compilation started. All other OS/JDK builds, both GraalVM builds, CodeQL, API checks, coverage, links, and EasyCLA passed. I do not have permission to rerun the upstream workflow; could a maintainer rerun the failed jobs when convenient?

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 31, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-07-31 22:27 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Couple of small comments. Thanks!

* <p>To use, register with {@link SdkMeterProviderBuilder#registerMetricProducer(MetricProducer)}.
*
* @deprecated OpenCensus compatibility is deprecated in the OpenTelemetry specification. This shim
* is deprecated accordingly. Migrate OpenCensus instrumentation to the OpenTelemetry APIs.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For the deprecation messages, can you follow the pattern used in the deprecated ZipkinExporter? I.e. link to the spec PR where opencensus was deprecated and indicate that we stop publishing the artifact after June 2027. Use this updated message consistently in all places.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in dc333b8. All six deprecation notices now follow the linked specification pattern, reference open-telemetry/opentelemetry-specification#5138, and state that the artifact will no longer be published after June 2027. The targeted shim check and Javadoc task pass locally.

@LarryHu0217

Copy link
Copy Markdown
Author

/dashboard route:reviewers

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

@LarryHu0217 routed this pull request to reviewers.

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.

Deprecate opencensus shim

2 participants