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

Exposing App Insights endpoint configs #2376

Closed
wants to merge 3 commits into from

Conversation

gzuber
Copy link
Member

@gzuber gzuber commented Nov 21, 2019

Resolves #2263

Initially made the decision to not group the endpoints because they're each configs for different components of App Insights. Left them at the top "Application Insights" level because giving them each their own subcategory seemed cluttered.

This would also require changes to the host.json schema

@gzuber gzuber requested a review from brettsam November 21, 2019 23:16
@brettsam
Copy link
Member

@cijothomas can you take a look at this as well? I know that App Insights is introducing (or has introduced?) connection strings with an endpoint suffix (microsoft/ApplicationInsights-dotnet#1221). Should we simplify this approach in functions and just expose the single suffix, or is it better to have the three separate properties like we have here?

Eventually we should just support the connection string itself, but in V1 that likely won't happen and we're looking to unblock gov cloud connections ASAP.

@@ -98,7 +98,7 @@ private IHost ConfigureHost(LogLevel minLevel = LogLevel.Information, HttpAutoCo
})
.ConfigureServices(services =>
{
ServiceDescriptor quickPulse = services.Single(s => s.ImplementationType == typeof(QuickPulseTelemetryModule));
ServiceDescriptor quickPulse = services.Single(s => s.ServiceType.Name == nameof(QuickPulseTelemetryModule));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a way to add the 3 AppInsights singletons with an ImplementationType and I don't think I fully understand the ramifications of adding them without one. This is the only thing I've found in the code that was counting on these modules having an ImplementationType, but I'm not sure if there are others.

@cijothomas
Copy link
Contributor

@brettsam Can you sync with @TimothyMothra to see if using connectionstrings here make more sense than all the individual endpoints?
We have beta sdks with con strings available now, expected to ship stable next week or two.
It'd be ideal if all application insights scenarios (including Functions) used connectionstrings so documentation can be streamlines as well.

@TimothyMothra
Copy link

@brettsam, If you have any questions about Connection Strings, feel free to message me.
I've got a draft documentation about Connection Strings here: https://github.com/microsoft/ApplicationInsights-Home/blob/master/Samples/ConnectionStringDraft.md
We're still working on complete documentation for Azure Docs.

You may find it simpler to expose the Environment Variable APPLICATIONINSIGHTS_CONNECTION_STRING which maps to TelemetryConfiguration.ConnectionString: https://github.com/microsoft/ApplicationInsights-dotnet/blob/add45ceed35a817dc7202ec07d3df1672d1f610d/BASE/src/Microsoft.ApplicationInsights/Extensibility/TelemetryConfiguration.cs#L271-L274

This is available now in our SDK 2.12-Beta4.
2.12.0 will ship before December 10th.

@TimothyMothra
Copy link

@gzuber @brettsam
Hello, I'm writing to remind you that we shipped version 2.12.0 of the Application Insights sdks this week.
https://www.nuget.org/packages/Microsoft.ApplicationInsights/2.12.0

I want to politely ask that you consider onboarding to this version for Connection String support.
I have sdk examples documented here: https://github.com/microsoft/ApplicationInsights-Home/blob/master/Samples/ConnectionStringDraft.md#net-sdk-example
Please ping me if you have any questions.

@gzuber
Copy link
Member Author

gzuber commented Dec 11, 2019

@TimothyMothra thanks for the reminder! We are planning to use connection string for this feature, we've just been discussing internally the best way to expose it. I'll update this PR soon 😃

@gzuber
Copy link
Member Author

gzuber commented Dec 13, 2019

I actually ended up making a new branch as the changes for ConnectionString were more divergent than I expected. New PR is #2385

@gzuber gzuber closed this Dec 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Application Insights in the Azure Government Cloud [v3.x]
4 participants