Coder Social home page Coder Social logo

Comments (7)

santiagovillegasg avatar santiagovillegasg commented on June 1, 2024

Fixed using "jukylin/jaeger-php": "2.0.9-beta"

from jaeger-php.

cawolf avatar cawolf commented on June 1, 2024

I would consider this a bug in regards to the opentracing specification. The specification clearly states:

So I would suggest 2 things:

  • @svillega : instead of downgrading, you should handle null results of extract() according to the specification and not pass it unchecked into startSpan(), as this should throw an exception
  • @jukylin : we should alter this library to correctly throw the correct exception when null is passed

What do you think?

Best regards,
@cawolf

from jaeger-php.

jukylin avatar jukylin commented on June 1, 2024

I think is not friendly if engineer handle null results of extract().
So I want to check the result in startSpan() when null is passed.

if(array_search(null, $options) == "child_of"){
        $options = [];
};

you are right @cawolf , startSpan() can throw a InvalidSpanOption but not because the null

from jaeger-php.

cawolf avatar cawolf commented on June 1, 2024

Well actually, your library currently behaves like the opentracing specification is describing it, because you are utilizing StartSpanOptions::create(), from which the exception originally came from. I was wrong reopening this issue, but @svillega should still catch and handle the exception (which is declared in the opentracing interfaces) or explicitely check on null to avoid the error.

So no todo in your library, but this is a user error.

from jaeger-php.

jukylin avatar jukylin commented on June 1, 2024

@svillega Reference startActiveSpan

from jaeger-php.

santiagovillegasg avatar santiagovillegasg commented on June 1, 2024

@jukylin can you explain to me what's the difference between startSpan and startActiveSpan?
Thanks

from jaeger-php.

jukylin avatar jukylin commented on June 1, 2024

You can look here startSpan and startActiveSpan

from jaeger-php.

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.