-
Notifications
You must be signed in to change notification settings - Fork 456
Chore: migrate dramatiq to using core api #14544
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
base: main
Are you sure you want to change the base?
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 275 ± 6 ms. The average import time from base is: 279 ± 5 ms. The import time difference between this PR and base is: -3.9 ± 0.3 ms. Import time breakdownThe following import paths have shrunk:
|
Performance SLOsCandidate: dramatiq_core (c66f801) 🔵 No Baseline Data (24 suites)🔵 coreapiscenario - 12/12 (2 unstable)🔵 No baseline data available for this suite
|
@@ -58,19 +58,18 @@ def _traced_send_with_options_function(integration_config: Config) -> Callable[[ | |||
def _traced_send_with_options( | |||
func: Callable[[Any], Any], instance: dramatiq.Actor, args: Tuple[Any], kwargs: Dict[Any, Any] | |||
) -> Callable[[Any], Any]: | |||
with tracer.trace( | |||
with core.context_with_data( | |||
"dramatiq.Actor.send_with_options", |
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.
You need to register this event. All context_with_data does is create an executioncontext object. Caling the executioncontext in the with
block then dispatches a context.started.dramatiq.Actor.send_with_options. event which is not registered.
Instead of registering a new event for dramatic can we reuse an existing one. Maybe rename rq.queue.enqueue_job to task.produce
and use this event identifier in both rq
and dramatic
.
Migrating dramatiq to core api.
Checklist
Reviewer Checklist