.NET Manual Instrumentation
Datadog の調査レポート: サーバーレスの状態 レポート: サーバーレスの状態

.NET Manual Instrumentation


If you are not using libraries supported by automatic instrumentation (see Integrations), you can instrument your code manually.

The following example uses the global Tracer and creates a custom span to trace a web request:

using Datadog.Trace;

using(var scope = Tracer.Instance.StartActive("web.request"))
    var span = scope.Span;
    span.Type = SpanTypes.Web;
    span.ResourceName = request.Url;
    span.SetTag(Tags.HttpMethod, request.Method);

    // do some work...

Further Reading