[英]What is the best way to track performance across multiple services/components
Our application consists of several services. 我们的应用程序包含几种服务。 Let's say: 比方说:
Most of these services are .Net, but not necessarily all of them. 这些服务大多数是.Net,但不一定全部。 Most are under are our control, however there two are external services and there may eventually be more. 大多数都在我们的控制之下,但是有两项外部服务,最终可能还会有更多。 Eventually, our .Net services will be moved into the cloud. 最终,我们的.Net服务将被迁移到云中。
End-to-end performance is important and right now, we're struggling to see the big picture of where the performance bottlenecks are. 端到端的性能非常重要,现在,我们正在努力查看性能瓶颈所在的概况。 A couple of ideas that we're considering are: 我们正在考虑的一些想法是:
For external services, we only expect the time called and the time returned, but for those services under our control, we want to track more granular events. 对于外部服务,我们仅期望调用的时间和返回的时间,但是对于那些在我们控制之下的服务,我们希望跟踪更详细的事件。
Any course of action will involve a bit of effort. 任何行动都将需要一些努力。 Before we begin, what pattern and/or tools do you think is the best way to provide effective performance data across multiple services. 在开始之前,您认为哪种模式和/或工具是跨多个服务提供有效性能数据的最佳方法。
The main question is: How much is it worth to you. 主要问题是:对您来说有多少价值。
There are plenty cloud or self host solutions on the marked which will allow you to track performance / errors and much more. 标有足够的云或自托管解决方案,可让您跟踪性能/错误等。
My only suggestion is: Don't reinvent the weel, take a prebuild solution. 我唯一的建议是:不要重新发明焊缝,采取预建解决方案。 The costs would propably be lower as if you would do it yourself. 成本可能会降低,就好像您自己动手做一样。
It's hard to answer your question without advertising but since you mentioned .NET 没有广告就很难回答您的问题,但是因为您提到了.NET
Microsoft offers something called Application Insight: https://azure.microsoft.com/en-us/documentation/articles/app-insights-windows-get-started/ 微软提供了一种称为应用程序洞察力的东西: https : //azure.microsoft.com/en-us/documentation/articles/app-insights-windows-get-started/
It's as simple as 就这么简单
var tc = new TelemetryClient(); // Call once per thread
// Send a user action or goal:
tc.TrackEvent("Win Game");
// Send a metric:
tc.TrackMetric("Queue Length", q.Length);
// Provide properties by which you can filter events:
var properties = new Dictionary{"game", game.Name};
// Provide metrics associated with an event:
var measurements = new Dictionary{"score", game.score};
tc.TrackEvent("Win Game", properties, measurements);
Take a look at it, compare some other tools and pick one that fits your needs. 看一看,比较其他一些工具,然后选择适合您需求的工具。
I've concluded that the following do-it-yourself option provides value: 我得出的结论是,以下“自己动手”选项提供了价值:
This is not an industrial strength solution, however when the individual components/services are under your control, it enables you to easily, at a glance, gain an understanding of the high level performance flow through the system. 这不是工业强度的解决方案,但是当您控制单个组件/服务时,它使您一眼就能轻松了解整个系统的高级性能。 This is useful during development. 这在开发过程中很有用。
As we discover which pieces of the puzzle cause the greatest bottlenecks, we will then turn to more specialized tools to analyze performance on a more granular basis. 当我们发现难题的哪些部分导致最大的瓶颈时,我们将转向更专门的工具来更精细地分析性能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.