Python 支援的元件及版本

Instana AutoTrace Webhook

Instana AutoTrace Webhook 可以在整個 Kubernetes 叢集中自動檢測 Python 程序。

Python 執行時期

Python 版本 Python 感應器版本
CPython >= 3.7 and < 3.10 >= 2.0.0
CPython >= 2.7 and <= 3.6 < 2.0.0

長期支援

Instana 遵循官方 Python 中的長期支援 (LTS) 和壽命結束 (EOL) 時間表

附註: 當 Python 版本達到其 EOL 日期時,會提供額外的支援期間,範圍從 1 年到 2 年。 定期更新 Python 版本以避免問題。

支援的環境

Instana Python 套件支援各種環境,例如:

平台

  • Linux
  • OSX
  • AWS Fargate
  • AWS Lambda
  • Kubernetes
  • Google Cloud
  • Microsoft Azure
  • IBM Bluemix
  • 數位海洋
  • Docker

追蹤

Instana Python 感應器支援其他 Instana 檢測平台、技術及語言之間的分散式追蹤。 它提供所有要求的自動追蹤,並支援 OpenTracing。 如需相關資訊,請參閱 OpenTracing

架構 版本 Python 感應器版本
ASGI >= 2.0 任何
Celery >= 4.3.0 and <= 5.3.1 任何
Django >= 1.11 and <= 4.2.3 任何
FastAPI >= 0.51.0 and <= 0.100.0 任何
Flask >= 0.12.0 and <= 2.3.2 任何
金字塔圖 >= 1.6.5 and <= 2.0.1 任何
沙尼奇 >= 19.0.0 and < 21.9.0 >= 2.0.0
Starlette >= 0.12.13 and <= 0.27.0 任何
龍捲風 >= 4.5.3 and < 6.0.0 < 2.0.0
Webapp2 >= 1.5 and < 3.0 < 2.0.0
WSGI PEP 333> = 1.0 任何
用戶端 版本 Python 感應器版本
艾奧 http >= 3.1.0 and <= 3.8.5 任何
Asynqp >= 0.5.1 and <= 0.6 < 2.0.0
Boto3 >= 1.15.0 and <= 1.28.11 任何
Couchbase >= 2.3.5 任何
Google-cloud-pubsub (*) <= 2.1.0 任何
Google-cloud-storage >= 1.24.0 and <= 2.10.0 任何
格爾普西奧 >= 1.14.1 and <= 1.56.2 任何
Mysqlclient >= 1.3.14 and <= 2.2.0 任何
皮卡 >= 1.0.0 and <= 1.3.2 任何
PyMySQL >= 0.6.7 and <= 1.1.0 任何
皮蒙戈 >= 3.7.0 and <= 4.4.1 任何
Psycopg2 >= 2.7.2 and <= 2.9.6 任何
Redis >= 2.10.6 and <= 4.6.0 任何
要求 >= 2.16.1 and <= 2.31.0 任何
SQLAlchemy >= 1.1.5 and <= 2.0.19 任何
Urllib3 >= 1.18.1 and <= 1.26.16 任何

(*): Instana Python 套件僅支援 Google Pub/Sub 的取回訊息遞送。

記載 版本
記載 >= 0.4.9.x
其他檔案庫 版本
Gevent >= 1.4 and <= 23.7.0

追蹤附註和限制

執行緒啟動許可權

Instana Python 追蹤程式需要許可權,才能建立及啟動 Python threading.Timer 物件。 在大部分系統上,依預設會授與此許可權。 在部分巢狀儲存器化實務範例中,例如在 Docker儲存器版本中的部分 "Docker 中,依預設不會授與許可權。

如果您看到類似 RuntimeError: can't start new thread的異常狀況,則最可能的原因是權限不足。 如果您升級或變更 Docker中的 "Docker " 儲存器,但未授與內部應用程式儲存器所需的許可權,則可以使用 --privileged 許可權作為啟動應用程式儲存器的最後手段。

跨執行緒界限追蹤

Instana Python 套件不支援跨執行緒界限追蹤。 例如,當首先在單一執行緒上處理要求,然後在 multiprocessing.ThreadPool的協助下將工作量配送至多個其他執行緒時,不會擷取那些其他執行緒中發生的送出呼叫。 因為每個結束跨距都需要有進入跨距,且起始進入跨距超出執行緒範圍,所以不會記錄此類送出呼叫。 這是由預設 OpenTracing ThreadLocalScopeManager的固有性質以及缺少 ThreadPool 特定範圍管理程式所造成。

使用多個追蹤程式追蹤

不支援使用 Instana 及協力廠商追蹤程式 (例如,同時使用 New Relic 追蹤程式或 OpenTelemetry ) 來追蹤單一 Python 應用程式。

支援的 Web 伺服器

  • uWSGI
  • mod_wsgi
  • Nginx WSGI
  • 烏維功

附註: Instana Python 套件未正式支援 gunicorn Web 伺服器。

感應器資料收集

追蹤配置

  • 名稱
  • 執行時期
  • PID
  • 載入的模組

度量值

  • GC 活動
  • 記憶體用量
  • 執行緒
  • 分頁
  • I/O
  • 事件
  • 環境定義切換

AutoProfile

設定檔 Python 版本 平台
CPU 使用率 > = 2.7 及> = 3.4 Linux 和 macOS
記憶體配置率 >= 3.4 Linux 和 macOS
封鎖呼叫 > = 2.7 及> = 3.4 Linux 和 macOS

另請參閱