Skip to content

Commit ea23bcd

Browse files
authored
Update samples with the GCP telemetry endpoint (#398)
1 parent b0b88bf commit ea23bcd

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

examples/otlp-spring/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Update [`build.gradle`](build.grade) to set the following:
2424

2525
```
2626
'-Dgoogle.cloud.project=your-gcp-project-id',
27-
'-Dotel.exporter.otlp.endpoint=https://your-api-endpoint:port',,
2827
```
2928

3029
## Running Locally on your machine

examples/otlp-spring/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies {
4444

4545
def autoconf_config = [
4646
'-Dgoogle.cloud.project=your-gcp-project-id',
47-
'-Dotel.exporter.otlp.endpoint=https://your-api-endpoint:port',
47+
'-Dotel.exporter.otlp.endpoint=https://telemetry.googleapis.com',
4848
'-Dotel.traces.exporter=otlp',
4949
'-Dotel.metrics.exporter=none',
5050
'-Dotel.exporter.otlp.protocol=http/protobuf',

examples/otlptrace/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@ Executing this command will save your application credentials to default path wh
1111
- Linux, macOS: `$HOME/.config/gcloud/application_default_credentials.json`
1212
- Windows: `%APPDATA%\gcloud\application_default_credentials.json`
1313

14-
Next, update the `build.gradle` file to modify required JVM arguments:
15-
16-
```groovy
17-
def autoconf_config = [
18-
'-Dgoogle.cloud.project=your-gcp-project-id',
19-
'-Dotel.exporter.otlp.endpoint=https://your-api-endpoint:port',
20-
// other arguments
21-
]
14+
Next, export the `GOOGLE_CLOUD_PROJECT` environment variable:
15+
```shell
16+
# Use your GCP project ID
17+
export GOOGLE_CLOUD_PROJECT="your-gcp-project-id"
2218
```
2319

2420
Finally, to run the sample from the project root:

examples/otlptrace/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies {
3737
// Provide headers from env variable
3838
def autoconf_config = [
3939
'-Dgoogle.cloud.project=your-gcp-project-id',
40-
'-Dotel.exporter.otlp.endpoint=https://your-api-endpoint:port',
40+
'-Dotel.exporter.otlp.endpoint=https://telemetry.googleapis.com',
4141
'-Dotel.traces.exporter=otlp',
4242
'-Dotel.logs.exporter=none',
4343
'-Dotel.metrics.exporter=none',

0 commit comments

Comments
 (0)