Skip to content

Commit

Permalink
Merge pull request #19944 from ndesai-newrelic/develop
Browse files Browse the repository at this point in the history
chore: add trouble shoot for newrelic maui agent
  • Loading branch information
WriteMayur authored Feb 13, 2025
2 parents c87cca5 + c676550 commit 83d4307
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,21 @@ The following customizations are available for the .NET MAUI agent.
Missing HTTP data in the UI?

After installing the .NET MAUI agent, wait at least 5 minutes. If no HTTP data appears on the HTTP errors and HTTP requests UI pages, make sure you used `HttpMessageHandler` in `HttpClient`.


### Missing Distributed Tracing Data in the UI

Distributed Tracing does not work when you use static methods to report HTTP data. To enable Distributed Tracing, you must use `HttpMessageHandler` with `HttpClient`.

```csharp
HttpClient myClient = new HttpClient(CrossNewRelic.Current.GetHttpMessageHandler());

var response = await myClient.GetAsync(new Uri("https://jsonplaceholder.typicode.com/todos/1"));
if (response.IsSuccessStatusCode)
{
var content = await response.Content.ReadAsStringAsync();
} else
{
Console.WriteLine("Http request failed");
}
```

0 comments on commit 83d4307

Please sign in to comment.