Logging in Kiota
Thanks for logging this one. This is something I had put on ice for a while. I believe that only the core implementations (serialization, http, auth) need to log things. I don't believe the generated result needs to log anything itself per se. But I'm open to perspectives on this one. And I'd also like @darrelmiller input.
We could also provide a logging middleware with the default http core implementation. But it feels like giving people a gun to shoot themselves in the foot with. This could easily lead to logged tokens, or personal information, logs which could be compromised as we've seen in the past.
I do think we should seriously consider open telemetry
Yes https://opentelemetry.io/ is what we should be looking at. We should also follow the Azure SDK logging policies https://azure.github.io/azure-sdk/general_azurecore.html#logging-policy unless we have good reason not to.
Ideally we want people to be able to reuse this OpenTelemetry exporter for Azure Monitor https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/README.md
Thanks for this additional precision. Where would you have logging implemented? Abstractions? http? auth? serialization? all of them? I don't think the logging should be added to what we generate, but only in the "handcrafted" code.
I don't think the logging should be added to what we generate, but only in the "handcrafted" code. Agreed.
Abstractions - I don't think so. Http - definitely Auth - definitely Serialization - maybe.
Work item for Java: https://github.com/microsoft/kiota-java/issues/33
spec in progress https://github.com/microsoftgraph/msgraph-sdk-design/pull/72