From f2351cba014d450172ae5ca7b3ec186c43325f99 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Mon, 1 Apr 2024 17:14:38 +0000 Subject: [PATCH 1/3] Update guidance for manual instrumentation usage --- gcp-resources/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcp-resources/README.md b/gcp-resources/README.md index 256b898f4..74fd57ecf 100644 --- a/gcp-resources/README.md +++ b/gcp-resources/README.md @@ -49,6 +49,12 @@ spec: Additionally, the container name will only be discovered via the environment variable `CONTAINER_NAME` which much be included in the environment. +## Usage with Manual-Instrumentation + +It is recommended to use this resource detector with the [OpenTelemetry Autoconfiguration SPI](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#resource-provider-spi). The GCP resource detector automatically provides the detected resources via the [autoconfigure-spi](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure-spi) SDK extension. + +For a reference example showcasing the detected resource attributes and usage with `autoconfigure-spi`, see the [Resource detection example](https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/tree/main/examples/resource). + ## Usage with Auto-Instrumentation With the release of [v2.2.0 of the OpenTelemetry Java Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.2.0), the GCP resource detector is now included with the Java agent. From 7f52867b13053dfb6f52c4b5630ab99bbece8537 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Tue, 2 Apr 2024 19:10:56 -0400 Subject: [PATCH 2/3] Update gcp-resources/README.md Co-authored-by: Trask Stalnaker --- gcp-resources/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcp-resources/README.md b/gcp-resources/README.md index 74fd57ecf..0090b4e7f 100644 --- a/gcp-resources/README.md +++ b/gcp-resources/README.md @@ -49,7 +49,7 @@ spec: Additionally, the container name will only be discovered via the environment variable `CONTAINER_NAME` which much be included in the environment. -## Usage with Manual-Instrumentation +## Usage with Manual Instrumentation It is recommended to use this resource detector with the [OpenTelemetry Autoconfiguration SPI](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#resource-provider-spi). The GCP resource detector automatically provides the detected resources via the [autoconfigure-spi](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure-spi) SDK extension. From e3ce778372a42b079761e7988260dd14eb80f73a Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Sun, 14 Apr 2024 22:10:58 +0000 Subject: [PATCH 3/3] Udpate link to resource detection example --- gcp-resources/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcp-resources/README.md b/gcp-resources/README.md index 0090b4e7f..cc7edd544 100644 --- a/gcp-resources/README.md +++ b/gcp-resources/README.md @@ -53,7 +53,7 @@ which much be included in the environment. It is recommended to use this resource detector with the [OpenTelemetry Autoconfiguration SPI](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#resource-provider-spi). The GCP resource detector automatically provides the detected resources via the [autoconfigure-spi](https://github.com/open-telemetry/opentelemetry-java/tree/main/sdk-extensions/autoconfigure-spi) SDK extension. -For a reference example showcasing the detected resource attributes and usage with `autoconfigure-spi`, see the [Resource detection example](https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/tree/main/examples/resource). +For a reference example showcasing the detected resource attributes and usage with `autoconfigure-spi`, see the [Resource detection example](https://github.com/open-telemetry/opentelemetry-java-examples/tree/main/resource-detection-gcp). ## Usage with Auto-Instrumentation