Skip to content
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

David.goffredo/dummy span behavior #250

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dgoffredo
Copy link
Contributor

This is my fiddling with #249.

Flushing the tracer on destruction causes nginx's master process to send a trace within the time the integration test waits for a certain number of traces.

I still haven't figured out how to get the integration tests running on my new machine's Docker setup, so I'll use CI via this pull request instead.

DS-Serafin and others added 4 commits October 6, 2022 09:45
Rational: In short lived applications (e.g. Kubernetes Jobs) most
of the time all traces get lost becasue they are not synced. Users
need to call `Close` manually, but as all spans hold a shared_ptr
on the tracer it is hard to have the correct place to call it.
Calling it in the destructor assures all spans will be included in the
flush.
@DS-Serafin
Copy link

DS-Serafin commented Oct 19, 2022

@dgoffredo If I understand correctly this sems to be a bug in the integration tests?

Edit: Ahh found now the source of the problem in the opentracing_nginx integration. Not sure if I shoudl laugh or cry :D

@dgoffredo
Copy link
Contributor Author

dgoffredo commented Oct 20, 2022

What it comes down to is a matter of policy about whether we want ~Tracer to call Close. It has implications not only for these integration tests (which could be patched), but elsewhere also. A complicating factor is that weird "dummy" span that is used by nginx-opentracing to probe the names of the propagation headers.

I'll revisit this next week to present our options.

@DS-Serafin
Copy link

@dgoffredo ANy news

I understrand this changes behaviour. But only were it was undefined before. The dummy span could also before already be sent to agent. It was just very unlikely. Now the behaviour is defined and I think it is therefore an improvment. I think no new behaviour was introduced it was made only reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants