.net - Send all logs to Open telemetry Logging in c# - Stack Overflow

I'm new to dotnet so this may be answered but I'm not sure what I should be searching to answ

I'm new to dotnet so this may be answered but I'm not sure what I should be searching to answer this.

We have several web applications which we have recently bootstrapped with open telemetry. With this we have setup the logging and added attributes and endpoints. Our services run in kubernetes.

I've noticed that we still seem to get some logs in the console of the applications.

The question is: How can I setup a logger that I have all logging go to? Do I have to replace a default logger or something like that?

Currently we have this in place.

logging.ClearProviders();
logging.AddOpenTelemetry();
logging.AddConsole();

We added the AddConsole() back because we found that logs just didn't appear in the otel streams.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744253662a4565288.html

相关推荐

  • .net - Send all logs to Open telemetry Logging in c# - Stack Overflow

    I'm new to dotnet so this may be answered but I'm not sure what I should be searching to answ

    8天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信