Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update .NET example to use http/protobuf #525

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion getting-started-guides/dotnet/Instrumented/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ To run this demo app via the CLI:

1. Switch to the `dotnet\Instrumented` directory
2. Export the following environment variables (replace `<your_license_key>` with your [New Relic ingest license key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#license-key)):
* export OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net:4317
* export OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net
* export OTEL_EXPORTER_OTLP_HEADERS=api-key=<your_license_key>
* export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
3. Run the following command

```shell
Expand Down
4 changes: 3 additions & 1 deletion other-examples/dotnet/agent-nr-config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ ENV DOTNET_SHARED_STORE="/tracer-home/store"
ENV OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE="delta"
ENV OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION="base2_exponential_bucket_histogram"
# This env variable points to the New Relic OTLP endpoint
ENV OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net:4318"
ENV OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net"
# This env variable configures the exporter to use the HTTP protocol. The default is gRPC.
ENV OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
# This env variable adds your New Relic license key to the OTLP headers.
# You should override this when running the container so that a valid license key is used.
# The instructions in the README for this application shows how to override this value when starting the container.
Expand Down
3 changes: 2 additions & 1 deletion other-examples/dotnet/agent-nr-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ This example only requires setting the environment variable:
* Replace `<your_license_key>` with your [Account License Key](https://one.newrelic.com/launcher/api-keys-ui.launcher).

The other settings below have default values defined in the [Dockerfile](./Dockerfile), but can otherwise be overwritten/manually set:
* `OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net:4318"`
* `OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.nr-data.net"`
* `OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"`
* `OTEL_SERVICE_NAME="my-test-service"`
* Replace `my-test-service` with the name you wish to call the application.

Expand Down
Loading