.NET zero-code instrumentation¶
Beacon .NET provides native packages and a cross-platform beacon-dotnet command. The following example uses Debian or Ubuntu on x64; use the release page for other systems and architectures.
Before starting, enable the DataKit OpenTelemetry input as described in Common configuration. The commands use a Linux/macOS shell and assume that the application and DataKit run on the same host. Replace 127.0.0.1 and adjust the listening address for remote or container deployments.
Install¶
Download the Linux x64 .deb package from the release page above, save it as beacon-dotnet.deb in the current directory, then run:
Run¶
export OTEL_SERVICE_NAME=my-dotnet-service
export OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317
export OTEL_EXPORTER_OTLP_PROTOCOL=grpc
beacon-dotnet run dotnet MyApp.dll
run instruments only the child process. Beacon .NET does not currently expose a supported user-level continuous-profiling setup, so no profile variables are required.
Debugging and diagnostics¶
Check the installation status, then choose a writable directory for instrumentation debug logs:
beacon-dotnet status
mkdir -p beacon-dotnet-logs
OTEL_LOG_LEVEL=debug OTEL_DOTNET_AUTO_LOGGER=file \
OTEL_DOTNET_AUTO_LOG_DIRECTORY="$PWD/beacon-dotnet-logs" \
beacon-dotnet run dotnet MyApp.dll
The application process identity must have write access to OTEL_DOTNET_AUTO_LOG_DIRECTORY. To view diagnostics in the console, change OTEL_DOTNET_AUTO_LOGGER to console.
Return to the normal launch command after troubleshooting. Remove any debug variables added to service configuration and restart the application.
Verify¶
Send a request through a supported framework or library, then open APM > Traces in Guance and filter by the configured service name. See Common configuration for verification steps and Troubleshooting if no data appears.