Skip to content

Commit 21a9be8

Browse files
committed
Initial commit
1 parent 1a03f79 commit 21a9be8

File tree

6 files changed

+33
-18
lines changed

6 files changed

+33
-18
lines changed

exporter/opentelemetry-exporter-otlp-proto-http/tests/_common/__init__.py renamed to exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/utils/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# pylint: disable=protected-access
16-
1715

1816
class IterEntryPoint:
1917
def __init__(self, name, class_type):
2018
self.name = name
2119
self.class_type = class_type
2220

2321
def load(self):
24-
return self.class_type
22+
return self.class_type
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
15+
16+
from opentelemetry.exporter.otlp.proto.common._internal.utils import (
17+
IterEntryPoint,
18+
)
19+
20+
__all__ = ["IterEntryPoint"]

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
from opentelemetry.exporter.otlp.proto.common.trace_encoder import (
3434
encode_spans,
3535
)
36+
from opentelemetry.exporter.otlp.proto.common.utils import (
37+
IterEntryPoint,
38+
)
3639
from opentelemetry.exporter.otlp.proto.grpc.exporter import ( # noqa: F401
3740
InvalidCompressionValueException,
3841
OTLPExporterMixin,
@@ -61,15 +64,6 @@
6164
logger = getLogger(__name__)
6265

6366

64-
class IterEntryPoint:
65-
def __init__(self, name, class_type):
66-
self.name = name
67-
self.class_type = class_type
68-
69-
def load(self):
70-
return self.class_type
71-
72-
7367
# The below tests use this test SpanExporter and Spans, but are testing the
7468
# underlying behavior in the mixin. A MetricExporter or LogExporter could
7569
# just as easily be used.

exporter/opentelemetry-exporter-otlp-proto-http/tests/metrics/test_otlp_metrics_exporter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
from opentelemetry.exporter.otlp.proto.common.metrics_encoder import (
2626
encode_metrics,
2727
)
28+
from opentelemetry.exporter.otlp.proto.common.utils import (
29+
IterEntryPoint,
30+
)
2831
from opentelemetry.exporter.otlp.proto.http import Compression
2932
from opentelemetry.exporter.otlp.proto.http.metric_exporter import (
3033
DEFAULT_COMPRESSION,
@@ -78,8 +81,6 @@
7881
)
7982
from opentelemetry.test.metrictestutil import _generate_sum
8083

81-
from .._common import IterEntryPoint
82-
8384
OS_ENV_ENDPOINT = "os.env.base"
8485
OS_ENV_CERTIFICATE = "os/env/base.crt"
8586
OS_ENV_CLIENT_CERTIFICATE = "os/env/client-cert.pem"

exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
from requests.models import Response
2828

2929
from opentelemetry._logs import SeverityNumber
30+
from opentelemetry.exporter.otlp.proto.common.utils import (
31+
IterEntryPoint,
32+
)
3033
from opentelemetry.exporter.otlp.proto.http import Compression
3134
from opentelemetry.exporter.otlp.proto.http._log_exporter import (
3235
DEFAULT_COMPRESSION,
@@ -68,8 +71,6 @@
6871
set_span_in_context,
6972
)
7073

71-
from ._common import IterEntryPoint
72-
7374
ENV_ENDPOINT = "http://localhost.env:8080/"
7475
ENV_CERTIFICATE = "/etc/base.crt"
7576
ENV_CLIENT_CERTIFICATE = "/etc/client-cert.pem"

exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from requests import Session
2323
from requests.models import Response
2424

25+
from opentelemetry.exporter.otlp.proto.common.utils import (
26+
IterEntryPoint,
27+
)
2528
from opentelemetry.exporter.otlp.proto.http import Compression
2629
from opentelemetry.exporter.otlp.proto.http.trace_exporter import (
2730
DEFAULT_COMPRESSION,
@@ -51,8 +54,6 @@
5154
from opentelemetry.sdk.trace import _Span
5255
from opentelemetry.sdk.trace.export import SpanExportResult
5356

54-
from ._common import IterEntryPoint
55-
5657
OS_ENV_ENDPOINT = "os.env.base"
5758
OS_ENV_CERTIFICATE = "os/env/base.crt"
5859
OS_ENV_CLIENT_CERTIFICATE = "os/env/client-cert.pem"

0 commit comments

Comments
 (0)