Skip to content

Deprecate MetricProducer.opencensus#655

Merged
codeboten merged 5 commits into
open-telemetry:mainfrom
Krishnachaitanyakc:deprecate-opencensus-metric-producer
Jun 16, 2026
Merged

Deprecate MetricProducer.opencensus#655
codeboten merged 5 commits into
open-telemetry:mainfrom
Krishnachaitanyakc:deprecate-opencensus-metric-producer

Conversation

@Krishnachaitanyakc

Copy link
Copy Markdown
Contributor

Follow-up to spec PR #5138 (merged 2026-06-12), which deprecated OpenCensus compatibility requirements in the specification (removal no earlier than June 2027).

What this PR does

  1. Adds deprecated: true (JSON Schema 2020-12 annotation) to $defs.MetricProducer.properties.opencensus and $defs.OpenCensusMetricProducer in schema/meter_provider.yaml.
  2. Adds a **Deprecated** banner to the description text of each entry — this is what surfaces the deprecation in schema-docs.md's ## MetricProducer property table, since the markdown generator does not render deprecated: separately.
  3. Regenerates opentelemetry_configuration.json and schema-docs.md via make all.
  4. Adds a ## Unreleased CHANGELOG entry.

Non-breaking per VERSIONING.md L65: "Adding, removing, or modifying deprecated annotation" is explicitly allowed in minor versions.

Out of scope

  • Not removing any entry. SDKs may continue honoring existing user configs.
  • Not deprecating MetricProducer (the type) — it continues hosting future producers (see Support prometheus metric producer #576 for prometheus).
  • Not changing per-language status values — the status enum has no deprecated value.

Downstream

opentelemetry-js#6712 (merged 2026-06-04) just wired up OpenCensusMetricProducer in @opentelemetry/sdk-node; it already emits diag.warn for unknown producer keys, so this is runtime-safe. @trentm's comment anticipates this follow-up.

cc @jack-berg, @codeboten, @marcalff, @MikeGoldsmith, @maryliag, @dashpole.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 12, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Krishnachaitanyakc / name: Krishna Chaitanya KC (2a3812b, a67eec0)

@Krishnachaitanyakc
Krishnachaitanyakc force-pushed the deprecate-opencensus-metric-producer branch from 298dcf9 to a67eec0 Compare June 12, 2026 19:13
@Krishnachaitanyakc
Krishnachaitanyakc marked this pull request as ready for review June 12, 2026 19:17
@Krishnachaitanyakc
Krishnachaitanyakc requested a review from a team as a code owner June 12, 2026 19:17

@marcalff marcalff 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.

Thanks for the pr.

Looks ok to deprecate, the main concern here is the wording:

This entry will be removed no earlier than June 2027

comes from the spec, and refers to the specification itself: the OpenCensus specification will be removed after June 2027, but this does not mean every SIG SDK will drop OpenCensus by then.

The yaml node is likely to stay for SDK that still wants to support OpenCensus, even after June 2027.

Beside, removing a yaml node is a breaking change for the file format, so it is likely to stay for a really long time, with SDK accepting the syntax but raising an error at runtime.

When I read "This entry will be removed no earlier than June 2027", it gives me the impression the yaml node will be removed after June 2027, which is probably not what we want.

@open-telemetry/configuration-maintainers WDYT ?

@Krishnachaitanyakc

Copy link
Copy Markdown
Contributor Author

Thanks @marcalff, fair point. Dropped the 2027 removal part and kept "deprecated, SDKs MAY continue, new configs SHOULD NOT use".

@marcalff marcalff 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.

LGTM, thanks for the fix.

@codeboten codeboten 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.

👍🏻

@codeboten
codeboten merged commit 300fd2e into open-telemetry:main Jun 16, 2026
12 checks passed
@jack-berg

Copy link
Copy Markdown
Member

FYI, this is the first time we've deprecated something. The way it has been done establishes a precedent. Is everyone ok with this being the way we deprecate things going forward?

@codeboten

Copy link
Copy Markdown
Contributor

@jack-berg i think this approach makes sense, with the intent on keeping any deprecated fields in the schema until a major revision

@jack-berg

Copy link
Copy Markdown
Member

See followup in #659

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.

7 participants