Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PEP 561 to opentelemetry-instrumentation-wsgi #3129

Merged
merged 10 commits into from
Jan 13, 2025
Prev Previous commit
Next Next commit
remove type alias, but add string
  • Loading branch information
Kludex committed Jan 2, 2025
commit 38bda8204331c61853d91357500eb798b00a6b1c
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,14 @@ def response_hook(span: Span, environ: WSGIEnvironment, status: str, response_he
)

if TYPE_CHECKING:
from typing import TypeAlias
from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment


T = TypeVar("T")
RequestHook = Callable[[trace.Span, "WSGIEnvironment"], None]
ResponseHook: TypeAlias = (
"Callable[[trace.Span, WSGIEnvironment, str, list[tuple[str, str]]], None]"
)
ResponseHook = Callable[
[trace.Span, "WSGIEnvironment", str, "list[tuple[str, str]]"], None
]

_HTTP_VERSION_PREFIX = "HTTP/"
_CARRIER_KEY_PREFIX = "HTTP_"
Expand Down
Loading