Skip to content

Commit

Permalink
Update docs for GCP detector (open-telemetry#17864)
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Jan 19, 2023
1 parent 2285662 commit 9e52e97
Showing 1 changed file with 53 additions and 24 deletions.
77 changes: 53 additions & 24 deletions processor/resourcedetectionprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,46 +103,75 @@ processors:
override: false
```

### GCE Metadata
### GCP Metadata

Uses the [Google Cloud Client Libraries for Go](https://github.com/googleapis/google-cloud-go)
to read resource information from the [GCE metadata server](https://cloud.google.com/compute/docs/storing-retrieving-metadata) to retrieve the following resource attributes:

* cloud.provider ("gcp")
* cloud.platform ("gcp_compute_engine")
* cloud.account.id
* cloud.region
* cloud.availability_zone
* host.id
* host.image.id
* host.type
to read resource information from the [metadata server](https://cloud.google.com/compute/docs/storing-retrieving-metadata) and environment variables to detect which GCP platform the
application is running on, and detect the appropriate attributes for that platform. Regardless
of the GCP platform the application is running on, use the gcp detector:

Example:

```yaml
processors:
resourcedetection/gce:
detectors: [env, gce]
resourcedetection/gcp:
detectors: [env, gcp]
timeout: 2s
override: false
```

### GKE: Google Kubernetes Engine
#### GCE Metadata

* cloud.provider ("gcp")
* cloud.platform ("gcp_gke")
* k8s.cluster.name (name of the GKE cluster)
* cloud.platform ("gcp_compute_engine")
* cloud.account.id (project id)
* cloud.region (e.g. us-central1)
* cloud.availability_zone (e.g. us-central1-c)
* host.id (instance id)
* host.name (instance name)
* host.type (machine type)

Example:
#### GKE Metadata

```yaml
processors:
resourcedetection/gke:
detectors: [env, gke]
timeout: 2s
override: false
```
* cloud.provider ("gcp")
* cloud.platform ("gcp_kubernetes_engine")
* cloud.account.id (project id)
* cloud.region (only for regional GKE clusters; e.g. "us-central1")
* cloud.availability_zone (only for zonal GKE clusters; e.g. "us-central1-c")
* k8s.cluster.name
* host.id (instance id)
* host.name (instance name; only when workload identity is disabled)

#### Google Cloud Run Metadata

* cloud.provider ("gcp")
* cloud.platform ("gcp_cloud_run")
* cloud.account.id (project id)
* cloud.region (e.g. "us-central1")
* faas.id (instance id)
* faas.name (service name)
* faas.version (service revision)

#### Google Cloud Functions Metadata

* cloud.provider ("gcp")
* cloud.platform ("gcp_cloud_functions")
* cloud.account.id (project id)
* cloud.region (e.g. "us-central1")
* faas.id (instance id)
* faas.name (function name)
* faas.version (function version)

#### Google App Engine Metadata

* cloud.provider ("gcp")
* cloud.platform ("gcp_app_engine")
* cloud.account.id (project id)
* cloud.region (e.g. "us-central1")
* cloud.availability_zone (e.g. "us-central1-c")
* faas.id (instance id)
* faas.name (service name)
* faas.version (service version)

### AWS EC2

Expand Down

0 comments on commit 9e52e97

Please sign in to comment.