- 重要な情報
- はじめに
- 用語集
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
The .NET Tracer supports instrumentation on .NET Framework >= 4.6.1.
For a full list of Datadog’s .NET Framework library and processor architecture support (including legacy and maintenance versions), see Compatibility Requirements.
service
, env
, and version
tags.Install and configure the Datadog Agent to receive traces from your instrumented application. By default, the Datadog Agent is enabled in your datadog.yaml
file under apm_config
with enabled: true
and listens for trace traffic on http://localhost:8126
.
For containerized, serverless, and cloud environments:
Set apm_non_local_traffic: true
in the apm_config
section of your main datadog.yaml
configuration file.
See the specific setup instructions to configure the Agent to receive traces in a containerized environment:
localhost:8126
by default. If this is not the correct host and port, change it by setting the DD_AGENT_HOST
and DD_TRACE_AGENT_PORT
environment variables. For more information on configuring these settings, see Configuration.DD_SITE
in the Datadog Agent to
.Tracing is available for other environments including, Heroku, Cloud Foundry, and AWS Elastic Beanstalk.
For all other environments, see the Integrations documentation for that environment and contact Datadog support if you are encountering setup issues.
Install the Datadog .NET Tracer machine-wide so that all services on the machine are instrumented or on a per-application basis, so developers can manage the instrumentation through the application’s dependencies. To see machine-wide installation instructions, click the Windows tab. To see per-application installation instructions, click the NuGet tab.
To install the .NET Tracer machine-wide:
Download the .NET Tracer MSI installer. Select the MSI installer for the architecture that matches the operating system (x64 or x86).
Run the .NET Tracer MSI installer with administrator privileges.
You can also script the MSI setup by running the following in PowerShell: RUN Start-Process -Wait msiexec -ArgumentList '/qn /i datadog-apm.msi'
To install the .NET Tracer per-application:
Datadog.Trace.Bundle
NuGet package to your application.To enable the .NET Tracer for your service, set the required environment variables and restart the application.
For information about the different methods for setting environment variables, see Configuring process environment variables.
The .NET Tracer MSI installer adds all required environment variables. There are no environment variables you need to configure.
To automatically instrument applications hosted in IIS, completely stop and start IIS by running the following commands as an administrator:
net stop /y was
net start w3svc
# Also, start any other services that were stopped when WAS was shut down.
iisreset.exe
.COR_PROFILER
if you installed the tracer using the MSI.Set the following required environment variables for automatic instrumentation to attach to your application:
COR_ENABLE_PROFILING=1
COR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
For standalone applications and Windows services, manually restart the application.
Follow the instructions in the package readme, also available in dd-trace-dotnet
repository.
Docker examples are also available in the repository.
After enabling the .NET Tracer for your service:
Restart your service.
Create application load.
In Datadog, navigate to APM > APM Traces.
If needed, configure the tracing library to send application performance telemetry data, including setting up Unified Service Tagging. Read Library Configuration for details.
Your setup for custom instrumentation depends on your automatic instrumentation and includes additional steps depending on the method:
To use custom instrumentation in your .NET application:
Datadog.Trace
NuGet package to your application.Datadog.Trace.Tracer.Instance
property to create new spans.To use custom instrumentation in your .NET application:
Datadog.Trace.Tracer.Instance
property to create new spans.For more information on adding spans and tags for custom instrumentation, see the .NET Custom Instrumentation documentation.
To attach automatic instrumentation to your service, set the required environment variables before starting the application. See Enable the tracer for your service section to identify which environment variables to set based on your .NET Tracer installation method and follow the examples below to correctly set the environment variables based on the environment of your instrumented service.
COR_PROFILER
if you installed the tracer using the MSI.In the Registry Editor, create a multi-string value called Environment
in the HKLM\System\CurrentControlSet\Services\<SERVICE NAME>
key and set the value data to:
COR_ENABLE_PROFILING=1
COR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
[string[]] $v = @("COR_ENABLE_PROFILING=1", "COR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}")
Set-ItemProperty HKLM:SYSTEM\CurrentControlSet\Services\<SERVICE NAME> -Name Environment -Value $v
To automatically instrument a console application, set the environment variables from a batch file before starting your application:
rem Set environment variables
SET COR_ENABLE_PROFILING=1
rem Unless v2.14.0+ and you installed the tracer with the MSI
SET COR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
rem Start application
dotnet.exe example.dll
お役に立つドキュメント、リンクや記事: