Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Dec 17, 2024

Proposed Changes

  • Bug fix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes, no api changes)
  • Build or CI related changes
  • Documentation content changes
  • Other, please describe:

What is the current behavior?

No APM is configured for the application

What is the new behavior?

App Insights is configured for the application

Checklist

Please check that your PR fulfills the following requirements:

  • Documentation has been added/updated.
  • Automated tests for the changes have been added/updated.
  • Updated BREAKING_CHANGES.md (if you introduced a breaking change).

Other information

@ghost
Copy link
Author

ghost commented Dec 17, 2024

Please note:

This has currently been tested with a manual provisioning of App Insights. In order for it to work, you must use builder.AddConnectionString("AppInsights", "APPLICATIONINSIGHTS_CONNECTION_STRING"); in the AppHost and set a value for the connection string using the user secrets, like so:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

I was in the process (but I couldn't see it through) of testing the automatic provisioning, which is achieved by using builder.AddAzureApplicationInsights("appinsights"); in the AppHost instead of the manual configuration explained above.

@ghost ghost marked this pull request as ready for review January 7, 2025 19:45
@MatFillion
Copy link
Member

Please note:

This has currently been tested with a manual provisioning of App Insights. In order for it to work, you must use builder.AddConnectionString("AppInsights", "APPLICATIONINSIGHTS_CONNECTION_STRING"); in the AppHost and set a value for the connection string using the user secrets, like so:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

I was in the process (but I couldn't see it through) of testing the automatic provisioning, which is achieved by using builder.AddAzureApplicationInsights("appinsights"); in the AppHost instead of the manual configuration explained above.

Is that something we should add to the README?

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

@ghost
Copy link
Author

ghost commented Jan 7, 2025

Please note:
This has currently been tested with a manual provisioning of App Insights. In order for it to work, you must use builder.AddConnectionString("AppInsights", "APPLICATIONINSIGHTS_CONNECTION_STRING"); in the AppHost and set a value for the connection string using the user secrets, like so:

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

I was in the process (but I couldn't see it through) of testing the automatic provisioning, which is achieved by using builder.AddAzureApplicationInsights("appinsights"); in the AppHost instead of the manual configuration explained above.

Is that something we should add to the README?

dotnet user-secrets init
dotnet user-secrets set "ConnectionStrings:AppInsights" "<CONNECTION_STRING>"

@MatFillion I don't think so. I put this comment as an FYI of the current state for whoever was going to take over because I couldn't test automatic provisioning before I went on holiday. @MounirAbdousNventive was able to confirm that it worked so I removed the line for manual provisioning altogether (which I had commented in the first place).

@ghost ghost merged commit 5df8be2 into main Jan 8, 2025
5 checks passed
@ghost ghost deleted the feat/app-insights branch January 8, 2025 15:59
This pull request was closed.
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.

3 participants