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

Add tracing to DramatiqIntegration #3454

Open
ramonsaraiva opened this issue Aug 23, 2024 · 6 comments
Open

Add tracing to DramatiqIntegration #3454

ramonsaraiva opened this issue Aug 23, 2024 · 6 comments
Labels

Comments

@ramonsaraiva
Copy link

How do you use Sentry?

Self-hosted/on-premise

Version

2.13.0

Steps to Reproduce

  1. Follow the instructions on https://docs.sentry.io/platforms/python/integrations/dramatiq/ for using the DramatiqIntegration
  2. Enable tracing and profiling

Additional context:
I know #3397 was recently released and this is most likely happening because that integration is only capturing events from exceptions, but the documentation still states that it is just a matter of enabling tracing or profiling.

Would be amazing to have tasks instrumented automatically, but maybe a temporary warning in the dramatiq integration docs to make it explicit that it doesn't work without manual instrumentation.

Expected Result

Dramatiq actors tracing and profiling appear in performance and profiling sections of Sentry without manual instrumentation

Actual Result

Dramatiq actors tracing and profiling do not appear in performance and profiling sections of Sentry

@szokeasaurusrex szokeasaurusrex changed the title dramatiq integration with no tracing or profiling Add tracing to DramatiqIntegration Aug 26, 2024
@szokeasaurusrex
Copy link
Member

Hi @ramonsaraiva, it indeed appears that the DramatiqIntegration does not support tracing/profiling; the docs page is incorrect.

I opened a separate issue to make sure we update our docs page.

Additionally, I renamed this issue to "Add tracing to DramatiqIntegration" and will place it on our backlog. We are busy with larger projects at the moment, so it might take us some time to get around to adding tracing to the Dramatiq integration. If you (or anyone else from the community) would like, please feel free to contribute a PR to add this functionality. We are happy to help with reviews.

@wsantos
Copy link

wsantos commented Sep 3, 2024

separate issue

@szokeasaurusrex Is there a guideline or docs explaining how this could be implemented, I am happy to give it a shot.

@szokeasaurusrex
Copy link
Member

Hey @wsantos, the separate issue that you are referencing was the issue to update our docs to state that Dramatic does not support tracing, and I have already completed this.

Are you instead wondering about how to add tracing to Dramatiq, which would solve this issue? If so, we have some SDK Development Docs, but I don't think these cover how to write a tracing integration (perhaps this is something we can add). My recommendation is to take a look at the source code for other integrations which do have tracing and base your implementation on that. You can feel free to reach out to us if you get stuck anywhere

@antonpirker
Copy link
Member

I added a link to the relevant custom instrumentation docs in our dramatiq docs: getsentry/sentry-docs#11224

@wsantos
Copy link

wsantos commented Sep 5, 2024

Hey @wsantos, the separate issue that you are referencing was the issue to update our docs to state that Dramatic does not support tracing, and I have already completed this.

Are you instead wondering about how to add tracing to Dramatiq, which would solve this issue? If so, we have some SDK Development Docs, but I don't think these cover how to write a tracing integration (perhaps this is something we can add). My recommendation is to take a look at the source code for other integrations which do have tracing and base your implementation on that. You can feel free to reach out to us if you get stuck anywhere

Correct, I'd like to know how to add it, I'm going to try it if I can find some spare time.

@szokeasaurusrex
Copy link
Member

Correct, I'd like to know how to add it, I'm going to try it if I can find some spare time.

Okay, understood. As I mentioned previously, I don't think we have any docs specifically about how to develop tracing integrations. The custom instrumentation docs might be helpful though; these docs describe how to instrument your app with tracing manually. The page is more oriented towards application developers wishing to instrument something lacking a tracing-compatible integration in their app, but the same concepts will likely apply when creating the integration.

As for how to patch Dramatiq to gather the appropriate tracing information, I would take a look at the source code of our other integrations. Which parts of Dramatiq you patch is going to depend on how Dramatiq is written (since I am not familiar with Dramatiq, I unfortunately cannot help much here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

4 participants