diff --git a/getting-started-guides/python/Instrumented/README.md b/getting-started-guides/python/Instrumented/README.md index 78a8ce60..32786c83 100644 --- a/getting-started-guides/python/Instrumented/README.md +++ b/getting-started-guides/python/Instrumented/README.md @@ -19,11 +19,11 @@ cd ./getting-started-guides/python/instrumented/ 6. Install dependencies listed in `requirements.txt` 7. To send telemetry data to New Relic, set the following environment variables ```shell -OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net:4317" +OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net" OTEL_EXPORTER_OTLP_HEADERS="api-key=[YOUR_INGEST_KEY]" ``` * Make sure to use your [ingest license key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#license-key) -* If your account is based in the EU, set the endpoint to: https://otlp.eu01.nr-data.net:4317 +* If your account is based in the EU, set the endpoint to: https://otlp.eu01.nr-data.net 8. Set this environment variable to name the demo app: ```shell OTEL_SERVICE_NAME=getting-started-python diff --git a/getting-started-guides/python/Instrumented/app.py b/getting-started-guides/python/Instrumented/app.py index aecc834a..b8aebd20 100644 --- a/getting-started-guides/python/Instrumented/app.py +++ b/getting-started-guides/python/Instrumented/app.py @@ -15,7 +15,7 @@ from opentelemetry import trace from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter +from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter from opentelemetry.trace.status import Status, StatusCode # Initialize tracing and an exporter that can send data to an OTLP endpoint @@ -29,7 +29,7 @@ from opentelemetry import metrics from opentelemetry.sdk.metrics import MeterProvider from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader -from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter +from opentelemetry.exporter.otlp.proto.http.metric_exporter import OTLPMetricExporter # Initialize metering and an exporter that can send data to an OTLP endpoint # SELECT count(`http.server.active_requests`) FROM Metric FACET `service.name` TIMESERIES @@ -46,7 +46,7 @@ from opentelemetry import _logs from opentelemetry.sdk._logs import LoggerProvider, LoggingHandler from opentelemetry.sdk._logs.export import BatchLogRecordProcessor -from opentelemetry.exporter.otlp.proto.grpc._log_exporter import OTLPLogExporter +from opentelemetry.exporter.otlp.proto.http._log_exporter import OTLPLogExporter # Initialize logging and an exporter that can send data to an OTLP endpoint by attaching OTLP handler to root logger # SELECT * FROM Log WHERE instrumentation.provider='opentelemetry'