Comments (7)
Fixed using "jukylin/jaeger-php": "2.0.9-beta"
from jaeger-php.
I would consider this a bug in regards to the opentracing specification. The specification clearly states:
extract()
may return nullstartSpan()
may throw aInvalidSpanOption
(which has a named constructor for invalid references, such as null)
So I would suggest 2 things:
- @svillega : instead of downgrading, you should handle
null
results ofextract()
according to the specification and not pass it unchecked intostartSpan()
, 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.
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.
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.
@svillega Reference startActiveSpan
from jaeger-php.
@jukylin can you explain to me what's the difference between startSpan and startActiveSpan?
Thanks
from jaeger-php.
You can look here startSpan and startActiveSpan
from jaeger-php.
Related Issues (20)
- Use static analysis tools
- 报错超时
- Make library compatible with php 8
- Auto telemetry on php 5.6
- How to use elasticsearch store,instead of TMemoryBuffer ?
- Make s span child of in another service
- uber-trace-id 能不能换个常量? HOT 1
- 两个微服务trace-id怎么不同?
- 两个微服务trace-id怎么不同? HOT 3
- Istio example数据异常 HOT 6
- 接入jaeger-php出现性能损耗 HOT 3
- start_time of StartSpanOptions is ignored HOT 1
- Problem with generateId on macOS PHP 7.0, 7.1 HOT 3
- next release? HOT 3
- Invalid child_of option. Expected Span or SpanContext, got NULL HOT 2
- "minimum-stability": "dev" => to stable HOT 11
- Unsupported content type: application/hprose
- Upgrade to opentracing 1.0.0 HOT 5
- Create span from JSON context rather then HTTP context HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jaeger-php.