英文:
Retrieve logs from Application Insights Using C# .NET Core function
问题
我正在构建一个Azure函数应用程序,用于在ApplicationInsights中编写和检索日志。我可以使用仪表密钥来记录日志。
但我不知道如何从Application Insights中检索日志。我已经搜索过并找到一些关于通过AD凭据检索日志的参考资料,但我没有AD访问权限。没有AD凭据(ClientId,SecretKey),我如何从Application Insights中检索日志数据?
我需要一些指导。谢谢。
英文:
I am building an Azure Function application to write and retrieve logs in ApplicationInsights. I can able to write logs using instrumentation key.
But I don't know how to retrieve the logs from Application Insights. I have googled and got some references to retrieve it through AD credentials but I don't have AD access. Without AD credentials (ClientId, SecretKey), how can I retrieve the logs data from Application Insights?
I need some guidance. Thanks
答案1
得分: 2
在我的测试之后,我找到了一个很好的博客并对其进行验证。如果您没有AD凭据(ClientId、SecretKey),您可以使用AppInsightsId
、AppInsightsAPIKey
。您可以像下面这样找到它。
在官方文档的直接测试中可能会出现一些问题(您可以在这里找到类似的问题),请放心,官方应该已经知道这个问题的存在。我的示例可以正常工作。请查看以下步骤。
步骤
-
找到像上面图片中的 AppInsights Id 和 Key。
-
在 Postman 中进行测试。
-
欲了解更多详细信息,您可以查看该博客。
英文:
After My test, I found a good blog and verify it. If you don't have AD credentials (ClientId, SecretKey), you can use AppInsightsId
, AppInsightsAPIKey
. You can find it like below.
There will be some problems in the direct test of the official document(you may found simillar issue here), please rest assured that the official should already know the existence of this problem. My sample Sample works fine. Please check the steps below.
<h3>Steps</h3>
-
Find the AppInsights Id and Key like the picture above.
-
Test in Postman.
-
For more details, you can check the blog.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论