File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
aws-opentelemetry-distro/src/amazon/opentelemetry/distro Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 14
14
AwsMetricAttributesSpanExporterBuilder ,
15
15
)
16
16
from amazon .opentelemetry .distro .aws_span_metrics_processor_builder import AwsSpanMetricsProcessorBuilder
17
+ from amazon .opentelemetry .distro .ec2 import AwsEc2ResourceDetector
17
18
from amazon .opentelemetry .distro .sampler .aws_xray_remote_sampler import AwsXRayRemoteSampler
18
19
from opentelemetry .exporter .otlp .proto .grpc .metric_exporter import OTLPMetricExporter as OTLPGrpcOTLPMetricExporter
19
20
from opentelemetry .exporter .otlp .proto .http .metric_exporter import OTLPMetricExporter as OTLPHttpOTLPMetricExporter
34
35
OTEL_EXPORTER_OTLP_PROTOCOL ,
35
36
OTEL_TRACES_SAMPLER_ARG ,
36
37
)
37
- from opentelemetry . sdk . extension . aws . resource . ec2 import AwsEc2ResourceDetector
38
+
38
39
from opentelemetry .sdk .extension .aws .resource .ecs import AwsEcsResourceDetector
39
40
from opentelemetry .sdk .extension .aws .resource .eks import AwsEksResourceDetector
40
41
from opentelemetry .sdk .metrics import MeterProvider
@@ -102,7 +103,7 @@ def _initialize_components(auto_instrumentation_version):
102
103
try :
103
104
resource = get_aggregated_resources (
104
105
[
105
- # AwsEc2ResourceDetector(),
106
+ AwsEc2ResourceDetector (),
106
107
AwsEksResourceDetector (),
107
108
AwsEcsResourceDetector (),
108
109
]
Original file line number Diff line number Diff line change @@ -72,9 +72,11 @@ class AwsEc2ResourceDetector(ResourceDetector):
72
72
73
73
def detect (self ) -> "Resource" :
74
74
try :
75
+ print ("start ec2 init" )
75
76
token = _get_token ()
76
77
identity_dict = json .loads (_get_identity (token ))
77
78
hostname = _get_host (token )
79
+ print ("end ec2 init" )
78
80
79
81
return Resource (
80
82
{
You can’t perform that action at this time.
0 commit comments