Giter Site home page Giter Site logo

Comments (3)

pichlermarc avatar pichlermarc commented on July 28, 2024

A workaround for this is to not consume the /experimental namespace in our SDK packages. We would simply redeclare any types. Given the above example, we would have to declare an ExperimentalContextManager type in the AsyncHooksContextManager package and rely on typescript to recognize the compatible types.

@dyladan and I talked about this offline yesterday:

We have to re-declare types from the API in the consuming packages anyway if the API is used as a peer dependency like >=1.0.0 <1.9.0. As users can use the package with an older version of the API, it might happen that they don't contain the types API types we're using which breaks users (see #4260).

To implement something like this we can go a similar way as proposed by #4622.

from opentelemetry-js.

pichlermarc avatar pichlermarc commented on July 28, 2024

Overriding Methods

This requires the addition of a new experimental version of any API that needs experimental functionality. As an example, if we were going to experimentally change the behavior of the startSpan API, we would need to add a new method like experimentalStartSpan or similar because we can't override the existing API.

I think this may also be solvable by the same wrap()-approach. If wrap() is used we use the new behavior on the returned object in place of the old one.

Would you mind providing an example on which change would result in us having to change the API in such a way?

from opentelemetry-js.

github-actions avatar github-actions commented on July 28, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

from opentelemetry-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.