rollbar / Rollbar.NET

Rollbar for .NET
https://docs.rollbar.com/docs/dotnet
MIT License
65 stars 44 forks source link

Not seeing first event during project setup #645

Closed troyfitzwater closed 9 months ago

troyfitzwater commented 1 year ago

I've been trying to demo Rollbar using the .NET SDK and tried following the sample code used provided during setup for a .NET project.

RollbarLocator.RollbarInstance.Configure(new RollbarConfig("ACCESS_TOKEN"));
RollbarLocator.RollbarInstance.Info("Rollbar is configured properly.");

When using this code in a .NET 7 project, I'm getting the following error:

 The type or namespace name 'RollbarConfig' could not be found (are you missing a using directive or an assembly reference?) [dev]csharp(CS0246)

I've tried running this with both the Rollbar and Rollbar.NetCore.AspNet nuget packages installed. I've also tried using the RollbarLoggerConfig class instead, which builds successfully, but I'm not seeing any items in my project dashboard.

Any assistance would be appreciated. Please let me know if I can provide any additional information.

Thank you!

TheDevFactory commented 1 year ago

If you are using .NET 7 C# here is a working example:

using Rollbar;

RollbarLocator.RollbarInstance.Configure(new RollbarLoggerConfig("token","environment")); RollbarLocator.RollbarInstance.Info("NET Loaded Success!); //Log message in Rollbar (Info Message)

To log an Exception in a try catch: try {

} catch (Exception ex) { RollbarLocator.RollbarInstance.Critical(ex); }

troyfitzwater commented 1 year ago

I am using .NET 7 C#. Just tried this code out and I'm still not seeing any events in the dashboard.

Tried setting up a new project and using the access token from that but still nothing.

TheDevFactory commented 1 year ago

Do you have a the repo you can share with me and I can have a look for you? Or if you can tell me the type of .NET project (solution) you created and we can create one and share it with you.