Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can ITelemetryInitializer and ITelemetryProcessor be used in .net core console application? #21079

Closed
imeya opened this issue Dec 20, 2018 — with docs.microsoft.com · 6 comments

Comments

Copy link

imeya commented Dec 20, 2018

can ITelemetryInitializer and ITelemetryProcessor be used in .net core console application?

if yes, could you please provide some samples?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@mrbullwinkle
Copy link
Contributor

adding @lmolkova and @cijothomas. I know we have examples on the wiki for ITelemetryInitializer's and Processors for ASP.NET Core. I don't know if we have any console app centric examples for .NET core, but I would be happy to add them to the docs if we do.

@lmolkova
Copy link
Member

here is the article about it: https://docs.microsoft.com/en-us/azure/application-insights/application-insights-console#full-example

This example works for .NEt Core or .NET full framework.

if you are on .NET Core, please avoid using TelemetryConfiguration.Active and construct your own with TelemetryConfiguration.CreateDefault() instead.

@cijothomas
Copy link
Contributor

This issue is addressed - please-close

@BharathNimmala-MSFT
Copy link
Contributor

Thank you @cijothomas , @lmolkova and @mrbullwinkle .

@imeya Hope your query has been answered, will go ahead and close the issue. Feel free to revert back if you have any further queries. Thank you

@pilarodriguez
Copy link

@lmolkova You mentioned that using TelemetryConfiguration.Active should be avoid, but what is the reason? I've seen in the documentation that configuring ITelemetryInitializers with the TelemetryConfiguration.Active.TelemetryInitializers.Add is not allowed in .Net Core. But I am doing it like this and I don't get any errors and the initializers are working correctly

@cijothomas
Copy link
Contributor

microsoft/ApplicationInsights-dotnet#1152 Active is deprecated for .NET Core.

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

No branches or pull requests

9 participants