diff --git a/src/iqm_client/iqm_client.py b/src/iqm_client/iqm_client.py index ac7c19c8b..59b86355d 100644 --- a/src/iqm_client/iqm_client.py +++ b/src/iqm_client/iqm_client.py @@ -611,6 +611,14 @@ def submit_circuits( if bearer_token: headers['Authorization'] = bearer_token + try: + # check if someone is trying to profile us with OpenTelemetry + from opentelemetry import propagate + propagate.inject(headers) + except Exception as ex: + # no OpenTelemetry, no problem + pass + result = requests.post( join(self._base_url, 'jobs'), json=data.dict(exclude_none=True), headers=headers, timeout=REQUESTS_TIMEOUT )