Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Reference/
  3. Ingestion tools/
  4. Elastic Distributions of OpenTelemetry (EDOT)/
  5. EDOT .NET/
  6. Setup

Using profiler-based zero-code instrumentation

EDOT .NET includes a redistribution of the zero-code installer scripts so most of the documentation in the.NET zero-code instrumentation documentation applies.

Use the EDOT .NET automatic instrumentation to send traces and metrics from .NET applications and services to observability backends without having to modify source code.

EDOT .NET automatic instrumentation should work with all officially supported operating systems and versions of .NET. The minimal supported version of .NET Framework is 4.6.2.

Supported processor architectures are:

  • x86
  • AMD64 (x86-64)
  • ARM64 (Experimental)
Note

ARM64 build does not support CentOS based images.

To instrument a .NET application automatically, download and run the installer script for your operating system.

Download and run the .sh script:

# Download the bash scriptcurl -sSfL https://github.com/elastic/elastic-otel-dotnet/releases/latest/download/elastic-dotnet-auto-install.sh -O# Install core filessh ./elastic-dotnet-auto-install.sh# Enable execution for the instrumentation scriptchmod +x $HOME/.otel-dotnet-auto/instrument.sh# Setup the instrumentation for the current shell session. $HOME/.otel-dotnet-auto/instrument.sh# Run your application with instrumentationOTEL_SERVICE_NAME=myapp OTEL_RESOURCE_ATTRIBUTES=deployment.environment=staging,service.version=1.0.0 ./MyNetApp

On Windows, use the PowerShell module as an Administrator:

# PowerShell 5.1 or higher is required# Download the module$module_url = "https://github.com/elastic/elastic-otel-dotnet/releases/latest/download/Elastic.OpenTelemetry.DotNet.psm1"$download_path = Join-Path $env:temp "Elastic.OpenTelemetry.DotNet.psm1"Invoke-WebRequest -Uri $module_url -OutFile $download_path -UseBasicParsing# Import the module to use its functionsImport-Module $download_path# Install core files (online vs offline method)Install-OpenTelemetryCoreInstall-OpenTelemetryCore -LocalPath "C:\Path\To\OpenTelemetry.zip"# Set up the instrumentation for the current PowerShell sessionRegister-OpenTelemetryForCurrentSession -OTelServiceName "MyServiceDisplayName"# Run your application with instrumentation.\MyNetApp.exe# You can get usage information by calling the following commands# List all available commandsGet-Command -Module OpenTelemetry.DotNet.Auto# Get command's usage informationGet-Help Install-OpenTelemetryCore -Detailed

For more information on instrumenting specific application types visit thecontrib OpenTelemetry documentation.


[8]ページ先頭

©2009-2026 Movatter.jp