Skip to content

Commit 9585595

Browse files
committed
Do not list telemetry endpoint.
1 parent f3c8493 commit 9585595

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

samples/otlptrace/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ gcloud auth application-default login
2222

2323
#### Run the Sample
2424
```sh
25-
# export necessary OTEL environment variable
25+
# export necessary OTEL environment variables
2626
export OTEL_RESOURCE_ATTRIBUTES="gcp.project_id=<project-id>"
27+
export OTEL_EXPORTER_OTLP_ENDPOINT=<endpoint>
2728

2829
# from the samples/otlptrace repository
2930
python3 example_grpc.py

samples/otlptrace/example_grpc.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
processor = BatchSpanProcessor(
4747
OTLPSpanExporter(
4848
credentials=channel_creds,
49-
endpoint="https://telemetry.googleapis.com:443/v1/traces",
5049
)
5150
)
5251
trace_provider.add_span_processor(processor)

samples/otlptrace/example_http.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
from opentelemetry.sdk.trace.export import BatchSpanProcessor
2626

2727
credentials, project_id = google.auth.default()
28-
trace_provider = TracerProvider(resource=Resource.create(attributes={SERVICE_NAME: "otlp-gcp-http-sample"}))
28+
trace_provider = TracerProvider(
29+
resource=Resource.create(attributes={SERVICE_NAME: "otlp-gcp-http-sample"})
30+
)
2931
processor = BatchSpanProcessor(
3032
OTLPSpanExporter(
3133
headers={
3234
"x-goog-user-project": credentials.quota_project_id,
3335
},
3436
session=AuthorizedSession(credentials),
35-
endpoint="https://telemetry.googleapis.com:443/v1/traces",
3637
)
3738
)
3839
trace_provider.add_span_processor(processor)

0 commit comments

Comments
 (0)