Skip to content

Commit

Permalink
Merge pull request #4 from guitarrapc/doc/update
Browse files Browse the repository at this point in the history
doc: update README
  • Loading branch information
guitarrapc authored Jan 20, 2025
2 parents 7bbe4ec + 0ce9e07 commit 950fa71
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# ClrProfiler

Library to gather .NET CLR Profiler for ContentionEvent, GC, Process, Thread and ThreadPool via EventListener.
Zero dependency library to gather .NET CLR Profiler for ContentionEvent, GC, Process, Thread and ThreadPool via EventListener.
Offering following Cloud tracing packages.

* [x] Datadog

## Basic Usage
## Quick Start

Include `ClrProfiler.DatadogTracing` to your csproj and run following.
Add `ClrProfiler.DatadogTracing` to your csproj and run following.

By default, ClrProfiler will start with `Datadog` tracer.
```sh
dotnet add package ClrProfiler.DatadogTracing
```

Start Dogstatsd and ClrTracker.

```cs
// Run Client (datadog agent with udp)
Expand All @@ -27,7 +31,11 @@ tracker.EnableTracker(); // EnableTracker will start EventListener
tracker.StartTracker();
```

If you want to debug by logger, use ClrTrackerType.Logger.
Now you are ready to use ClrTracker on your application. Metrics will be sent to Datadog by dogstatsd.

## Debugging

If you want to debug behaviour, use ClrTrackerType.Logger instead. This will log metrics to ILogger.Debug.

```cs
// enable clr tracker
Expand All @@ -41,9 +49,7 @@ tracker.StartTracker();

## Sandbox

Run SandboxConsoleApp, then metrics ingested will show on Console.

Sandbox will run both Server and Client. Server is listen on `127.0.0.1:8125` and accept udp from local datadog agent.
Run SandboxConsoleApp, then metrics ingested will shown on Console. Sandbox runs both Server and Client. Server is listen UDP Server on `127.0.0.1:8125` and accept request from local datadog agent.
You will see following messages.

```
Expand Down

0 comments on commit 950fa71

Please sign in to comment.