You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: opentelemetry-api/src/opentelemetry/util/re.py
+12-3Lines changed: 12 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,14 @@
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
-
importlogging
15
+
fromloggingimportgetLogger
16
16
fromreimportcompile, split
17
17
fromtypingimportDict, List, Mapping
18
18
fromurllib.parseimportunquote
19
19
20
-
_logger=logging.getLogger(__name__)
20
+
fromdeprecatedimportdeprecated
21
+
22
+
_logger=getLogger(__name__)
21
23
22
24
# The following regexes reference this spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#specifying-headers-via-environment-variables
23
25
@@ -40,6 +42,13 @@
40
42
41
43
42
44
# pylint: disable=invalid-name
45
+
46
+
47
+
@deprecated(version="1.15.0", reason="You should use parse_env_headers")
48
+
defparse_headers(s: str) ->Mapping[str, str]:
49
+
returnparse_env_headers(s)
50
+
51
+
43
52
defparse_env_headers(s: str) ->Mapping[str, str]:
44
53
"""
45
54
Parse ``s``, which is a ``str`` instance containing HTTP headers encoded
0 commit comments