Setting your Application Insights Connection String

If you’re adding Application Insights to your solution, you will need to specify a connection string. Usually, this is at the bottom of your applicationinsights.config file:

A nifty alternative is you can specify this connection as an Environment Variable – and App Insights will pick that up and use it…

However, if you do, ALL services that might use App Insights will use that Environment variable. This includes Sitecore’s IdentityServer, apparently, so don’t be surprised if you suddenly start seeing telemetry from IdentityServer in your logs.

This surprised me! Where did these custom event’s come from? Oh, “Sitecore Identity”…

It also applies to other sitecore instances on your machine, so you might get telemetry from the other instances too!

Despite this, setting the connection through environment variables is really useful for with containers.

Setting your Application Insights Connection String

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.