|
| 1 | +# Copyright 2020, OpenTelemetry Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
1 | 15 | import urllib
|
2 | 16 | from aiohttp import web
|
3 | 17 | from multidict import CIMultiDictProxy
|
4 | 18 | from timeit import default_timer
|
5 | 19 | from typing import Tuple, Dict, List, Union
|
6 | 20 |
|
7 | 21 | from opentelemetry import context, trace, metrics
|
| 22 | +from opentelemetry.context import _SUPPRESS_HTTP_INSTRUMENTATION_KEY |
8 | 23 | from opentelemetry.instrumentation.aiohttp_server.package import _instruments
|
9 | 24 | from opentelemetry.instrumentation.aiohttp_server.version import __version__
|
10 | 25 | from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
|
|
17 | 32 | from opentelemetry.util.http import get_excluded_urls
|
18 | 33 | from opentelemetry.util.http import remove_url_credentials
|
19 | 34 |
|
20 |
| - |
21 |
| -_SUPPRESS_HTTP_INSTRUMENTATION_KEY = "suppress_http_instrumentation" |
22 |
| - |
23 | 35 | _duration_attrs = [
|
24 | 36 | SpanAttributes.HTTP_METHOD,
|
25 | 37 | SpanAttributes.HTTP_HOST,
|
|
0 commit comments