New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add system tests for span links #1811
Conversation
|
I think something went wrong with utils/parametric/protos/apm_test_client_pb2.py that there are so many lines removed, but maybe I just don't know the proper incantation to regenerate. |
f7975e9
to
6a0a609
Compare
|
Looks like things are still passing - the only failure is an unrelated nodejs failure. |
37d486e
to
db5b37e
Compare
@Kyle-Verhoog, do you have few minutes to help us on that ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About protocol, do we really want to add span links API to the default API? Can we move them to the OTel API message instead? Because they do are expected to work and are missing and I thought the core/internal API was not ready to use (span kind, etc...).
https://github.com/DataDog/system-tests/blob/main/utils/parametric/generate_protos.sh should be the script to do it but I think this is broken due to it being moved from the To regenerate it should be: run from the |
|
@Kyle-Verhoog This doesn't help - it has the same output for me. |
fb54877
to
65bb289
Compare
| assert span_has_no_parent(span) | ||
| assert span["meta"].get(ORIGIN) is None | ||
| assert span["meta"].get("_dd.p.dm") == "-4" | ||
| assert span["metrics"].get(SAMPLING_PRIORITY_KEY) == 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last bit of behavior that I think needs to be added to these test cases is the following:
- Root span (
"root") is started with some Datadog information likesampling_priority=2 - A new span (
"processor") is started from distributed tracing headers (e.g.sampling_priority=-1) but we should be adding a span link instead of becoming a child of the distributed trace
Result: ??? Should the sampling_priority and other information be inherited from the root span or from the incoming distributed tracing headers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on the integration what makes sense. Either behaviour might be fine - mostly it's going to be inherited from distributed tracing headers, but this is an integration specific choice, and as such not system-test-able.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, makes sense to me!
7fe752c
to
07a5045
Compare
|
@bwoebi Any thoughts about my comment? The default API to control the Java tracer in parametric tests is using OpenTracing. |
|
@PerfectSlayer Missed that comment. I'm not sure what constraints Java has here. With the PHP implementation of OpenTelemetry and OpenTracing, you could use both APIs together in the same script. PHP does not plan to add span links to OpenTracing either - the Span Links API the server.php in PR implements is the native API (exposed from C to PHP) - so that we can verify that the exposed primitives work flawlessly. |
Same in Java. The main set of message is linked to OpenTracing API, while the OTel set of messages is linked to the OTel API.
The only API (internal or public DD API) of the Java tracer used in the Java parametric client is the flush method. If you create span using OpenTracing, you will end up with an OpenTracing span (and only the OpenTracing primitives) for which we don't / won't support span links. So I can't retrieve the internal span from the tracer and edit it to add a link to it. It is similar with OTel, but as OTel span links will be supported, I could then add a span links using the OTel primitives. So why don't use the OTel set rather than the default (OpenTracing)? Or at least, why not test them both so at least Java can cover one? |
Description
Add span link tests, covering use cases as outlined in the RFC.
Reviewer checklist
run-parametric-scenario,run-profiling-scenario...). If this PR modifies any system-tests internal, then add therun-all-scenarioslabel (more info).build-some-imagelabel is present