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

Disable automatic tracing for command #83

Open
ptondereau opened this issue Jan 20, 2022 · 5 comments
Open

Disable automatic tracing for command #83

ptondereau opened this issue Jan 20, 2022 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ptondereau
Copy link

I have a use case when my Symfony command are some kinds of worker.
In this context, I want to avoid waiting for my command to finish and only trace the part I want to.
WDYT?

@cawolf
Copy link
Member

cawolf commented Jan 31, 2022

Hi @ptondereau ,
we also have this use case and kind of worked around it by just ignoring the wrapping command traces and just ensuring, that the "inner" spans (which are linked to other parent traces from different services) are flushed to the tracer. We are using the internal Auxmoney\OpentracingBundle\Internal\Opentracing interface to get access to the OpenTracing\Tracer instance and flush after each span manually.

However, we can imagine having this as a "regular" feature, maybe by decorating a long running command with a marker interface and querying for this interface in the appropriate event subscribers.

Currently, we are focusing primarily on upgrading the bundle, and are looking for help with implementing new features. Would you yourself like to take a shot? If not, any help is welcome. :)

@cawolf cawolf added enhancement New feature or request help wanted Extra attention is needed labels Jan 31, 2022
@ujwaldhakal
Copy link
Contributor

ujwaldhakal commented Aug 5, 2022

are these handle by this File ?
For me I had to listen to these events manually & finish the active span from my Symfony code

@cawolf
Copy link
Member

cawolf commented Sep 6, 2022

Yes, @ujwaldhakal , this subscriber opens the root span for each Command. The FinishCommandSpanSubscriber is its counterpart.

@pronata
Copy link

pronata commented Jun 13, 2024

Hi @cawolf

What if add in subscribers some filter function by command name not to begin trace automatically?

@pronata
Copy link

pronata commented Nov 11, 2024

I found the solution through decorators (decorating StartCommandSpanSubscriber and FinishCommandSpanSubscriber by adding exclusions there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants