ngs-doo / revenj

DSL Platform compatible backend
https://dsl-platform.com
BSD 3-Clause "New" or "Revised" License
269 stars 44 forks source link

Tracing in Revenj.AspNetCore #164

Open Kobus-Smit opened 3 years ago

Kobus-Smit commented 3 years ago

Hi @zapov

How do I enable Performance.TraceDatabase with Revenj.AspNetCore?

https://github.com/ngs-doo/revenj/blob/18aaf5f7f90ff7cbd779c6879494f6aa50a71468/csharp/Server/Revenj.Wcf/Web.config#L20

Thanks

zapov commented 3 years ago

I did not port that project to .NET standard/core. I'll look if its feasible to do so.

zapov commented 3 years ago

I've included it in new release, although you might need to reference some type explicitly to have it available on scanning

Kobus-Smit commented 3 years ago

Thanks @zapov

I've set Revenj.Plugins.Aspects.PerformanceTrace.Configuration.TraceAll to true

I'm still struggling to get the logs in Serilog. It's is probably more a TraceSource .NET Core thing.

It looks like this is needed on all Revenj's TraceSources:

https://github.com/Kobus-Smit/revenj-examples/blob/bdeeb143acaea0d39c38c080fb75c11f63135406/DotNetCore/TracingTest/Program.cs#L23-L24

Any idea how to do this on all Revenj's TraceSources from within my app?

zapov commented 3 years ago

I've read the official stance and not sure I want to change anything ATM.

The best course of action for now seems to replicate the code with your own logging: https://github.com/ngs-doo/revenj/blob/master/csharp/Plugins/Revenj.Plugins.Aspects/DatabaseTrace/Configuration.cs