Skip to content

Commit a9380ee

Browse files
committed
Add license header and deferred type hint evaluation in utils.py
1 parent c1c859d commit a9380ee

File tree

1 file changed

+16
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore

1 file changed

+16
-2
lines changed

instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/utils.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
from typing import Dict
1+
# Copyright The 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+
from __future__ import annotations
15+
216
from urllib.parse import urlparse
317

418
from opentelemetry.semconv._incubating.attributes import (
@@ -7,7 +21,7 @@
721
from opentelemetry.util.types import AttributeValue
822

923

10-
def get_server_attributes(endpoint_url: str) -> Dict[str, AttributeValue]:
24+
def get_server_attributes(endpoint_url: str) -> dict[str, AttributeValue]:
1125
"""Extract server.* attributes from AWS endpoint URL."""
1226
parsed = urlparse(endpoint_url)
1327
attributes = {}

0 commit comments

Comments
 (0)