如何使用appsettings.json为.NET 6控制台应用程序在Elastic云中配置Elastic APM的身份验证?
我有以下 * appsettings.josn *
如何在此处添加身份验证?
"ElasticApm": {
"ServerUrls": "https://elastic-test.apm.westeurope.azure.elastic-cloud.com",
"ServiceName": "net-console",
"Environment": "Development"
}
1条答案
按热度按时间0qx6xfy61#
需要弹性APMApiKey。
官方文档参考https://www.elastic.co/guide/en/apm/agent/dotnet/current/config-reporter.html
对于Elastic v 8.x
1.在Kibana中后藤 Stack Management -> Security -> API keys 并在那里创建一个新的API密钥
1.在appsettings.json中复制此键
不应将此密钥提交到源代码存储库!