Comments (10)
Hi @balukantu,
Have you looked at the readme on https://github.com/Microsoft/ApplicationInsights-ServiceFabric#net-core?
Do you have more specific questions? Which part are you stuck on?
from applicationinsights-servicefabric.
@balukantu It depends on your project, whether it's a console app, or ASP .Net, or ASP .Net Core?
The Microsoft.ApplicationInsights.ServiceFabric.Native is an additive package and needs extra configuration, which is documented at here
from applicationinsights-servicefabric.
@yantang-msft , I have service fabric application with one stateful service and one stateless service.
@yantang-msft and @brahmnes ,
I already have gone through the documentation which they have provided. I have done below steps and stuck in the middle.
Can you check and update me If I miss anything.
Installed Microsoft.ApplicationInsights.ServiceFabric.Native
ApplicationInsights.XML file is added with the necessary configuration.
In My Service, I have added below code.
Stateless Service
protected override IEnumerable CreateServiceInstanceListeners()
{
FabricTelemetryInitializerExtension.SetServiceCallContext(this.Context);
return new ServiceInstanceListener[]
{
new ServiceInstanceListener(serviceContext => new OwinCommunicationListener(Startup.ConfigureApp, serviceContext, ServiceEventSource.Current, "ServiceEndpoint"))
};
}
Stateful Service
protected override Task RunAsync(CancellationToken cancellationToken)
{
FabricTelemetryInitializerExtension.SetServiceCallContext(this.Context);
return base.RunAsync(cancellationToken);
}
- Startup cntroller, I have added snippet
TelemetryClient telemetryClient = new TelemetryClient(new Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration("a263b486-09f1-43f5-ac9d-8fb7cb81377e"));
telemetryClient.TrackEvent("Application Insights");
- Howevere, I am unable to see logs in application insights.
I have a couple of questions.
How to configure Instrumentation key from ApplicationInsights.XML ( as per documentation)
How to log messages with different security levels. And, If you find any solution which is using application insights using above Nuget. Please do share the location or Uri.
from applicationinsights-servicefabric.
@balukantu Here is the full reference of the ApplicationInsights.config file. So basically, you don't need step #4.
You want to use TraceTrace instead of TraceEvent so as to specify the severity level.
And here is one example SF app that may help you get started with the configuration.
from applicationinsights-servicefabric.
Hi @balukantu,
Can you tell us if you are using ASP.NET core or ASP.NET?
Initialization of ApplicationInsights can be different depending on the project type.
from applicationinsights-servicefabric.
@brahmnes I am developing native fabric application (.Net Framework)
from applicationinsights-servicefabric.
Hi @balukantu,
Even a fabric application can use ASP.NET or ASP.NET core.
Here is a question: Does your project have web.config in it? If you look at the packages.config file, does it have references to Microsoft.AspNet.* packages?
The fact that you are using OwinCommunicationListener suggests to me that you may be using Microsoft.AspNet.WebApi.Owin, but I am not sure.
from applicationinsights-servicefabric.
@brahmnes , Yes, I have below references and I am using OwinCommunicationListener.
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.6" targetFramework="net461" /> <package id="Microsoft.AspNet.WebApi.Core" version="5.2.6" targetFramework="net461" /> <package id="Microsoft.AspNet.WebApi.Owin" version="5.2.6" targetFramework="net462" /> <package id="Microsoft.AspNet.WebApi.OwinSelfHost" version="5.2.6" targetFramework="net462" />
from applicationinsights-servicefabric.
@balukantu,
I suspect you just haven't enabled Application Insights for your OWIN app.
See this link:
https://stackoverflow.com/questions/29471811/how-do-i-enable-application-insights-server-telemetry-on-webapi-project-that-use
from applicationinsights-servicefabric.
Closing this issue since it's been inactive and presumably the issue was resolved.
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
- Missleading documentation & not existing classes HOT 4
- 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.