there is no need to ever sentry_sdk.start_transaction because the flask integration does that
This commit is contained in:
parent
e460325e60
commit
c669aeff27
|
@ -425,21 +425,10 @@ def task_submit(
|
||||||
terminate_loop: bool = False,
|
terminate_loop: bool = False,
|
||||||
) -> flask.wrappers.Response:
|
) -> flask.wrappers.Response:
|
||||||
"""Task_submit_user_data."""
|
"""Task_submit_user_data."""
|
||||||
sentry_op = "controller_action"
|
with sentry_sdk.start_span(
|
||||||
sentry_transaction_name = "tasks_controller.task_submit"
|
op="controller_action", description="tasks_controller.task_submit"
|
||||||
transaction = sentry_sdk.Hub.current.scope.transaction
|
):
|
||||||
if transaction is None:
|
return task_submit_shared(process_instance_id, task_id, body, terminate_loop)
|
||||||
current_app.logger.info("transaction was None. pretty sure this never happens.")
|
|
||||||
with sentry_sdk.start_transaction(op=sentry_op, name=sentry_transaction_name):
|
|
||||||
return task_submit_shared(
|
|
||||||
process_instance_id, task_id, body, terminate_loop
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
current_app.logger.info("transaction existed.")
|
|
||||||
with transaction.start_child(op=sentry_op, description=sentry_transaction_name):
|
|
||||||
return task_submit_shared(
|
|
||||||
process_instance_id, task_id, body, terminate_loop
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def _get_tasks(
|
def _get_tasks(
|
||||||
|
|
|
@ -47,7 +47,7 @@ class ServiceTaskDelegate:
|
||||||
def call_connector(name: str, bpmn_params: Any, task_data: Any) -> str:
|
def call_connector(name: str, bpmn_params: Any, task_data: Any) -> str:
|
||||||
"""Calls a connector via the configured proxy."""
|
"""Calls a connector via the configured proxy."""
|
||||||
call_url = f"{connector_proxy_url()}/v1/do/{name}"
|
call_url = f"{connector_proxy_url()}/v1/do/{name}"
|
||||||
with sentry_sdk.start_transaction(op="call-connector", name=call_url):
|
with sentry_sdk.start_span(op="call-connector", description=call_url):
|
||||||
params = {
|
params = {
|
||||||
k: ServiceTaskDelegate.check_prefixes(v["value"])
|
k: ServiceTaskDelegate.check_prefixes(v["value"])
|
||||||
for k, v in bpmn_params.items()
|
for k, v in bpmn_params.items()
|
||||||
|
|
Loading…
Reference in New Issue