Comments (4)
@grassgit Depending on your VS SF tools version, the template may give you different initial code. I just tried with VS 2019 and it's actually asking you to override the listeners yourself: https://aka.ms/servicefabricservicecommunication
If you are calling the backend through Service Remoting, then take a look at this example: https://github.com/yantang-msft/service-fabric-application-insights-example/blob/master/StatelessBackend/StatelessBackend.cs
from applicationinsights-servicefabric.
@michalMajkel For remoting V1, it's actually saying use CorrelatingServiceProxyFactory
, this is to make the automatic request/dependency telemetry collection work, but not make ServiceRemoting work. Basically it's a wrapper of ServiceProxy
and collects the request/dependency telemetry for you.
The CorrelatingRemotingMessageHandler
class exists in Microsoft.AI.ServiceFabric.Native.dll, under namespace Microsoft.ApplicationInsights.ServiceFabric.Remoting.Activities
.
Let us know if it's still unclear to you, or you have any suggestion regarding the documentation.
from applicationinsights-servicefabric.
To add to this, configuration application insights for a service fabric statefull (or stateless) service using the latest version of service fabric (3.4) and sf ai (2.3) is not possible using the provided documentation. Specifically the section: https://github.com/microsoft/ApplicationInsights-ServiceFabric#net-core-1
Microsoft.ApplicationInsights.ServiceFabric.Native - For Service Fabric Reliable Services > .NET core
Some background. My goal is to create a simple SF application with a web API with a backing statefull service as a proof of concept. What I would like to see is that all action of the API and any backing services are tracked in the same request.
I have the ASPNET Core application configured with AI and this is sending the a request and the dependency call to the statefull service to AI. When I view the request in the portal I see two telemetry items.
The first issue is code example shows the method to be updated as CreateServiceInstanceListeners this does not exist the closest match is CreateServiceReplicaListeners which appears to be only a name change; so this is not a big problem.
The second issue is where it all goes wrong. The example uses WebListenerCommunicationListener which is an ASPNET .Core class. The class as included in the VS template for a statefull service FabricTransportServiceRemotingListener this does not provide any options to do the configuration as there are using OWIN . The problem here is that the native package does not seem to contain any method to obtain a telemetry client or add/read correlations ids and such from remoting client. The ASPNET .Core approach is not possible because the this remoting listener works completely different the controller approach.
I have tried to get things to work but so far I cannot get it to work. Creating the telemetry initializer in
Creating the initializer with the listener is not an issue, but I cannot actually use this in one of the statefull services' methods. Using an instance or static variable just seems wrong, since the containing class is not specific to a request but reused by multiple (concurrent) calls. I have found ways add context information to the remoting context but again no way of passing this information into the method being called.
Does anyone have suggestions how to get this to work in the current version without changing the service to an ASPNET .Core service?
from applicationinsights-servicefabric.
Thanks this is exactly what I was looking for. The main readme only contains examples for use with AspNet Core which has a lot more infrastructure.
from applicationinsights-servicefabric.
Related Issues (20)
- Configure logging for writing to AI from .NET Stateless service HOT 5
- Use NuGet V3 API for package restore HOT 1
- Actor Reminders share OperationId HOT 3
- Expose Request\Response events HOT 1
- Appinsights logging affecting performance on SF nodes HOT 1
- library causes version conflict when using Microsoft.Services.ServiceFabric >= 3.3.664 HOT 4
- Native has an old dependency on NuGet package Microsoft.ServiceFabric.Services.Remoting HOT 1
- What TelemetryChannel is recommended to be used in SF HOT 1
- Additional properties not showing in Application Insights .NET framework HOT 1
- Support for Microsoft.ServiceFabric.* 4.1.409 HOT 1
- W3C Trace-Context Support HOT 1
- How to get Azure service fabric performance metrics
- Upgrading Application Insights breaks service correlation HOT 7
- Combine Service Fabric Actor + ApplicationInsights + ILogger HOT 4
- ASP.NET CORE API running on ServiceFabric does not have service annotations when remoting HOT 16
- ApplicationInsights broken on multi - node setup
- This repo is missing important files HOT 2
- Update SDK HOT 2
- Remoting Dependency Tracking Reporting Very Long Durations? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-servicefabric.