[英]Sending Azure Application Insights data to Event Hub
I have a static dot net web application with application insights sdk. 我有一个静态网络网络应用程序与应用程序见解sdk。 How do I send application insights data to Azure Event Hub? 如何将应用程序洞察数据发送到Azure Event Hub? I have successfully used the Azure Continuous Export feature but I would rather like to send the telemetry data to the Event Hub. 我已成功使用Azure Continuous Export功能,但我更愿意将遥测数据发送到Event Hub。
To explicitly send data to eventhub you will need to use EventHub SDK, which is currently available in .NET/C#, Java, REST, and Node.js. 要显式地向eventhub发送数据,您需要使用EventHub SDK,它目前在.NET / C#,Java,REST和Node.js中可用。 For your case which is a web application, sending via REST APIs might be the easiest way. 对于您的Web应用程序,通过REST API发送可能是最简单的方法。 Take a look at API reference for more information: https://msdn.microsoft.com/en-us/library/azure/dn790674.aspx 有关更多信息, 请参阅API参考: https : //msdn.microsoft.com/en-us/library/azure/dn790674.aspx
One catch is that receiving events is not currently supported using REST, you would still need a .NET or Java application to be on the receive side. 一个问题是,使用REST目前不支持接收事件,您仍然需要.NET或Java应用程序才能在接收端。
If you are looking for a common logging framework - which can be configured to send data to "whatever data destination" you want to - you should consider looking at log4net . 如果您正在寻找一个通用的日志框架 - 可以配置为将数据发送到您想要的“任何数据目标” - 您应该考虑查看log4net 。
Here's a good implementation of log4net-appender for EventHubs. 这是 EventHubs的log4net-appender 的一个很好的实现。
@greypanda, @greypanda,
As you know Continuous Export currently only exports Application Insights to blob storage, from which you can pick up the data for use in any workstream you want. 如您所知,Continuous Export目前仅将Application Insights导出到blob存储,您可以从中获取数据以用于您想要的任何工作流。 Exporting directly in an Event Hub is something that could be a future feature, so please log this at our UserVoice site: https://visualstudio.uservoice.com/forums/357324-application-insights . 直接在事件中心导出可能是未来的功能,因此请在我们的UserVoice网站上记录: https : //visualstudio.uservoice.com/forums/357324-application-insights 。
We will also have a set of REST APIs for Application Insights soon (see https://visualstudio.uservoice.com/forums/357324-application-insights/suggestions/4999529 ), which might help you. 我们还将很快为Application Insights提供一组REST API(请参阅https://visualstudio.uservoice.com/forums/357324-application-insights/suggestions/4999529 ),这可能对您有所帮助。
I would like to learn more about your scenario so I can better help you in this instance and improve our export and API features. 我想了解有关您的方案的更多信息,以便在此实例中更好地帮助您并改进我们的导出和API功能。 Feel free to reply here or if you want, shoot me a mail offline. 您可以随时在这里回复,或者如果您愿意,可以离线给我发邮件。
Thank you 谢谢
Dale Koetke (dalek@microsoft.com) Dale Koetke(dalek@microsoft.com)
We don't really support that. 我们并不真的支持这一点。 It's a lot easier to let the SDK send the data to App Insights portal, then you can use Continuous Export to move it out into Storage. 让SDK将数据发送到App Insights门户要容易得多,然后您可以使用Continuous Export将其移出到存储中。 If you want, you can use Stream Analytics to move it from there. 如果需要,您可以使用Stream Analytics从那里移动它。
What do you plan to ultimately do with the data? 您打算最终对数据做什么? (I mean, why event hub...?) (我的意思是,为什么事件中心......?)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.