Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

[Question] Dependency mapping in Application Insights (Webjob hosted Function) #2

Open
TheeJamesLee opened this issue Jul 11, 2017 · 5 comments

Comments

@TheeJamesLee
Copy link

Hi,

This video on channel 9, @lindydonna is demonstrating near the end application insights.

During the demonstration, the application map shows up with the dependencies being displayed and notably,
WebApp -> FunctionApp -> Further dependencies.

Can anyone point to the package and config combination that can currently achieve this?

I have tried adding my open Microsoft.ApplicationInsights nuget. Also trying just adding the exact ApplicationInsights.config file to a function app as in this repo.

In webjobs there is an open issue to achieve it (but it's present in the video?) Azure/azure-webjobs-sdk#1208

Any help appreciated,

Thanks,

@lindydonna
Copy link
Contributor

@TheeJamesLee You just need to include the AppInsights NuGet and add the Application Insights instrumentation key. See https://blogs.msdn.microsoft.com/appserviceteam/2017/04/06/azure-functions-application-insights/

If you have a web front-end, you'll have add app insights to that as well.

The open issue is to do dependency tracking automatically.

@TheeJamesLee
Copy link
Author

@lindydonna thanks for the reply :) . Yep, the web front end has AppIns and is working fine. So are you saying that I also need to add the AppInsight package explicitly as a dependancy to the FunctionApp project?

Just wondering because it's already part of the WebJobs SDK package that functions is onto of - and this package provides the request and trace logging. The link you provided doesn't have adding the package explicitly and just adding the app insight key ... (which the webjob sdk picks up and does what I just described).
That then links to the webjob open issue to 'automatically' pick up the dependencies. Yup got that.

So, to close this off I think the question around this is, did you manually wire up around the dependencies for the video demonstration by adding your own TelemetryClient (in the video it only shows you doing the custom metrics and events... not how the dependencies were done).

Unless, it is actually just as simple as adding the package and those lower calls will be picked up? I will try and test this if I have a chance this evening otherwise it would be tomorrow, but I think the question is hopefully a bit clearer now? :)

@TheeJamesLee
Copy link
Author

TheeJamesLee commented Jul 12, 2017

@lindydonna this morning I added the ApplicationInsights nuget package, ApplicationInsights.config, directly to the FunctionApp itself - no luck.

Can you confirm if you did any manual wiring up to achieve the output on the video?

@TheeJamesLee
Copy link
Author

(Or did you add the ApplicationInsights.Web nuget. Only tried explicitly with the more core nuget)

@lindydonna
Copy link
Contributor

@TheeJamesLee It looks like dependency tracking wasn't actually wired up for the Function App, just the Web App. @brettsam will reply with more info.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants