Digma Quick Start
Guide for .NET

Get Digma up and running

  1. Install the Digma IDE plugin 
  1. Start the Digma backend locally:

Linux & MacOS:

curl -L https://get.digma.ai/ -output docker-compose.yml

Windows (PowerShell):

iwr https://get.digma.ai/ -outfile docker-compose.yml
  1. Then run:
docker compose up -d

to start the Digma backend. (You’ll need Docker and Docker Compose installed)

Prefer to use a helm file? Check out these instructions instead:

Finally, connect your code to Digma!

Add one or two lines of code to instrument Digma based on the platform you are currently using.

Jump to: ASP.NET MVC

Get More Out of Digma

To find out about adding environments, commit info and other configuration options, check out the Digma instrumentation page.

New to observability? OpenTelemetry has extensive documentation explaining how to get started. [ Get started with OpenTelemetry ]

Connecting your code to Digma

.NET / ASP.NET MVC

Add the Digma NuGet package to your project:

dotnet add package OpenTel.Instrumentation.Digma

Use the ‘AddDigmaAttributes()’ extension method to add Digma’s instrumentation to your project.

Here is an example (your instrumentation code may look a little different):

builder.Services.AddOpenTelemetryTracing(
    builder => builder
        .AddAspNetCoreInstrumentation(options =>{options.RecordException = true;})
        .AddHttpClientInstrumentation()
        .SetResourceBuilder(ResourceBuilder.CreateDefault()
            .AddTelemetrySdk()
            .AddService(serviceName: serviceName, serviceVersion: serviceVersion ?? "0.0.0")
            .AddDigmaAttributes())
        .AddOtlpExporter(c => { c.Endpoint = new Uri(collectorUrl);})
        .AddSource("*")
);

You’re good to go! Check out our sample .NET project for reference.

FOUND ANY ISSUES?

Let us know on our community page and we’ll be happy to assist.