get some more insight into connector proxy timings
This commit is contained in:
parent
48781039c7
commit
e460325e60
|
@ -3,6 +3,7 @@ import json
|
|||
from typing import Any
|
||||
|
||||
import requests
|
||||
import sentry_sdk
|
||||
from flask import current_app
|
||||
from flask import g
|
||||
|
||||
|
@ -45,15 +46,15 @@ class ServiceTaskDelegate:
|
|||
@staticmethod
|
||||
def call_connector(name: str, bpmn_params: Any, task_data: Any) -> str:
|
||||
"""Calls a connector via the configured proxy."""
|
||||
call_url = f"{connector_proxy_url()}/v1/do/{name}"
|
||||
with sentry_sdk.start_transaction(op="call-connector", name=call_url):
|
||||
params = {
|
||||
k: ServiceTaskDelegate.check_prefixes(v["value"])
|
||||
for k, v in bpmn_params.items()
|
||||
}
|
||||
params["spiff__task_data"] = task_data
|
||||
|
||||
proxied_response = requests.post(
|
||||
f"{connector_proxy_url()}/v1/do/{name}", json=params
|
||||
)
|
||||
proxied_response = requests.post(call_url, json=params)
|
||||
|
||||
parsed_response = json.loads(proxied_response.text)
|
||||
|
||||
|
|
Loading…
Reference in New Issue