Skip to content

Commit dbc8f3e

Browse files
authored
Remove some workarounds for py3.6 which is are no longer needed (#213)
1 parent e4767be commit dbc8f3e

File tree

3 files changed

+4
-36
lines changed
  • opentelemetry-exporter-gcp-monitoring/src/opentelemetry/exporter/cloud_monitoring
  • opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace

3 files changed

+4
-36
lines changed

opentelemetry-exporter-gcp-monitoring/src/opentelemetry/exporter/cloud_monitoring/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import logging
1616
import random
1717
from dataclasses import replace
18+
from time import time_ns
1819
from typing import Dict, List, NoReturn, Optional, Set, Union
1920

2021
import google.auth
@@ -35,7 +36,6 @@
3536

3637
# pylint: disable=no-name-in-module
3738
from google.protobuf.timestamp_pb2 import Timestamp
38-
from opentelemetry.exporter.cloud_monitoring._time import time_ns
3939
from opentelemetry.sdk.metrics.export import (
4040
Gauge,
4141
Histogram,

opentelemetry-exporter-gcp-monitoring/src/opentelemetry/exporter/cloud_monitoring/_time.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

opentelemetry-exporter-gcp-trace/src/opentelemetry/exporter/cloud_trace/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,9 @@ def _extract_attributes(
471471
add_agent_attr: bool = False,
472472
) -> trace_types.Span.Attributes:
473473
"""Convert span.attributes to dict."""
474-
attributes_dict = BoundedDict(
475-
num_attrs_limit
476-
) # type: BoundedDict[str, trace_types.AttributeValue]
474+
attributes_dict: BoundedDict[
475+
str, trace_types.AttributeValue
476+
] = BoundedDict(num_attrs_limit)
477477
invalid_value_dropped_count = 0
478478
for ot_key, ot_value in attrs.items() if attrs else []:
479479
key = _truncate_str(ot_key, MAX_ATTR_KEY_BYTES)[0]

0 commit comments

Comments
 (0)