develop icon indicating copy to clipboard operation
develop copied to clipboard

Update Docs for Context Management for SDKs

Open smeubank opened this issue 5 months ago • 0 comments

Background:

Historically SDKs implemented the Hubs and Scopes models, a major defining aspect of the "Unified API". This introduced a lot of complexity in a user facing mananer, allowed more room for error from the user. In the past we have already said that the Unified API should not be followed dogmatically.

In a post hubs and scopes world, we would prefer SDKs do not have Hubs at all. Now since looking at adopting OpenTelemetry "packages", to replace or addition to, our existing Performance packages in SDKs, there is a forcing factor. Since OTel's SDKs all follow a slightly different model for context management, which does not follow ours and prevent that we can support OTel at all, we were forced to start on Node and Python to remove the hub so OTel could be introduced.

Within this work, there were breaking changes, which could not be avoided. However in other SDKs this should be avoided.

Statement of Facts

  1. hubs and scopes has been less than ideal and we'd like to move away from it
  2. OpenTelemetry is desired for performance on all SDKs
  3. We should try to avoid all breaking changes, and allow for backward's compatibility when possible

Requirements:

  • [ ] Shimming (backwards compatibility)
  • [ ] Isolation Scope
  • [ ] Copy-on-Write

Existing Dev Docs: Hubs and Scopes Refactoring

smeubank avatar Mar 06 '24 14:03 smeubank