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
now it works
  • Loading branch information
Kludex committed Jan 2, 2025
commit 9c8207a97f9a29e180066b07b5e4e964cda7a9ee
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def response_hook(span: Span, environ: WSGIEnvironment, status: str, response_he
import functools
import wsgiref.util as wsgiref_util
from timeit import default_timer
from typing import TYPE_CHECKING, Any, Callable, Iterable, TypeVar, cast
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, TypeVar, cast

from opentelemetry import context, trace
from opentelemetry.instrumentation._semconv import (
Expand Down Expand Up @@ -287,7 +287,7 @@ def response_hook(span: Span, environ: WSGIEnvironment, status: str, response_he
_CARRIER_KEY_PREFIX_LEN = len(_CARRIER_KEY_PREFIX)


class WSGIGetter(Getter[dict[str, Any]]):
class WSGIGetter(Getter[Dict[str, Any]]):
def get(self, carrier: dict[str, Any], key: str) -> list[str] | None:
"""Getter implementation to retrieve a HTTP header value from the
PEP3333-conforming WSGI environ
Expand Down
Loading