OpenTelemetry Instrumentation for .NET
Install OpenTelemetry .NET Automatic Instrumentation and instrument your .NET application using the provided Shell scripts.
Download the bash script:
curl -sSfL https://raw.githubusercontent.com/open-telemetry/opentelemetry-dotnet-instrumentation/v1.0.2/otel-dotnet-auto-install.sh -O
Install core files:
sh ./otel-dotnet-auto-install.sh
Enable execution for the instrumentation script:
chmod +x $HOME/.otel-dotnet-auto/instrument.sh
Setup the instrumentation for the current shell session:
. $HOME/.otel-dotnet-auto/instrument.sh
If running on MacOS you will need to have greadlink installed. If it is not installed, then install coreutils package using brew, which includes greadlink:
brew install coreutils
Run your application with instrumentation:
OTEL_SERVICE_NAME=<YOUR_SERVICE_NAME> #OPTIONAL
OTEL_EXPORTER_OTLP_HEADERS="authorization=LumigoToken <YOUR_LUMIGO_TOKEN>"
OTEL_EXPORTER_OTLP_ENDPOINT="https://ga-otlp.lumigo-tracer-edge.golumigo.com"
OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" ./MyNetApp
Replace <token>
with your Lumigo token, which is available in Settings -> Tracing -> Manual tracing
, see the Lumigo Tokens documentation.
Updated about 1 year ago