The cloud resource attributes detection is included and enabled by default for GCP and AWS. That's in line with our focus on a good on-boarding experience, things have to be enabled by default if we can.
For GCP and AWS, those are also included in the upstream otel agent, but disabled by default.
In addition to the default, we also execute the "time costly" ones asynchronously as an attempt to minimize the application startup overhead: those providers, in particular the EC2 one, have to call a metadata endpoint which can cause delays due to DNS or TLS handshake.
In addition to this, there are multiple ways to control which of those are enabled or not in updtream agent (sdk autoconfiguration):
through otel.java.{enabled,disabled}.resource.providers by using the FQN class name of the implementation
through the otel.resource.providers.{gcp,aws}.enabled=true to enable the ones that are included but disabled by default.
The problem here is that we have to re-implement the configuration to support the following use-cases that work out-of-the-box with the upstream agent:
enable or disable and individual resource provider using its FQN, this also applies to the resource providers that we enable by default
disable GCP or AWS explicitly in our agent (with upstream it's the default).
any combination of the above
Proposal
remove our custom and asynchronous way to deal with resource providers for now
just enable by default the providers for gcp or aws
provide a way to opt-out of those providers, for example by adding support for otel.resource.providers.{gcp,aws}.enabled=false in our agent
Description
The cloud resource attributes detection is included and enabled by default for GCP and AWS. That's in line with our focus on a good on-boarding experience, things have to be enabled by default if we can.
For GCP and AWS, those are also included in the upstream otel agent, but disabled by default.
In addition to the default, we also execute the "time costly" ones asynchronously as an attempt to minimize the application startup overhead: those providers, in particular the EC2 one, have to call a metadata endpoint which can cause delays due to DNS or TLS handshake.
In addition to this, there are multiple ways to control which of those are enabled or not in updtream agent (sdk autoconfiguration):
otel.java.{enabled,disabled}.resource.providers
by using the FQN class name of the implementationotel.resource.providers.{gcp,aws}.enabled=true
to enable the ones that are included but disabled by default.The problem here is that we have to re-implement the configuration to support the following use-cases that work out-of-the-box with the upstream agent:
Proposal
gcp
oraws
otel.resource.providers.{gcp,aws}.enabled=false
in our agentFurther improvements in the future
See if and how the results of the OpenTelemetry Entity Data Model allow to implement this in a better way by enabling to provide those attributes asynchronously: https://docs.google.com/document/d/1FdhTOvB1xhx7Ks7dFW6Ht1Vfw2myU6vyKtEfr_pqZPw/edit#heading=h.h8e21dbp9mv2