Class GcpMetadataConfig

java.lang.Object
io.opencensus.contrib.resource.util.GcpMetadataConfig

final class GcpMetadataConfig extends Object
Retrieves Google Cloud project-id and a limited set of instance attributes from Metadata server.
See Also:
  • Field Details

  • Constructor Details

    • GcpMetadataConfig

      private GcpMetadataConfig()
  • Method Details

    • isRunningOnGcp

      static boolean isRunningOnGcp()
    • getProjectId

      static String getProjectId()
    • getZone

      static String getZone()
    • getMachineType

      static String getMachineType()
    • getInstanceId

      static String getInstanceId()
    • getClusterName

      static String getClusterName()
    • getInstanceName

      static String getInstanceName()
    • getInstanceHostname

      static String getInstanceHostname()
    • getAttribute

      private static String getAttribute(String attributeName)