Giter Site home page Giter Site logo

Comments (4)

david-luna avatar david-luna commented on July 28, 2024 1

Here is my opinion. If we already have a public API to access the field I think we should leverage that for accessing even in subclasses. Also I'm not sure about the significance the perf gain of having direct access to the config which is the most appealing pro of option 1.

from opentelemetry-js.

pichlermarc avatar pichlermarc commented on July 28, 2024 1

Here is my opinion. If we already have a public API to access the field I think we should leverage that for accessing even in subclasses. Also I'm not sure about the significance the perf gain of having direct access to the config which is the most appealing pro of option 1.

I agree. IMO we should go with getConfig() and make _config private.

from opentelemetry-js.

blumamir avatar blumamir commented on July 28, 2024

Pros options 1:

  • shorter to write
  • bit more performant (I think)

Pros options 2:

  • will work correctly for advanced cases if the function is overridden
  • can make _config private to decrease API surface.
  • aligns will with tracer, meter and logger class properties, which are private and are only accessed via a getter.

from opentelemetry-js.

blumamir avatar blumamir commented on July 28, 2024

Implemented in open-telemetry/opentelemetry-js-contrib#2289
Would appreciate any review on this PR 🙏

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.