Python ASGI 모니터링
Instana ( Python ) 패키지는 비동기 애플리케이션에 대한 요청 가시성을 제공하는 ASGI(Asynchronous Server Gateway Interface) 호환 미들웨어를 포함하고 있습니다.
ASGI에 대한 자세한 내용은 ASGI 설명서를 참조하십시오.
미들웨어
Instana ASGI 미들웨어는 에서 이용할 수 instana.middleware.InstanaASGIMiddleware 있으며, ASGI 규격을 준수하는 모든 애플리케이션과 함께 사용할 수 있습니다.
instana/python-sensor 저장소의 GitHub 에서 Instana ASGI 미들웨어를 구현한 오픈소스 코드를 확인해 보세요.
예
import uvicorn
from instana.middleware import InstanaASGIMiddleware
# ...application definition code...
# Wrap the ASGI application with the Instana ASGI middleware
application = InstanaASGIMiddleware(application)
uvicorn.run(application, host='127.0.0.1', port=80)