Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Consider renaming Link#context -> Link#spanContext #91

Closed
aabmass opened this issue Jun 8, 2021 · 7 comments
Closed

Consider renaming Link#context -> Link#spanContext #91

aabmass opened this issue Jun 8, 2021 · 7 comments

Comments

@aabmass
Copy link
Member

aabmass commented Jun 8, 2021

Span#context was renamed in #45. For consistency, it would be nice if link did the same.

context: SpanContext;

This is a minor ask – if we don't want to create more API churn this can be closed 🙂

@dyladan
Copy link
Member

dyladan commented Jun 9, 2021

This will not make it into the 1.0 release. We can add it after 1.0 as a minor addition and mark the previous property as deprecated.

@Flarna
Copy link
Member

Flarna commented Jun 9, 2021

Is there already a deprecation workflow defined?
For example node.js has 3 types of deprecations where doc deprecated is the only one which is not semver major.

@dyladan
Copy link
Member

dyladan commented Jun 9, 2021

The spec versioning doc has only made affordances for deprecating whole signals, not individual API methods and properties.

I will open a PR with an official deprecation strategy along these lines:

  1. Add @deprecated tsdoc flag with a note pointing to the new function or some upgrade strategy if applicable.
  2. In the next major release, all previously @deprecated functions are removed. This will likely be much later.

@Flarna
Copy link
Member

Flarna commented Jun 9, 2021

2\. In the next major release, all previously `@deprecated` functions are removed. This will likely be much later.

Maybe we should add also a minimum timeframe for removing, or use a whole major cycle. This may be terrible long as there is no release plan for next majors as far as I know.
Currently a new major seems to be in the far future. But with this proposal it would be allowed to add an @deprecated label a few days before a new major is created where the API is then gone.

@dyladan
Copy link
Member

dyladan commented Jun 9, 2021

Good suggestion. I think at least a whole major cycle is likely to be extremely long. How about next major release unless the release happens within 6 months of deprecation, else the removal must wait for the next major release after that.

@dyladan
Copy link
Member

dyladan commented Jun 9, 2021

I would also say introducing a @deprecated flag is a semver-minor change, not patch, and it must come along with a documented alternative solution.

@dyladan
Copy link
Member

dyladan commented Oct 10, 2022

This rename is a breaking change and I don't see a strong benefit to deprecate the old name. If someone thinks this is causing unnecessary confusion they can open an issue in https://github.com/open-telemetry/opentelemetry-js as this package is moving there.

@dyladan dyladan closed this as completed Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants